51 {
52 MsgStream log(
msgSvc(), name());
53 StatusCode sc = Service::initialize();
54 log << MSG::DEBUG << "RootEvtSelector::initialize" << endreq; if( sc.isSuccess() ) {
55 setProperties();
56 } else {
57 log << MSG::ERROR << "Unable to initialize service " << endreq;
58 }
59
60 if(m_jobInput.value() != " "){
62 if(sc.isFailure()){
63 log << MSG::ERROR << "Unable to get input value" << endreq;
64 return sc;
65 }
66 }
67
68
69 sc = serviceLocator()->service("EventCnvSvc", m_addrCreator);
70 if( !sc.isSuccess() ) {
71 log << MSG::ERROR <<
72 "Unable to localize interface IID_IAddressCreator from service:"
73 << "RootEventSelector"
74 << endreq;
75 return sc;
76 }
77
78
79 IDataManagerSvc* eds = 0;
80 sc = serviceLocator()->service("EventDataSvc", eds, true);
81 if( !sc.isSuccess() ) {
82 log << MSG::ERROR
83 << "Unable to localize interface IID_IDataManagerSvc "
84 << "from RootEventSelector"
85 << endreq;
86 return sc;
87 }
88
89 m_rootCLID = eds->rootCLID();
90
91
93 log << MSG::INFO <<
"currentFile in RootEvtSelector::initialize "<<m_rootInterface->
getCurrentFileName()<<endreq;
94 if (!m_rootInterface) log << MSG::ERROR << "Unable to start Root service within RootCnvSvc" << endreq;
95
96
98
99
101
102 ISvcLocator* svcLocator = Gaudi::svcLocator();
103 StatusCode status = svcLocator->service("TagFilterSvc",tmpSvc);
104 if (status.isSuccess()) {
105 log << MSG::INFO << "get the TagFilterSvc" << endreq;
107 }else {
108 log << MSG::WARNING << "could not get the TagFilterSvc. Ignore it." << endreq;
109 }
110
112
113 vector<string> dstFiles = m_tagFilterSvc->
getDstFiles();
114 int size = dstFiles.size();
115 std::string treeName="Event";
116
117 for(int i=0;i<size;i++)
118 {
119 std::cout<<"RootEvtSelector, dstFile: "<<dstFiles[i]<<std::endl;
121 }
122 return sc;
123}
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()