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