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