35{
36 MsgStream log(messageService(), name());
37 log << MSG::INFO << "@initialize()" << endreq;
38
39 StatusCode sc = Service::initialize();
40
41 if ( sc.isFailure() ) return sc;
42
43 IIncidentSvc* incsvc;
44 sc = service("IncidentSvc", incsvc);
45 int priority = 100;
46 if( sc.isSuccess() ){
47 incsvc -> addListener(this, "NewRun", priority);
48 }
49
50
51 sc = serviceLocator()->service("DatabaseSvc",m_dbsvc,true);
52 if (sc .isFailure() ) {
53 log << MSG::ERROR << "Unable to find DatabaseSvc " << endreq;
54 return sc;
55 }
56
57
58 sc = serviceLocator()->service("EventDataSvc", m_eventSvc, true);
59 if (sc .isFailure() ) {
60 log << MSG::ERROR << "Unable to find EventDataSvc " << endreq;
61 return sc;
62 }
63 m_run=0;
64 return sc;
65}