49 {
50 MsgStream log(messageService(), name());
51 log << MSG::INFO << name() << "DedxSimSvc::initialize()" << endreq;
52
53 StatusCode sc = Service::initialize();
54 if( sc.isFailure() ) return sc;
55
56 IIncidentSvc* incsvc;
57 sc = service("IncidentSvc", incsvc);
58 int priority = 100;
59 if( sc.isSuccess() ){
60 incsvc -> addListener(this, "NewRun", priority);
61 }
62 sc = serviceLocator()->service("EventDataSvc", m_eventSvc, true);
63 if (sc .isFailure() ) {
64 log << MSG::ERROR << "Unable to find EventDataSvc " << endreq;
65 return sc;
66 }
67
68 m_runfrom = -999999;
69 m_runto = -999999;
70 m_version = -1;
71 m_numDedxHists = 0;
72 m_numBg = 0;
73 m_numTheta = 0;
74 m_dedx_hists = nullptr;
75 m_bgRange = nullptr;
76 return StatusCode::SUCCESS;
77}