77 {
78 MsgStream log(messageService(), name());
79 log << MSG::INFO << "VertexDbSvc::initialize()" << endreq;
80
81 StatusCode sc = Service::initialize();
82 if( sc.isFailure() ) return sc;
83
84
85 IIncidentSvc* incsvc;
86 sc = service("IncidentSvc", incsvc);
87 int priority = 100;
88 if( sc.isSuccess() ){
89 incsvc -> addListener(this, "NewRun", priority);
90 }
91
92 sc = serviceLocator()->service("DatabaseSvc",m_dbsvc,true);
93 if (sc .isFailure() ) {
94 log << MSG::ERROR << "Unable to find DatabaseSvc " << endreq;
95 return sc;
96 }
97
98 sc = serviceLocator()->service("EventDataSvc", m_eventSvc, true);
99 if (sc .isFailure() ) {
100 log << MSG::ERROR << "Unable to find EventDataSvc " << endreq;
101 return sc;
102 }
103
104
105
106
107
108
109
110 for(unsigned int i = 0; i < m_runIdList.size(); i++) {
111 m_runFrom=m_runIdList[i];
112 i=i+2;
113 m_runTo=m_runIdList[i];
114 if(m_readOneTime){
115 if(m_runFrom>=8093){
116 getReadBunchInfo(m_runFrom, m_runTo);
117 }
118 else
119 std::cout<<"VertexDbSvc, invalid RunFrom, RunFrom should be >=8093"<<std::endl;
120 }
121 }
122
123 return StatusCode::SUCCESS;
124}