Belle II Software development
RunInfo Class Reference

Database object for Run Information. More...

#include <RunInfo.h>

Inheritance diagram for RunInfo:

Public Member Functions

 RunInfo ()
 Default constructor.
 
void setExp (unsigned int exp)
 Set Experimental Number.
 
void setRun (unsigned int run)
 Set Run Number.
 
void setRunType (const std::string &run_type)
 Set Run Type.
 
void setStartTime (unsigned long long int start_time)
 Set Run Start time (Epoch time)
 
void setStopTime (unsigned long long int stop_time)
 Set Run Stop time (Epoch time)
 
void setReceivedNevent (unsigned int received_nevent)
 Set No.
 
void setAcceptedNevent (unsigned int accepted_nevent)
 Set No.
 
void setSentNevent (unsigned int sent_nevent)
 Set No.
 
void setRunLength (unsigned int run_length)
 Set Run length (in sec) by DAQ.
 
void setTriggerRate (double trigger_rate)
 Set Trigger rate (in Hz)
 
void setBelle2Detector (unsigned int pxd, unsigned int svd, unsigned int cdc, unsigned int top, unsigned int arich, unsigned int ecl, unsigned int klm)
 Set DetectorSet based on which sub-detectors is included.
 
void setBadRun (unsigned int bad_run)
 Set Bad run tag (=0 means good run)
 
void setPreScaleTrigger (unsigned int prescaleTrigger, int bit)
 Set L1 preScale Trigger factors.
 
unsigned int getExp () const
 Get Experiment number.
 
unsigned int getRun () const
 Get Run number.
 
const std::string & getRunType () const
 Get Run type.
 
unsigned long long int getStartTime () const
 Get Run start time (Epoch time)
 
unsigned long long int getStopTime () const
 Get Run stop time (Epoch time)
 
unsigned int getReceivedNevent () const
 Get No.
 
unsigned int getAcceptedNevent () const
 Get No.
 
unsigned int getSentNevent () const
 Get No.
 
unsigned int getRunLength () const
 Get Run length (in sec) by DAQ.
 
double getTriggerRate () const
 Get Trigger rate (Hz)
 
unsigned int getBadRun () const
 Get Bad run tag.
 
Const::DetectorSet getBelle2Detector () const
 Get DetectorSet for the subdetectors included in the set.
 
unsigned int getPreScaleTrigger (int bit) const
 Get L1 preScale Trigger factors.
 
virtual void Print (Option_t *option="") const override
 Print the content value.
 

Private Member Functions

 ClassDefOverride (RunInfo, 2)
 ClassDef.
 

Private Attributes

unsigned int m_exp {0}
 Experiment Number.
 
unsigned int m_run {0}
 Run Number.
 
std::string m_runType {""}
 Run type

 
unsigned long long int m_startTime {0}
 Run start time (Epoch time)
 
unsigned long long int m_stopTime {0}
 Run stop time (Epoch time)
 
unsigned int m_receivedNevent {0}
 No.
 
unsigned int m_acceptedNevent {0}
 Get No.
 
unsigned int m_sentNevent {0}
 No.
 
double m_triggerRate {0}
 Trigger rate (in Hz)
 
unsigned int m_runLength {0}
 Run length (in sec) by DAQ.
 
unsigned int m_badRun {0}
 Bad run tag (=0 means good run)
 
Const::DetectorSet m_Belle2Detector
 DetectorSet for the sub-detector used.
 
unsigned int m_prescaleTrigger [192] = {0}
 L1 Trigger Prescale factors.
 

Detailed Description

Database object for Run Information.

Definition at line 24 of file RunInfo.h.

Constructor & Destructor Documentation

◆ RunInfo()

RunInfo ( )
inline

Default constructor.

Definition at line 30 of file RunInfo.h.

30{}

Member Function Documentation

◆ getAcceptedNevent()

unsigned int getAcceptedNevent ( ) const
inline

Get No.

of events triggered

Definition at line 163 of file RunInfo.h.

163{ return m_acceptedNevent; }
unsigned int m_acceptedNevent
Get No.
Definition: RunInfo.h:234

◆ getBadRun()

unsigned int getBadRun ( ) const
inline

Get Bad run tag.

Definition at line 184 of file RunInfo.h.

184{ return m_badRun; }
unsigned int m_badRun
Bad run tag (=0 means good run)
Definition: RunInfo.h:246

◆ getBelle2Detector()

Const::DetectorSet getBelle2Detector ( ) const
inline

Get DetectorSet for the subdetectors included in the set.

Definition at line 190 of file RunInfo.h.

190{ return m_Belle2Detector;}
Const::DetectorSet m_Belle2Detector
DetectorSet for the sub-detector used.
Definition: RunInfo.h:249

◆ getExp()

unsigned int getExp ( ) const
inline

Get Experiment number.

Definition at line 132 of file RunInfo.h.

132{ return m_exp; }
unsigned int m_exp
Experiment Number.
Definition: RunInfo.h:216

◆ getPreScaleTrigger()

unsigned int getPreScaleTrigger ( int  bit) const
inline

Get L1 preScale Trigger factors.

Definition at line 196 of file RunInfo.h.

197 {
198 if (bit > -1 && bit < 192) {
199 return m_prescaleTrigger[bit];
200 } else {
201 B2FATAL("getPreScaleTrigger Error : " << bit << " not a valid range. \n Terminate");
202 }
203 }
unsigned int m_prescaleTrigger[192]
L1 Trigger Prescale factors.
Definition: RunInfo.h:252

◆ getReceivedNevent()

unsigned int getReceivedNevent ( ) const
inline

Get No.

of events HLT processed

Definition at line 158 of file RunInfo.h.

158{ return m_receivedNevent; }
unsigned int m_receivedNevent
No.
Definition: RunInfo.h:231

◆ getRun()

unsigned int getRun ( ) const
inline

Get Run number.

Definition at line 137 of file RunInfo.h.

137{ return m_run; }
unsigned int m_run
Run Number.
Definition: RunInfo.h:219

◆ getRunLength()

unsigned int getRunLength ( ) const
inline

Get Run length (in sec) by DAQ.

Definition at line 173 of file RunInfo.h.

173{ return m_runLength; }
unsigned int m_runLength
Run length (in sec) by DAQ.
Definition: RunInfo.h:243

◆ getRunType()

const std::string & getRunType ( ) const
inline

Get Run type.

Definition at line 142 of file RunInfo.h.

142{return m_runType;}
std::string m_runType
Run type
Definition: RunInfo.h:222

◆ getSentNevent()

unsigned int getSentNevent ( ) const
inline

Get No.

of events recorded

Definition at line 168 of file RunInfo.h.

168{ return m_sentNevent; }
unsigned int m_sentNevent
No.
Definition: RunInfo.h:237

◆ getStartTime()

unsigned long long int getStartTime ( ) const
inline

Get Run start time (Epoch time)

Definition at line 147 of file RunInfo.h.

147{ return m_startTime; }
unsigned long long int m_startTime
Run start time (Epoch time)
Definition: RunInfo.h:225

◆ getStopTime()

unsigned long long int getStopTime ( ) const
inline

Get Run stop time (Epoch time)

Definition at line 153 of file RunInfo.h.

153{ return m_stopTime; }
unsigned long long int m_stopTime
Run stop time (Epoch time)
Definition: RunInfo.h:228

◆ getTriggerRate()

double getTriggerRate ( ) const
inline

Get Trigger rate (Hz)

Definition at line 178 of file RunInfo.h.

178{ return m_triggerRate; }
double m_triggerRate
Trigger rate (in Hz)
Definition: RunInfo.h:240

◆ Print()

void Print ( Option_t *  option = "") const
overridevirtual

Print the content value.

Definition at line 19 of file RunInfo.cc.

20{
21 std::cout << " " << std::endl;
22 std::cout << "Run Summary" << std::endl;
23 std::cout << " Exp " << m_exp << ", Run " << m_run << std::endl;
24 std::cout << " Run Type " << m_runType << std::endl;
25 std::cout << " Start time " << m_startTime << ", Stop time " << m_stopTime
26 << ", Run Length " << m_runLength << ", Trigger Rate " << m_triggerRate << std::endl;
27 std::cout << " Received nevents " << m_receivedNevent << " Accepted nevents " << m_acceptedNevent
28 << ", Sent nevents " << m_sentNevent << std::endl;
29
30 std::cout << "Detector used " << std::endl;
31 for (const Const::EDetector& det : m_Belle2Detector) {
32 std::cout << det << " : " ;
33 }
34 std::cout << std::endl;
35
36
37}
EDetector
Enum for identifying the detector components (detector and subdetector).
Definition: Const.h:42

◆ setAcceptedNevent()

void setAcceptedNevent ( unsigned int  accepted_nevent)
inline

Set No.

of events triggered

Definition at line 65 of file RunInfo.h.

65{m_acceptedNevent = accepted_nevent; }

◆ setBadRun()

void setBadRun ( unsigned int  bad_run)
inline

Set Bad run tag (=0 means good run)

Definition at line 112 of file RunInfo.h.

112{m_badRun = bad_run; }

◆ setBelle2Detector()

void setBelle2Detector ( unsigned int  pxd,
unsigned int  svd,
unsigned int  cdc,
unsigned int  top,
unsigned int  arich,
unsigned int  ecl,
unsigned int  klm 
)
inline

Set DetectorSet based on which sub-detectors is included.

Definition at line 86 of file RunInfo.h.

90 {
91 if (pxd > 0)
92 m_Belle2Detector = m_Belle2Detector + Const::PXD ;
93 if (svd > 0)
94 m_Belle2Detector = m_Belle2Detector + Const::SVD ;
95 if (cdc > 0)
96 m_Belle2Detector = m_Belle2Detector + Const::CDC ;
97 if (top > 0)
98 m_Belle2Detector = m_Belle2Detector + Const::TOP ;
99 if (arich > 0)
100 m_Belle2Detector = m_Belle2Detector + Const::ARICH ;
101 if (ecl > 0)
102 m_Belle2Detector = m_Belle2Detector + Const::ECL ;
103 if (klm > 0)
104 m_Belle2Detector = m_Belle2Detector + Const::KLM ;
105 }

◆ setExp()

void setExp ( unsigned int  exp)
inline

Set Experimental Number.

Definition at line 35 of file RunInfo.h.

35{ m_exp = exp; }

◆ setPreScaleTrigger()

void setPreScaleTrigger ( unsigned int  prescaleTrigger,
int  bit 
)
inline

Set L1 preScale Trigger factors.

Definition at line 118 of file RunInfo.h.

119 {
120 if (bit > -1 && bit < 192) {
121 m_prescaleTrigger[bit] = prescaleTrigger;
122 } else {
123 B2FATAL("setPreScaleTrigger Error : " << bit << " not a valid range. \n Terminate");
124 }
125 }

◆ setReceivedNevent()

void setReceivedNevent ( unsigned int  received_nevent)
inline

Set No.

of events HLT processed

Definition at line 60 of file RunInfo.h.

60{m_receivedNevent = received_nevent; }

◆ setRun()

void setRun ( unsigned int  run)
inline

Set Run Number.

Definition at line 40 of file RunInfo.h.

40{ m_run = run; }

◆ setRunLength()

void setRunLength ( unsigned int  run_length)
inline

Set Run length (in sec) by DAQ.

Definition at line 75 of file RunInfo.h.

75{ m_runLength = run_length; }

◆ setRunType()

void setRunType ( const std::string &  run_type)
inline

Set Run Type.

Definition at line 45 of file RunInfo.h.

45{m_runType = run_type;}

◆ setSentNevent()

void setSentNevent ( unsigned int  sent_nevent)
inline

Set No.

of events recorded

Definition at line 70 of file RunInfo.h.

70{m_sentNevent = sent_nevent; }

◆ setStartTime()

void setStartTime ( unsigned long long int  start_time)
inline

Set Run Start time (Epoch time)

Definition at line 50 of file RunInfo.h.

50{ m_startTime = start_time; }

◆ setStopTime()

void setStopTime ( unsigned long long int  stop_time)
inline

Set Run Stop time (Epoch time)

Definition at line 55 of file RunInfo.h.

55{ m_stopTime = stop_time; }

◆ setTriggerRate()

void setTriggerRate ( double  trigger_rate)
inline

Set Trigger rate (in Hz)

Definition at line 80 of file RunInfo.h.

80{ m_triggerRate = trigger_rate; }

Member Data Documentation

◆ m_acceptedNevent

unsigned int m_acceptedNevent {0}
private

Get No.

of events triggered

Definition at line 234 of file RunInfo.h.

◆ m_badRun

unsigned int m_badRun {0}
private

Bad run tag (=0 means good run)

Definition at line 246 of file RunInfo.h.

◆ m_Belle2Detector

Const::DetectorSet m_Belle2Detector
private

DetectorSet for the sub-detector used.

Definition at line 249 of file RunInfo.h.

◆ m_exp

unsigned int m_exp {0}
private

Experiment Number.

Definition at line 216 of file RunInfo.h.

◆ m_prescaleTrigger

unsigned int m_prescaleTrigger[192] = {0}
private

L1 Trigger Prescale factors.

Definition at line 252 of file RunInfo.h.

◆ m_receivedNevent

unsigned int m_receivedNevent {0}
private

No.

of events HLT processed

Definition at line 231 of file RunInfo.h.

◆ m_run

unsigned int m_run {0}
private

Run Number.

Definition at line 219 of file RunInfo.h.

◆ m_runLength

unsigned int m_runLength {0}
private

Run length (in sec) by DAQ.

Start and Stop time are when shifter starts the run but in reality there is some difference as DAQ doesn't start immediately or can be paused during the run.

Definition at line 243 of file RunInfo.h.

◆ m_runType

std::string m_runType {""}
private

Run type

Definition at line 222 of file RunInfo.h.

◆ m_sentNevent

unsigned int m_sentNevent {0}
private

No.

of events recorded

Definition at line 237 of file RunInfo.h.

◆ m_startTime

unsigned long long int m_startTime {0}
private

Run start time (Epoch time)

Definition at line 225 of file RunInfo.h.

◆ m_stopTime

unsigned long long int m_stopTime {0}
private

Run stop time (Epoch time)

Definition at line 228 of file RunInfo.h.

◆ m_triggerRate

double m_triggerRate {0}
private

Trigger rate (in Hz)

Definition at line 240 of file RunInfo.h.


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