BOSS 7.1.0
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 initialize ()
 
virtual StatusCode finalize ()
 
void handle (const Incident &)
 
int getVersion ()
 
int gethistNo ()
 
int getRangeNo ()
 
int getThetaNo ()
 
std::vector< TH1F > * getHist ()
 
std::vector< double > * getRange ()
 

Detailed Description

Definition at line 18 of file DedxSimSvc.h.

Constructor & Destructor Documentation

◆ DedxSimSvc()

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

Definition at line 33 of file DedxSimSvc.cxx.

33 : base_class(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 79 of file DedxSimSvc.cxx.

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

◆ getHist()

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

Definition at line 33 of file DedxSimSvc.h.

33{ return m_dedx_hists;}

◆ gethistNo()

int DedxSimSvc::gethistNo ( )
inline

Definition at line 30 of file DedxSimSvc.h.

30{return m_numDedxHists;}

◆ getRange()

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

Definition at line 34 of file DedxSimSvc.h.

34{ return m_bgRange;}

◆ getRangeNo()

int DedxSimSvc::getRangeNo ( )
inline

Definition at line 31 of file DedxSimSvc.h.

31{return m_numBg;}

◆ getThetaNo()

int DedxSimSvc::getThetaNo ( )
inline

Definition at line 32 of file DedxSimSvc.h.

32{ return m_numTheta;}

◆ getVersion()

int DedxSimSvc::getVersion ( )
inline

Definition at line 29 of file DedxSimSvc.h.

29{return m_version;}

◆ handle()

void DedxSimSvc::handle ( const Incident &  inc)

Definition at line 85 of file DedxSimSvc.cxx.

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

◆ initialize()

StatusCode DedxSimSvc::initialize ( )
virtual

Definition at line 49 of file DedxSimSvc.cxx.

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

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