2#include "GaudiKernel/Kernel.h"
3#include "GaudiKernel/IInterface.h"
4#include "GaudiKernel/IIncidentSvc.h"
5#include "GaudiKernel/Incident.h"
6#include "GaudiKernel/IIncidentListener.h"
7#include "GaudiKernel/StatusCode.h"
8#include "GaudiKernel/SvcFactory.h"
9#include "GaudiKernel/MsgStream.h"
10#include "GaudiKernel/IDataProviderSvc.h"
11#include "GaudiKernel/SmartDataPtr.h"
12#include "GaudiKernel/DataSvc.h"
16#include "GaudiKernel/ThreadGaudi.h"
24 Service (name, svcloc) {
25 declareProperty(
"OutputLevel", m_outputLevel=MSG::WARNING);
26 declareProperty(
"skipLayers", m_skipLayers);
27 declareProperty(
"MdcWireEffThreshold", m_effThreshold=0.9);
28 declareProperty(
"EmcELow", m_elow=0);
29 declareProperty(
"EmcTLow", m_tlow=0);
30 declareProperty(
"EmcTHigh", m_thigh=60);
31 declareProperty(
"EmcHotCrystals", m_hotVec);
32 declareProperty(
"EmcDeadCrystals", m_deadVec);
33 declareProperty(
"EmcDeadCrystals", m_deadVec);
34 declareProperty(
"OnlineMode", m_onlineMode=0);
44 if(m_mdcProvider)
delete m_mdcProvider;
45 if(m_tofProvider)
delete m_tofProvider;
46 if(m_emcProvider)
delete m_emcProvider;
51 MsgStream log(messageService(), name());
52 log << MSG::INFO <<
"RawDataProviderSvc::initialize()" << endreq;
54 StatusCode sc = Service::initialize();
55 if( sc.isFailure() )
return sc;
58 std::string incidentSvc_name(
"IncidentSvc");
64 sc = service(incidentSvc_name.c_str(), incsvc);
67 incsvc -> addListener(
this,
"BeginEvent", priority);
71 if( sc.isFailure() )
return sc;
75 if( sc.isFailure() )
return sc;
77 if( m_skipLayers.size()>0 ) m_mdcProvider->
setSkipLayers( m_skipLayers );
85 sc = m_emcProvider->
initialize(m_onlineMode,serviceLocator());
86 if( sc.isFailure() )
return sc;
89 return StatusCode::SUCCESS;
93 MsgStream log(messageService(), name());
94 log << MSG::INFO <<
"RawDataProviderSvc::finalize()" << endreq;
96 return StatusCode::SUCCESS;
104 return Service::queryInterface(riid, ppvInterface);
107 return StatusCode::SUCCESS;
111 MsgStream log( messageService(), name() );
112 log << MSG::DEBUG <<
"handle: " << inc.type() << endreq;
113 if ( inc.type() ==
"BeginEvent" ){
114 log << MSG::DEBUG <<
"Begin Event" << endreq;
115 m_tofProvider->
handle( inc );
116 m_emcProvider->
handle( inc );
117 m_mdcProvider->
handle( inc );
void setTLowThreshold(const uint32_t low)
void setHotCrystals(const std::vector< uint32_t > &idVec)
void setELowThreshold(const uint32_t low)
void handle(const Incident &)
virtual StatusCode initialize(bool mode=0, ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)
void setTHighThreshold(const uint32_t high)
static const InterfaceID & interfaceID()
void handle(const Incident &)
StatusCode initialize(ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)
void setSkipLayers(const std::vector< int > &skipLayers)
void setEffThreshold(float effThreshold)
virtual StatusCode finalize()
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
void handle(const Incident &)
RawDataProviderSvc(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode initialize()
static int EmcChargeChannel(double charge)
void handle(const Incident &)
StatusCode initialize(bool mode=false, ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)