BOSS 6.6.4.p01
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 ()
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 
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 ()
 
virtual MdcDigiVecgetMdcDigiVec (uint32_t control=0)=0
 
virtual MdcRawDataProvidergetMdcProvider ()=0
 
virtual TofDataMaptofDataMapOnlineMode (uint32_t control=1)=0
 
virtual TofDataVectortofDataVectorOnlineMode (uint32_t control=1)=0
 
virtual TofDataMaptofDataMapEstime ()=0
 
virtual TofDataVectortofDataVectorEstime ()=0
 
virtual TofDataMaptofDataMapTof (double estime=0)=0
 
virtual TofDataVectortofDataVectorTof (double estime=0)=0
 
virtual TofDataMaptofDataMapEmc (double estime=0)=0
 
virtual TofDataVectortofDataVectorEmc (double estime=0)=0
 
virtual TofRawDataProvidergetTofProvider ()=0
 
virtual EmcDigiColgetEmcDigiVec (uint32_t control=0)=0
 
virtual EmcRawDataProvidergetEmcProvider ()=0
 
virtual bool isOnlineMode ()=0
 

Additional Inherited Members

- Static Public Member Functions inherited from IRawDataProviderSvc
static const InterfaceID & interfaceID ()
 

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 23 of file RawDataProviderSvc.cxx.

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

◆ ~RawDataProviderSvc()

RawDataProviderSvc::~RawDataProviderSvc ( )

Definition at line 42 of file RawDataProviderSvc.cxx.

42 {
43 if(m_mdcProvider) delete m_mdcProvider;
44 if(m_tofProvider) delete m_tofProvider;
45 if(m_emcProvider) delete m_emcProvider;
46}

Member Function Documentation

◆ finalize()

StatusCode RawDataProviderSvc::finalize ( )
virtual

Definition at line 90 of file RawDataProviderSvc.cxx.

90 {
91 MsgStream log(messageService(), name());
92 log << MSG::INFO << "RawDataProviderSvc::finalize()" << endreq;
93
94 return StatusCode::SUCCESS;
95}

◆ getEmcDigiVec()

EmcDigiCol & RawDataProviderSvc::getEmcDigiVec ( uint32_t  control)
inlinevirtual

Implements IRawDataProviderSvc.

Definition at line 40 of file RawDataProviderSvc.h.

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

◆ getEmcProvider()

EmcRawDataProvider * RawDataProviderSvc::getEmcProvider ( )
inlinevirtual

Implements IRawDataProviderSvc.

Definition at line 44 of file RawDataProviderSvc.h.

44{ return m_emcProvider; }

◆ getMdcDigiVec()

◆ getMdcProvider()

MdcRawDataProvider * RawDataProviderSvc::getMdcProvider ( )
inlinevirtual

Implements IRawDataProviderSvc.

Definition at line 42 of file RawDataProviderSvc.h.

42{ return m_mdcProvider; }

◆ getTofProvider()

TofRawDataProvider * RawDataProviderSvc::getTofProvider ( )
inlinevirtual

Implements IRawDataProviderSvc.

Definition at line 43 of file RawDataProviderSvc.h.

43{ return m_tofProvider; }

◆ handle()

void RawDataProviderSvc::handle ( const Incident &  inc)

Definition at line 108 of file RawDataProviderSvc.cxx.

108 {
109 MsgStream log( messageService(), name() );
110 log << MSG::DEBUG << "handle: " << inc.type() << endreq;
111 if ( inc.type() == "BeginEvent" ){
112 log << MSG::DEBUG << "Begin Event" << endreq;
113 m_tofProvider->handle( inc );
114 m_emcProvider->handle( inc );
115 m_mdcProvider->handle( inc );
116 }
117}
void handle(const Incident &)
void handle(const Incident &)
void handle(const Incident &)

◆ initialize()

StatusCode RawDataProviderSvc::initialize ( )
virtual

Definition at line 49 of file RawDataProviderSvc.cxx.

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

◆ isOnlineMode()

bool RawDataProviderSvc::isOnlineMode ( )
inlinevirtual

Implements IRawDataProviderSvc.

Definition at line 45 of file RawDataProviderSvc.h.

45{ return m_onlineMode; }

◆ queryInterface()

StatusCode RawDataProviderSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
virtual

Definition at line 97 of file RawDataProviderSvc.cxx.

98{
99 if ( IRawDataProviderSvc::interfaceID().versionMatch(riid) ) {
100 *ppvInterface = (IRawDataProviderSvc*)this;
101 }else{
102 return Service::queryInterface(riid, ppvInterface);
103 }
104 addRef();
105 return StatusCode::SUCCESS;
106}
static const InterfaceID & interfaceID()

◆ tofDataMapEmc()

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

Implements IRawDataProviderSvc.

Definition at line 37 of file RawDataProviderSvc.h.

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

◆ tofDataMapEstime()

TofDataMap & RawDataProviderSvc::tofDataMapEstime ( )
inlinevirtual

Implements IRawDataProviderSvc.

Definition at line 33 of file RawDataProviderSvc.h.

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

◆ tofDataMapOnlineMode()

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

Implements IRawDataProviderSvc.

Definition at line 31 of file RawDataProviderSvc.h.

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

◆ tofDataMapTof()

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

Implements IRawDataProviderSvc.

Definition at line 35 of file RawDataProviderSvc.h.

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

◆ tofDataVectorEmc()

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

Implements IRawDataProviderSvc.

Definition at line 38 of file RawDataProviderSvc.h.

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

◆ tofDataVectorEstime()

TofDataVector & RawDataProviderSvc::tofDataVectorEstime ( )
inlinevirtual

Implements IRawDataProviderSvc.

Definition at line 34 of file RawDataProviderSvc.h.

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

◆ tofDataVectorOnlineMode()

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

Implements IRawDataProviderSvc.

Definition at line 32 of file RawDataProviderSvc.h.

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

◆ tofDataVectorTof()

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

Implements IRawDataProviderSvc.

Definition at line 36 of file RawDataProviderSvc.h.

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

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