75 {
76 MsgStream log(messageService(), name());
77 log << MSG::INFO << "VertexDbSvc::initialize()" << endreq;
78
79 StatusCode sc = Service::initialize();
80 if( sc.isFailure() ) return sc;
81
82
83 IIncidentSvc* incsvc;
84 sc = service("IncidentSvc", incsvc);
85 int priority = 100;
86 if( sc.isSuccess() ){
87 incsvc -> addListener(this, "NewRun", priority);
88 }
89
90 sc = serviceLocator()->service("DatabaseSvc",m_dbsvc,true);
91 if (sc .isFailure() ) {
92 log << MSG::ERROR << "Unable to find DatabaseSvc " << endreq;
93 return sc;
94 }
95
96 sc = serviceLocator()->service("EventDataSvc", m_eventSvc, true);
97 if (sc .isFailure() ) {
98 log << MSG::ERROR << "Unable to find EventDataSvc " << endreq;
99 return sc;
100 }
101 if(m_readOneTime){
102 if(m_runFrom>=8093){
103 getReadBunchInfo(m_runFrom, m_runTo);
104 }
105 else
106 std::cout<<"VertexDbSvc, invalid RunFrom, RunFrom should be >=8093"<<std::endl;
107 }
108 return StatusCode::SUCCESS;
109}