Belle II Software development
|
Trigger Summary Information input bits input bits from subdetectors ftdl (Final Trigger Decision Logic) bits output bits of trigger logic psnm (Prescale and Mask) bits prescaled ftdl bits timType types of trigger timing source defined in b2tt firmware. More...
#include <TRGSummary.h>
Public Types | |
enum | ETimingType { TTYP_ECL = 0 , TTYP_PID1 = 4 , TTYP_PID2 = 8 , TTYP_PID3 = 12 , TTYP_SELF = 2 , TTYP_RSV1 = 6 , TTYP_RSV2 = 10 , TTYP_RSV3 = 14 , TTYP_TOP = 1 , TTYP_CDC = 3 , TTYP_DPHY = 5 , TTYP_RAND = 7 , TTYP_TEST = 9 , TTYP_RSV4 = 11 , TTYP_POIS = 13 , TTYP_NONE = 15 } |
types of trigger timing source defined in b2tt firmware More... | |
enum | ETimingQuality { TTYQ_NONE = 0 , TTYQ_CORS = 1 , TTYQ_FINE = 2 , TTYQ_SFIN = 3 } |
trigger timing type quality More... | |
Public Member Functions | |
TRGSummary ()=default | |
default constructor: xxx | |
TRGSummary (unsigned int inputBits[10], unsigned int ftdlBits[10], unsigned int psnmBits[10], ETimingType timType) | |
constructor: xxx | |
bool | test () const |
check whether any psnm bit is set | |
bool | testInput (unsigned int bit) const |
check whether an input bit is set | |
bool | testInput (const std::string &name) const |
check whether an input bit is set | |
bool | testFtdl (unsigned int bit) const |
check whether a ftdl bit is set | |
bool | testFtdl (const std::string &name) const |
check whether a ftdl bit is set | |
bool | testPsnm (unsigned int bit) const |
check whether a psnm bit is set | |
bool | testPsnm (const std::string &name) const |
check whether a psnm bit is set | |
bool | isPoissonInInjectionVeto () const |
check whether poisson random trigger is within injection veto | |
void | setPoissonInInjectionVeto () |
set true if poisson random trigger is within injection veto | |
void | setTRGSummary (int i, int word) |
set the Final Trigger Decision Logic bit | |
void | setPreScale (int i, int bit, int pre) |
set the prescale factor of each bit | |
void | setInputBits (int i, int word) |
set the input bits | |
void | setFtdlBits (int i, int word) |
set the ftdl bits, the same as setTRGSummary(int i, int word) | |
void | setPsnmBits (int i, int word) |
set the Prescaled ftdl bits | |
unsigned int | getTRGSummary (int i) const |
get the trigger result, each word has 32 bits | |
unsigned int | getPreScale (int i, int bit) const |
get the prescale factor which the bit is corresponding | |
void | setTimType (ETimingType timType) |
set the timType | |
void | setTimQuality (ETimingQuality timQuality) |
set the timQuality | |
unsigned int | getInputBits (const unsigned i) const |
get input bits | |
unsigned int | getFtdlBits (const unsigned i) const |
get ftdl bits (directly determined by the trigger conditions) | |
unsigned int | getPsnmBits (const unsigned i) const |
get psnm bits (prescaled ftdl bits) | |
ETimingType | getTimType () const |
get timing source information | |
ETimingQuality | getTimQuality () const |
get timing source quality | |
std::string | getInfoHTML () const override |
Return a short summary of this object's contents in HTML format. | |
unsigned int | getInputBitNumber (const std::string &name) const |
get number of an input trigger bit | |
unsigned int | getOutputBitNumber (const std::string &name) const |
get number of an output trigger bit | |
void | addRelationTo (const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const |
Add a relation from this object to another object (with caching). | |
void | addRelationTo (const TObject *object, float weight=1.0, const std::string &namedRelation="") const |
Add a relation from this object to another object (no caching, can be quite slow). | |
void | copyRelations (const RelationsInterface< BASE > *sourceObj) |
Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). | |
template<class TO > | |
RelationVector< TO > | getRelationsTo (const std::string &name="", const std::string &namedRelation="") const |
Get the relations that point from this object to another store array. | |
template<class FROM > | |
RelationVector< FROM > | getRelationsFrom (const std::string &name="", const std::string &namedRelation="") const |
Get the relations that point from another store array to this object. | |
template<class T > | |
RelationVector< T > | getRelationsWith (const std::string &name="", const std::string &namedRelation="") const |
Get the relations between this object and another store array. | |
template<class TO > | |
TO * | getRelatedTo (const std::string &name="", const std::string &namedRelation="") const |
Get the object to which this object has a relation. | |
template<class FROM > | |
FROM * | getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const |
Get the object from which this object has a relation. | |
template<class T > | |
T * | getRelated (const std::string &name="", const std::string &namedRelation="") const |
Get the object to or from which this object has a relation. | |
template<class TO > | |
std::pair< TO *, float > | getRelatedToWithWeight (const std::string &name="", const std::string &namedRelation="") const |
Get first related object & weight of relation pointing to an array. | |
template<class FROM > | |
std::pair< FROM *, float > | getRelatedFromWithWeight (const std::string &name="", const std::string &namedRelation="") const |
Get first related object & weight of relation pointing from an array. | |
template<class T > | |
std::pair< T *, float > | getRelatedWithWeight (const std::string &name="", const std::string &namedRelation="") const |
Get first related object & weight of relation pointing from/to an array. | |
virtual std::string | getName () const |
Return a short name that describes this object, e.g. | |
std::string | getInfo () const |
Return a short summary of this object's contents in raw text format. | |
std::string | getArrayName () const |
Get name of array this object is stored in, or "" if not found. | |
int | getArrayIndex () const |
Returns this object's array index (in StoreArray), or -1 if not found. | |
Static Public Attributes | |
static const unsigned int | c_trgWordSize = 32 |
size of a l1 trigger word | |
static const unsigned int | c_ntrgWords = 10 |
number of l1 trigger words | |
Protected Member Functions | |
TClonesArray * | getArrayPointer () const |
Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse). | |
Private Member Functions | |
std::string | outputBitWithColor (bool bit) const |
return the td part of an HTML table with green of the bit is > 0 | |
ClassDefOverride (TRGSummary, 7) | |
Trigger Summary Information including bit (input, ftdl, psnm), timing and trigger source. | |
ClassDef (RelationsInterface, 0) | |
defines interface for accessing relations of objects in StoreArray. | |
Private Attributes | |
unsigned int | m_inputBits [c_ntrgWords] = {0} |
input bits from subdetectors | |
unsigned int | m_ftdlBits [c_ntrgWords] = {0} |
ftdl (Final Trigger Decision Logic) bits. | |
unsigned int | m_psnmBits [c_ntrgWords] = {0} |
psnm (PreScale aNd Mask) bits. | |
ETimingType | m_timType = TTYP_NONE |
types of trigger timing source defined in b2tt firmware | |
ETimingQuality | m_timQuality = TTYQ_NONE |
trigger timing type quality | |
unsigned int | m_prescaleBits [c_ntrgWords][c_trgWordSize] = {{0}} |
the prescale factor of each bit | |
bool | m_isPoissonInInjectionVeto = false |
Poisson random trigger in injection veto or not. | |
DataStore::StoreEntry * | m_cacheDataStoreEntry |
Cache of the data store entry to which this object belongs. | |
int | m_cacheArrayIndex |
Cache of the index in the TClonesArray to which this object belongs. | |
Static Private Attributes | |
static const int | c_Version = 1 |
version of this code | |
Trigger Summary Information input bits input bits from subdetectors ftdl (Final Trigger Decision Logic) bits output bits of trigger logic psnm (Prescale and Mask) bits prescaled ftdl bits timType types of trigger timing source defined in b2tt firmware.
Definition at line 32 of file TRGSummary.h.
enum ETimingQuality |
trigger timing type quality
Definition at line 79 of file TRGSummary.h.
enum ETimingType |
types of trigger timing source defined in b2tt firmware
Enumerator | |
---|---|
TTYP_ECL | events triggered by ECL timing |
TTYP_PID1 | reserved (not defined yet) |
TTYP_PID2 | reserved (not defined yet) |
TTYP_PID3 | reserved (not defined yet) |
TTYP_SELF | events triggered by self trigger |
TTYP_RSV1 | reserved (not defined yet) |
TTYP_RSV2 | reserved (not defined yet) |
TTYP_RSV3 | reserved (not defined yet) |
TTYP_TOP | events triggered by TOP timing |
TTYP_CDC | events triggered by CDC timing |
TTYP_DPHY | delayed physics events for background |
TTYP_RAND | random trigger events |
TTYP_TEST | test pulse input |
TTYP_RSV4 | reserved (not defined yet) |
TTYP_POIS | poisson random trigger |
TTYP_NONE | reserved (not defined yet) |
Definition at line 43 of file TRGSummary.h.
TRGSummary | ( | unsigned int | inputBits[10], |
unsigned int | ftdlBits[10], | ||
unsigned int | psnmBits[10], | ||
ETimingType | timType | ||
) |
constructor: xxx
Definition at line 23 of file TRGSummary.cc.
|
inlineinherited |
Add a relation from this object to another object (with caching).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 142 of file RelationsObject.h.
|
inlineinherited |
Add a relation from this object to another object (no caching, can be quite slow).
object | The object to which the relation should point. |
weight | The weight of the relation. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 155 of file RelationsObject.h.
|
inlineinherited |
Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights).
Useful if you want to make a complete copy of a StoreArray object to make modifications to it, but retain all information on linked objects.
Note: this only works if sourceObj inherits from the same base (e.g. RelationsObject), and only for related objects that also inherit from the same base.
Definition at line 170 of file RelationsObject.h.
|
inlineinherited |
Returns this object's array index (in StoreArray), or -1 if not found.
Definition at line 385 of file RelationsObject.h.
|
inlineinherited |
Get name of array this object is stored in, or "" if not found.
Definition at line 377 of file RelationsObject.h.
|
inlineprotectedinherited |
Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
Definition at line 418 of file RelationsObject.h.
|
inline |
get ftdl bits (directly determined by the trigger conditions)
i | index: 0, 1, 2 for bit 0-31, 32-63, 64-95, respectively. |
Definition at line 195 of file TRGSummary.h.
|
inlineinherited |
Return a short summary of this object's contents in raw text format.
Returns the contents of getInfoHTML() while translating line-breaks etc.
Definition at line 370 of file RelationsObject.h.
|
overridevirtual |
Return a short summary of this object's contents in HTML format.
Reimplemented from RelationsInterface< BASE >.
Definition at line 124 of file TRGSummary.cc.
unsigned int getInputBitNumber | ( | const std::string & | name | ) | const |
get number of an input trigger bit
name | input trigger bit name |
Definition at line 77 of file TRGSummary.cc.
|
inline |
get input bits
i | index: 0, 1, 2 for bit 0-31, 32-63, 64-95, respectively. |
Definition at line 186 of file TRGSummary.h.
|
inlinevirtualinherited |
Return a short name that describes this object, e.g.
pi+ for an MCParticle.
Reimplemented in Particle, MCParticle, and SpacePoint.
Definition at line 344 of file RelationsObject.h.
unsigned int getOutputBitNumber | ( | const std::string & | name | ) | const |
get number of an output trigger bit
name | output trigger bit name |
Definition at line 99 of file TRGSummary.cc.
|
inline |
get the prescale factor which the bit is corresponding
Definition at line 174 of file TRGSummary.h.
|
inline |
get psnm bits (prescaled ftdl bits)
i | index: 0, 1, 2 for bit 0-31, 32-63, 64-95, respectively. |
Definition at line 204 of file TRGSummary.h.
|
inlineinherited |
Get the object to or from which this object has a relation.
T | The class of objects to or from which the relation points. |
name | The name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 278 of file RelationsObject.h.
|
inlineinherited |
Get the object from which this object has a relation.
FROM | The class of objects from which the relation points. |
name | The name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 263 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from an array.
FROM | The class of objects from which the relation points. |
name | The name of the store array from which the relation points. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 314 of file RelationsObject.h.
|
inlineinherited |
Get the object to which this object has a relation.
TO | The class of objects to which the relation points. |
name | The name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 248 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing to an array.
TO | The class of objects to which the relation points. |
name | The name of the store array to which the relation points. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 297 of file RelationsObject.h.
|
inlineinherited |
Get first related object & weight of relation pointing from/to an array.
T | The class of objects to or from which the relation points. |
name | The name of the store array to or from which the relation points. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 331 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from another store array to this object.
FROM | The class of objects from which the relations point. |
name | The name of the store array from which the relations point. If empty the default store array name for class FROM will be used. If the special name "ALL" is given all store arrays containing objects of type FROM are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 212 of file RelationsObject.h.
|
inlineinherited |
Get the relations that point from this object to another store array.
TO | The class of objects to which the relations point. |
name | The name of the store array to which the relations point. If empty the default store array name for class TO will be used. If the special name "ALL" is given all store arrays containing objects of type TO are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 197 of file RelationsObject.h.
|
inlineinherited |
Get the relations between this object and another store array.
Relations in both directions are returned.
T | The class of objects to or from which the relations point. |
name | The name of the store array to or from which the relations point. If empty the default store array name for class T will be used. If the special name "ALL" is given all store arrays containing objects of type T are considered. |
namedRelation | Additional name for the relation, or "" for the default naming |
Definition at line 230 of file RelationsObject.h.
|
inline |
get timing source quality
Definition at line 220 of file TRGSummary.h.
|
inline |
get timing source information
Definition at line 212 of file TRGSummary.h.
|
inline |
|
inline |
check whether poisson random trigger is within injection veto
Definition at line 143 of file TRGSummary.h.
|
private |
return the td part of an HTML table with green of the bit is > 0
Definition at line 162 of file TRGSummary.cc.
|
inline |
set the ftdl bits, the same as setTRGSummary(int i, int word)
Definition at line 165 of file TRGSummary.h.
|
inline |
|
inline |
set true if poisson random trigger is within injection veto
Definition at line 150 of file TRGSummary.h.
|
inline |
set the prescale factor of each bit
Definition at line 159 of file TRGSummary.h.
|
inline |
|
inline |
|
inline |
|
inline |
set the Final Trigger Decision Logic bit
Definition at line 156 of file TRGSummary.h.
bool test | ( | ) | const |
check whether any psnm bit is set
Definition at line 36 of file TRGSummary.cc.
|
inline |
check whether a ftdl bit is set
name | name of ftdl bit. |
Definition at line 126 of file TRGSummary.h.
bool testFtdl | ( | unsigned int | bit | ) | const |
check whether a ftdl bit is set
bit | index of ftdl bit. |
Definition at line 55 of file TRGSummary.cc.
|
inline |
check whether an input bit is set
name | name of input bit. |
Definition at line 114 of file TRGSummary.h.
bool testInput | ( | unsigned int | bit | ) | const |
check whether an input bit is set
bit | index of input bit. |
Definition at line 44 of file TRGSummary.cc.
|
inline |
check whether a psnm bit is set
name | name of psnm bit. |
Definition at line 138 of file TRGSummary.h.
bool testPsnm | ( | unsigned int | bit | ) | const |
check whether a psnm bit is set
bit | index of psnm bit. |
Definition at line 66 of file TRGSummary.cc.
|
static |
number of l1 trigger words
Definition at line 40 of file TRGSummary.h.
|
static |
size of a l1 trigger word
Definition at line 37 of file TRGSummary.h.
|
staticprivate |
version of this code
Definition at line 248 of file TRGSummary.h.
|
mutableprivateinherited |
Cache of the index in the TClonesArray to which this object belongs.
Definition at line 432 of file RelationsObject.h.
|
mutableprivateinherited |
Cache of the data store entry to which this object belongs.
Definition at line 429 of file RelationsObject.h.
|
private |
ftdl (Final Trigger Decision Logic) bits.
Outputs of trigger logic
Definition at line 254 of file TRGSummary.h.
|
private |
input bits from subdetectors
Definition at line 251 of file TRGSummary.h.
|
private |
Poisson random trigger in injection veto or not.
Definition at line 271 of file TRGSummary.h.
|
private |
the prescale factor of each bit
Definition at line 268 of file TRGSummary.h.
|
private |
psnm (PreScale aNd Mask) bits.
Prescaled ftdl bits For instance, if the prescale factor is 20 of a ftdl bit, only 1/20 of its psnm bit would be fired.
Definition at line 259 of file TRGSummary.h.
|
private |
trigger timing type quality
Definition at line 265 of file TRGSummary.h.
|
private |
types of trigger timing source defined in b2tt firmware
Definition at line 262 of file TRGSummary.h.