53 {
54 MsgStream log(
msgSvc(), name());
55 StatusCode sc = Service::initialize();
56 log << MSG::DEBUG << "RootEvtSelector::initialize" << endreq; if( sc.isSuccess() ) {
57 setProperties();
58 } else {
59 log << MSG::ERROR << "Unable to initialize service " << endreq;
60 }
61
62 if(m_jobInput.value() != " "){
64 if(sc.isFailure()){
65 log << MSG::ERROR << "Unable to get input value" << endreq;
66 return sc;
67 }
68 }
69
70
71 sc = serviceLocator()->service("EventCnvSvc", m_addrCreator);
72 if( !sc.isSuccess() ) {
73 log << MSG::ERROR <<
74 "Unable to localize interface IID_IAddressCreator from service:"
75 << "RootEventSelector"
76 << endreq;
77 return sc;
78 }
79
80
81 IDataManagerSvc* eds = 0;
82 sc = serviceLocator()->service("EventDataSvc", eds, true);
83 if( !sc.isSuccess() ) {
84 log << MSG::ERROR
85 << "Unable to localize interface IID_IDataManagerSvc "
86 << "from RootEventSelector"
87 << endreq;
88 return sc;
89 }
90
91 m_rootCLID = eds->rootCLID();
92
93
95 log << MSG::INFO <<
"currentFile in RootEvtSelector::initialize "<<m_rootInterface->
getCurrentFileName()<<endreq;
96 if (!m_rootInterface) log << MSG::ERROR << "Unable to start Root service within RootCnvSvc" << endreq;
97
98
100
101
103
104 ISvcLocator* svcLocator = Gaudi::svcLocator();
105 StatusCode status = svcLocator->service("TagFilterSvc",tmpSvc);
106 if (status.isSuccess()) {
107 log << MSG::INFO << "get the TagFilterSvc" << endreq;
109 }else {
110 log << MSG::WARNING << "could not get the TagFilterSvc. Ignore it." << endreq;
111 }
112
114
115 vector<string> dstFiles = m_tagFilterSvc->
getDstFiles();
116 int size = dstFiles.size();
117 std::string treeName="Event";
118
119 for(int i=0;i<size;i++)
120 {
121 std::cout<<"RootEvtSelector, dstFile: "<<dstFiles[i]<<std::endl;
123 }
124 return sc;
125}
This class provides the Context for RootEventSelector.
virtual StatusCode setCriteria(const std::string &criteria)
virtual void setTagInputFile(std::vector< std::string > input)
virtual StatusCode addInput(const std::string &treename, const std::string &file)
add input tree to the list
static RootInterface * Instance(MsgStream log)
singleton behaviour
vector< string > getTagFiles()
vector< string > getDstFiles()