BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataProviderSvc Class Reference

#include <RawDataProviderSvc.h>

+ Inheritance diagram for RawDataProviderSvc:

Public Member Functions

 RawDataProviderSvc (const std::string &name, ISvcLocator *svcloc)
 
 ~RawDataProviderSvc ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
void handle (const Incident &)
 
MdcDigiVecgetMdcDigiVec (uint32_t control=0)
 
TofDataMaptofDataMapOnlineMode (uint32_t control=1)
 
TofDataVectortofDataVectorOnlineMode (uint32_t control=1)
 
TofDataMaptofDataMapEstime ()
 
TofDataVectortofDataVectorEstime ()
 
TofDataMaptofDataMapTof (double estime=0.0)
 
TofDataVectortofDataVectorTof (double estime=0.0)
 
TofDataMaptofDataMapEmc (double estime=0.0)
 
TofDataVectortofDataVectorEmc (double estime=0.0)
 
EmcDigiColgetEmcDigiVec (uint32_t control)
 
MdcRawDataProvidergetMdcProvider ()
 
TofRawDataProvidergetTofProvider ()
 
EmcRawDataProvidergetEmcProvider ()
 
bool isOnlineMode ()
 

Detailed Description

Definition at line 16 of file RawDataProviderSvc.h.

Constructor & Destructor Documentation

◆ RawDataProviderSvc()

RawDataProviderSvc::RawDataProviderSvc ( const std::string & name,
ISvcLocator * svcloc )

Definition at line 25 of file RawDataProviderSvc.cxx.

25 :
26 base_class (name, svcloc) {
27// Service (name, svcloc) {
28 declareProperty("OutputLevel", m_outputLevel=MSG::WARNING);
29 declareProperty("skipLayers", m_skipLayers);
30 declareProperty("MdcWireEffThreshold", m_effThreshold=0.9);
31 declareProperty("MdcAdcThreshold", m_adcThresholds);
32 declareProperty("EmcELow", m_elow=0);
33 declareProperty("EmcTLow", m_tlow=0);
34 declareProperty("EmcTHigh", m_thigh=60);
35 declareProperty("EmcHotCrystals", m_hotVec);
36 declareProperty("EmcDeadCrystals", m_deadVec);
37 declareProperty("EmcDeadCrystals", m_deadVec);
38 declareProperty("OnlineMode", m_onlineMode=0);
39 // tianhl for mt
40 m_mdcProvider = new MdcRawDataProvider(name.c_str());
41 m_tofProvider = new TofRawDataProvider(name.c_str());
42 m_emcProvider = new EmcRawDataProvider(name.c_str());
43 // tianhl for mt
44}

◆ ~RawDataProviderSvc()

RawDataProviderSvc::~RawDataProviderSvc ( )

Definition at line 47 of file RawDataProviderSvc.cxx.

47 {
48 if(m_mdcProvider) delete m_mdcProvider;
49 if(m_tofProvider) delete m_tofProvider;
50 if(m_emcProvider) delete m_emcProvider;
51}

Member Function Documentation

◆ finalize()

StatusCode RawDataProviderSvc::finalize ( )
virtual

Definition at line 97 of file RawDataProviderSvc.cxx.

97 {
98 MsgStream log(messageService(), name());
99 log << MSG::INFO << "RawDataProviderSvc::finalize()" << endreq;
100
101 return StatusCode::SUCCESS;
102}

◆ getEmcDigiVec()

EmcDigiCol & RawDataProviderSvc::getEmcDigiVec ( uint32_t control)
inline

Definition at line 41 of file RawDataProviderSvc.h.

41{return m_emcProvider->getEmcDigiVec(control); }
EmcDigiCol & getEmcDigiVec(uint32_t control)

◆ getEmcProvider()

EmcRawDataProvider * RawDataProviderSvc::getEmcProvider ( )
inline

Definition at line 45 of file RawDataProviderSvc.h.

45{ return m_emcProvider; }

◆ getMdcDigiVec()

◆ getMdcProvider()

MdcRawDataProvider * RawDataProviderSvc::getMdcProvider ( )
inline

Definition at line 43 of file RawDataProviderSvc.h.

43{ return m_mdcProvider; }

◆ getTofProvider()

TofRawDataProvider * RawDataProviderSvc::getTofProvider ( )
inline

Definition at line 44 of file RawDataProviderSvc.h.

44{ return m_tofProvider; }

◆ handle()

void RawDataProviderSvc::handle ( const Incident & inc)

Definition at line 115 of file RawDataProviderSvc.cxx.

115 {
116 MsgStream log( messageService(), name() );
117 log << MSG::DEBUG << "handle: " << inc.type() << endreq;
118 if ( inc.type() == "BeginEvent" ){
119 log << MSG::DEBUG << "Begin Event" << endreq;
120 m_tofProvider->handle( inc );
121 m_emcProvider->handle( inc );
122 m_mdcProvider->handle( inc );
123 }
124}
void handle(const Incident &)
void handle(const Incident &)
void handle(const Incident &)

◆ initialize()

StatusCode RawDataProviderSvc::initialize ( )
virtual

Definition at line 54 of file RawDataProviderSvc.cxx.

54 {
55 MsgStream log(messageService(), name());
56 log << MSG::INFO << "RawDataProviderSvc::initialize()" << endreq;
57
58 StatusCode sc = Service::initialize();
59 if( sc.isFailure() ) return sc;
60
61 // tianhl for mt
62 std::string incidentSvc_name("IncidentSvc");
63 //if(isGaudiThreaded(name())){
64 // incidentSvc_name += getGaudiThreadIDfromName(name());
65 //}
66 // tianhl for mt
67 IIncidentSvc* incsvc;
68 sc = service(incidentSvc_name.c_str(), incsvc);
69 int priority = 100;
70 if( sc.isSuccess() ){
71 incsvc -> addListener(this, "BeginEvent", priority);
72 }
73
74 sc = m_mdcProvider->initialize();
75 if( sc.isFailure() ) return sc;
76
77
78 sc = m_tofProvider->initialize(m_onlineMode);
79 if( sc.isFailure() ) return sc;
80
81 if( m_skipLayers.size()>0 ) m_mdcProvider->setSkipLayers( m_skipLayers );
82 m_mdcProvider->setEffThreshold( m_effThreshold );
83 if(m_adcThresholds.size()>0) m_mdcProvider->setAdcThresholds( m_adcThresholds );
84
85 if(m_elow>0) m_emcProvider->setELowThreshold(RawDataUtil::EmcChargeChannel(m_elow));
86 if(m_tlow>0) m_emcProvider->setTLowThreshold(m_tlow);
87 if(m_thigh>0&&m_thigh<60) m_emcProvider->setTHighThreshold(m_thigh);
88 if(m_hotVec.size()>0) m_emcProvider->setHotCrystals(m_hotVec);
89 if(m_deadVec.size()>0) m_emcProvider->setHotCrystals(m_deadVec);
90 sc = m_emcProvider->initialize(m_onlineMode,serviceLocator());
91 if( sc.isFailure() ) return sc;
92
93 //log << MSG::INFO << "finish initializing..." << endreq;
94 return StatusCode::SUCCESS;
95}
void setTLowThreshold(const uint32_t low)
void setHotCrystals(const std::vector< uint32_t > &idVec)
void setELowThreshold(const uint32_t low)
virtual StatusCode initialize(bool mode=0, ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)
void setTHighThreshold(const uint32_t high)
void setAdcThresholds(const std::vector< float > &adcThresholds)
StatusCode initialize(ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)
void setSkipLayers(const std::vector< int > &skipLayers)
void setEffThreshold(float effThreshold)
static int EmcChargeChannel(double charge)
Definition RawDataUtil.h:37
StatusCode initialize(bool mode=false, ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)

◆ isOnlineMode()

bool RawDataProviderSvc::isOnlineMode ( )
inline

Definition at line 46 of file RawDataProviderSvc.h.

46{ return m_onlineMode; }

◆ tofDataMapEmc()

TofDataMap & RawDataProviderSvc::tofDataMapEmc ( double estime = 0.0)
inline

Definition at line 38 of file RawDataProviderSvc.h.

38{ return m_tofProvider->tofDataMapEmc(estime); }
TofDataMap & tofDataMapEmc(double estime=0.0)

◆ tofDataMapEstime()

TofDataMap & RawDataProviderSvc::tofDataMapEstime ( )
inline

Definition at line 34 of file RawDataProviderSvc.h.

34{ return m_tofProvider->tofDataMapEstime(); }
TofDataMap & tofDataMapEstime()

◆ tofDataMapOnlineMode()

TofDataMap & RawDataProviderSvc::tofDataMapOnlineMode ( uint32_t control = 1)
inline

Definition at line 32 of file RawDataProviderSvc.h.

32{ return m_tofProvider->tofDataMapOnlineMode(control); }
TofDataMap & tofDataMapOnlineMode(uint32_t control=1)

◆ tofDataMapTof()

TofDataMap & RawDataProviderSvc::tofDataMapTof ( double estime = 0.0)
inline

Definition at line 36 of file RawDataProviderSvc.h.

36{ return m_tofProvider->tofDataMapTof(estime); }
TofDataMap & tofDataMapTof(double estime=0.0)

◆ tofDataVectorEmc()

TofDataVector & RawDataProviderSvc::tofDataVectorEmc ( double estime = 0.0)
inline

Definition at line 39 of file RawDataProviderSvc.h.

39{ return m_tofProvider->tofDataVectorEmc(estime); }
TofDataVector & tofDataVectorEmc(double estime=0.0)

◆ tofDataVectorEstime()

TofDataVector & RawDataProviderSvc::tofDataVectorEstime ( )
inline

Definition at line 35 of file RawDataProviderSvc.h.

35{ return m_tofProvider->tofDataVectorEstime(); }
TofDataVector & tofDataVectorEstime()

◆ tofDataVectorOnlineMode()

TofDataVector & RawDataProviderSvc::tofDataVectorOnlineMode ( uint32_t control = 1)
inline

Definition at line 33 of file RawDataProviderSvc.h.

33{ return m_tofProvider->tofDataVectorOnlineMode(control); }
TofDataVector & tofDataVectorOnlineMode(uint32_t control=1)

◆ tofDataVectorTof()

TofDataVector & RawDataProviderSvc::tofDataVectorTof ( double estime = 0.0)
inline

Definition at line 37 of file RawDataProviderSvc.h.

37{ return m_tofProvider->tofDataVectorTof(estime); }
TofDataVector & tofDataVectorTof(double estime=0.0)

The documentation for this class was generated from the following files: