BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
DedxSimSvc Class Reference

#include <DedxSimSvc.h>

+ Inheritance diagram for DedxSimSvc:

Public Member Functions

 DedxSimSvc (const std::string &name, ISvcLocator *svcloc)
 
 ~DedxSimSvc ()
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown)
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
void handle (const Incident &)
 
int getVersion ()
 
int gethistNo ()
 
int getRangeNo ()
 
int getThetaNo ()
 
std::vector< TH1F > * getHist ()
 
std::vector< double > * getRange ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 17 of file DedxSimSvc.h.

Constructor & Destructor Documentation

◆ DedxSimSvc()

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

Definition at line 32 of file DedxSimSvc.cxx.

32 :
33 Service (name, svcloc) {
34 }

◆ ~DedxSimSvc()

DedxSimSvc::~DedxSimSvc ( )

Definition at line 36 of file DedxSimSvc.cxx.

36 {
37}

Member Function Documentation

◆ finalize()

StatusCode DedxSimSvc::finalize ( )
virtual

Definition at line 78 of file DedxSimSvc.cxx.

78 {
79 MsgStream log(messageService(), name());
80 log << MSG::INFO << name() << "DedxSimSvc::finalize()" << endreq;
81 return StatusCode::SUCCESS;
82}

◆ getHist()

std::vector< TH1F > * DedxSimSvc::getHist ( )
inline

Definition at line 32 of file DedxSimSvc.h.

32{ return m_dedx_hists;}

◆ gethistNo()

int DedxSimSvc::gethistNo ( )
inline

Definition at line 29 of file DedxSimSvc.h.

29{return m_numDedxHists;}

◆ getRange()

std::vector< double > * DedxSimSvc::getRange ( )
inline

Definition at line 33 of file DedxSimSvc.h.

33{ return m_bgRange;}

◆ getRangeNo()

int DedxSimSvc::getRangeNo ( )
inline

Definition at line 30 of file DedxSimSvc.h.

30{return m_numBg;}

◆ getThetaNo()

int DedxSimSvc::getThetaNo ( )
inline

Definition at line 31 of file DedxSimSvc.h.

31{ return m_numTheta;}

◆ getVersion()

int DedxSimSvc::getVersion ( )
inline

Definition at line 28 of file DedxSimSvc.h.

28{return m_version;}

◆ handle()

void DedxSimSvc::handle ( const Incident &  inc)

Definition at line 84 of file DedxSimSvc.cxx.

84 {
85 MsgStream log( messageService(), name() );
86 log << MSG::DEBUG << "handle: " << inc.type() << endreq;
87
88 if ( inc.type() == "NewRun" ){
89 log << MSG::DEBUG << "New Run" << endreq;
90 SmartDataPtr<Event::EventHeader> evt(m_eventSvc,"/Event/EventHeader");
91 int runNo;
92 if( evt ){
93 runNo = evt -> runNumber();
94 log << MSG::DEBUG <<"The runNumber of current event is "<<runNo<<endreq;
95 }
96 else{
97 log << MSG::ERROR << "ERROR accessing Event" <<endreq;
98 }
99 if(runNo<m_runfrom || runNo>m_runto){
100 update_param_svc();
101 }
102 }
103}
int runNo
Definition: DQA_TO_DB.cxx:12

◆ initialize()

StatusCode DedxSimSvc::initialize ( )
virtual

Definition at line 48 of file DedxSimSvc.cxx.

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

◆ queryInterface()

StatusCode DedxSimSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvUnknown 
)
virtual

Definition at line 39 of file DedxSimSvc.cxx.

39 {
40 if( IID_IDedxSimSvc.versionMatch(riid) ){
41 *ppvInterface = static_cast<IDedxSimSvc*> (this);
42 } else{
43 return Service::queryInterface(riid, ppvInterface);
44 }
45 return StatusCode::SUCCESS;
46}

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