BOSS 8.0.0
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 24 of file RawDataProviderSvc.cxx.

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

Referenced by RawDataProviderSvc().

◆ ~RawDataProviderSvc()

RawDataProviderSvc::~RawDataProviderSvc ( )

Definition at line 44 of file RawDataProviderSvc.cxx.

44 {
45 if ( m_mdcProvider ) delete m_mdcProvider;
46 if ( m_tofProvider ) delete m_tofProvider;
47 if ( m_emcProvider ) delete m_emcProvider;
48}

Member Function Documentation

◆ finalize()

StatusCode RawDataProviderSvc::finalize ( )
virtual

Definition at line 90 of file RawDataProviderSvc.cxx.

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

◆ getEmcDigiVec()

EmcDigiCol & RawDataProviderSvc::getEmcDigiVec ( uint32_t control)
inline

Definition at line 57 of file RawDataProviderSvc.h.

57 {
58 return m_emcProvider->getEmcDigiVec( control );
59 }

◆ getEmcProvider()

EmcRawDataProvider * RawDataProviderSvc::getEmcProvider ( )
inline

Definition at line 63 of file RawDataProviderSvc.h.

63{ return m_emcProvider; }

◆ getMdcDigiVec()

MdcDigiVec & RawDataProviderSvc::getMdcDigiVec ( uint32_t control = 0)
inline

Definition at line 32 of file RawDataProviderSvc.h.

32 {
33 return m_mdcProvider->getMdcDigiVec( control );
34 }

◆ getMdcProvider()

MdcRawDataProvider * RawDataProviderSvc::getMdcProvider ( )
inline

Definition at line 61 of file RawDataProviderSvc.h.

61{ return m_mdcProvider; }

◆ getTofProvider()

TofRawDataProvider * RawDataProviderSvc::getTofProvider ( )
inline

Definition at line 62 of file RawDataProviderSvc.h.

62{ return m_tofProvider; }

◆ handle()

void RawDataProviderSvc::handle ( const Incident & inc)

Definition at line 109 of file RawDataProviderSvc.cxx.

109 {
110 MsgStream log( msgSvc(), name() );
111 log << MSG::DEBUG << "handle: " << inc.type() << endmsg;
112 if ( inc.type() == "BeginEvent" )
113 {
114 log << MSG::DEBUG << "Begin Event" << endmsg;
115 m_tofProvider->handle( inc );
116 m_emcProvider->handle( inc );
117 m_mdcProvider->handle( inc );
118 }
119}

◆ initialize()

StatusCode RawDataProviderSvc::initialize ( )
virtual

Definition at line 50 of file RawDataProviderSvc.cxx.

50 {
51 MsgStream log( msgSvc(), name() );
52 log << MSG::INFO << "RawDataProviderSvc::initialize()" << endmsg;
53
54 StatusCode sc = Service::initialize();
55 if ( sc.isFailure() ) return sc;
56
57 // tianhl for mt
58 std::string incidentSvc_name( "IncidentSvc" );
59 // if(isGaudiThreaded(name())){
60 // incidentSvc_name += getGaudiThreadIDfromName(name());
61 // }
62 // tianhl for mt
63 IIncidentSvc* incsvc;
64 sc = service( incidentSvc_name.c_str(), incsvc );
65 int priority = 100;
66 if ( sc.isSuccess() ) { incsvc->addListener( this, "BeginEvent", priority ); }
67
68 sc = m_mdcProvider->initialize();
69 if ( sc.isFailure() ) return sc;
70
71 sc = m_tofProvider->initialize( m_onlineMode );
72 if ( sc.isFailure() ) return sc;
73
74 if ( m_skipLayers.size() > 0 ) m_mdcProvider->setSkipLayers( m_skipLayers );
75 m_mdcProvider->setEffThreshold( m_effThreshold );
76 if ( m_adcThresholds.size() > 0 ) m_mdcProvider->setAdcThresholds( m_adcThresholds );
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..." << endmsg;
87 return StatusCode::SUCCESS;
88}
static int EmcChargeChannel(double charge)

◆ isOnlineMode()

bool RawDataProviderSvc::isOnlineMode ( )
inline

Definition at line 64 of file RawDataProviderSvc.h.

64{ return m_onlineMode; }

◆ tofDataMapEmc()

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

Definition at line 50 of file RawDataProviderSvc.h.

50 {
51 return m_tofProvider->tofDataMapEmc( estime );
52 }

◆ tofDataMapEstime()

TofDataMap & RawDataProviderSvc::tofDataMapEstime ( )
inline

Definition at line 42 of file RawDataProviderSvc.h.

42{ return m_tofProvider->tofDataMapEstime(); }

◆ tofDataMapOnlineMode()

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

Definition at line 36 of file RawDataProviderSvc.h.

36 {
37 return m_tofProvider->tofDataMapOnlineMode( control );
38 }

◆ tofDataMapTof()

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

Definition at line 44 of file RawDataProviderSvc.h.

44 {
45 return m_tofProvider->tofDataMapTof( estime );
46 }

◆ tofDataVectorEmc()

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

Definition at line 53 of file RawDataProviderSvc.h.

53 {
54 return m_tofProvider->tofDataVectorEmc( estime );
55 }

◆ tofDataVectorEstime()

TofDataVector & RawDataProviderSvc::tofDataVectorEstime ( )
inline

Definition at line 43 of file RawDataProviderSvc.h.

43{ return m_tofProvider->tofDataVectorEstime(); }

◆ tofDataVectorOnlineMode()

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

Definition at line 39 of file RawDataProviderSvc.h.

39 {
40 return m_tofProvider->tofDataVectorOnlineMode( control );
41 }

◆ tofDataVectorTof()

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

Definition at line 47 of file RawDataProviderSvc.h.

47 {
48 return m_tofProvider->tofDataVectorTof( estime );
49 }

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