Belle II Software development
DBRepresentationOfSoftwareTriggerCut Class Reference

Class to handle storing SoftwareTriggerCuts in the database. More...

#include <DBRepresentationOfSoftwareTriggerCut.h>

Inheritance diagram for DBRepresentationOfSoftwareTriggerCut:
SoftwareTriggerCutBase

Public Member Functions

 DBRepresentationOfSoftwareTriggerCut ()=default
 Default constructor for ROOT.
 
 DBRepresentationOfSoftwareTriggerCut (unsigned int preScaleFactor, const bool &isRejectCut, const std::string &cutString)
 Constructor from the three components pre scale factor, reject flag and cut string.
 
const std::string & getCutString () const
 Return the cut string stored in this db representation.
 
unsigned int getPreScaleFactor () const
 Return the list of pre scale factors.
 
bool isRejectCut () const
 Returns true, if the cut is a reject cut and false otherwise.
 

Private Member Functions

 ClassDef (DBRepresentationOfSoftwareTriggerCut, 2)
 Make this class ready for ROOT.
 

Private Attributes

std::string m_cutString = ""
 The internal storage of the string representation of the cut.
 
std::vector< unsigned int > m_preScaleFactor = {1}
 The internal storage of the prescale factor of the cut. In former times, this was a vector but is not used anymore (only single entry)
 
bool m_isRejectCut = false
 The internal storage if it is a reject cut.
 

Detailed Description

Class to handle storing SoftwareTriggerCuts in the database.

As we do not want to upload cuts themselve (with all their dependencies and pointers), we decompile them back into a string and save only the string along with the prescale factor. When using the cut, they are recompiled back into a cut from the string representation.

Definition at line 26 of file DBRepresentationOfSoftwareTriggerCut.h.

Constructor & Destructor Documentation

◆ DBRepresentationOfSoftwareTriggerCut()

DBRepresentationOfSoftwareTriggerCut ( unsigned int  preScaleFactor,
const bool &  isRejectCut,
const std::string &  cutString 
)
inline

Constructor from the three components pre scale factor, reject flag and cut string.

Definition at line 32 of file DBRepresentationOfSoftwareTriggerCut.h.

32 :
33 SoftwareTriggerCutBase(preScaleFactor, isRejectCut), m_cutString(cutString) {}
std::string m_cutString
The internal storage of the string representation of the cut.
SoftwareTriggerCutBase(unsigned int preScaleFactor=1, const bool &isRejectCut=false)
Create a new base instance. This should rarely be called by yourself.
bool isRejectCut() const
Returns true, if the cut is a reject cut and false otherwise.

Member Function Documentation

◆ getCutString()

const std::string & getCutString ( ) const
inline

Return the cut string stored in this db representation.

Definition at line 36 of file DBRepresentationOfSoftwareTriggerCut.h.

37 {
38 return m_cutString;
39 }

◆ getPreScaleFactor()

unsigned int getPreScaleFactor ( ) const
inlineinherited

Return the list of pre scale factors.

Definition at line 34 of file SoftwareTriggerCutBase.h.

35 {
36 B2ASSERT("Prescale factor should only have a single entry!", m_preScaleFactor.size() == 1);
37 return m_preScaleFactor[0];
38 }
std::vector< unsigned int > m_preScaleFactor
The internal storage of the prescale factor of the cut. In former times, this was a vector but is not...

◆ isRejectCut()

bool isRejectCut ( ) const
inlineinherited

Returns true, if the cut is a reject cut and false otherwise.

Definition at line 41 of file SoftwareTriggerCutBase.h.

42 {
43 return m_isRejectCut;
44 }
bool m_isRejectCut
The internal storage if it is a reject cut.

Member Data Documentation

◆ m_cutString

std::string m_cutString = ""
private

The internal storage of the string representation of the cut.

Definition at line 42 of file DBRepresentationOfSoftwareTriggerCut.h.

◆ m_isRejectCut

bool m_isRejectCut = false
privateinherited

The internal storage if it is a reject cut.

Definition at line 55 of file SoftwareTriggerCutBase.h.

◆ m_preScaleFactor

std::vector<unsigned int> m_preScaleFactor = {1}
privateinherited

The internal storage of the prescale factor of the cut. In former times, this was a vector but is not used anymore (only single entry)

Definition at line 53 of file SoftwareTriggerCutBase.h.


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