Belle II Software  release-05-02-19
KLMDigitEventInfo Class Reference

Class to store debugging informations from the unpacker (event based). More...

#include <KLMDigitEventInfo.h>

Inheritance diagram for KLMDigitEventInfo:
Collaboration diagram for KLMDigitEventInfo:

Public Member Functions

 KLMDigitEventInfo ()
 Constructor.
 
 KLMDigitEventInfo (RawKLM *rawKLM, int entry)
 Constructor. More...
 
unsigned int getTriggerCTime () const
 Get trigger CTIME. More...
 
int getIntTriggerCTime () const
 Returns trigger CTIME as int. More...
 
void setTriggerCTime (unsigned int triggerCTime)
 Set trigger CTIME. More...
 
long int getTriggerInterval () const
 Returns trigger interval (triggerCTime - triggerCTimeOfPreviousEvent) More...
 
double getTriggerIntervalInUs () const
 Returns trigger interval (triggerCTime - triggerCTimeOfPreviousEvent) in us. More...
 
void setPreviousEventTriggerCTime (unsigned int triggerCTimeOfPreviousEvent)
 Set trigger CTime of previous event.
 
unsigned int getTriggerUTime () const
 Get trigger UTIME. More...
 
void setTriggerUTime (unsigned int triggerUTime)
 Set trigger UTIME.
 
unsigned int getWindowStart () const
 Get window start. More...
 
void setWindowStart (unsigned int windowStart)
 Set window start.
 
int getRPCHits () const
 Returns the number of RPC hits in the event. More...
 
void increaseRPCHits ()
 Increase by 1 the number of RPC hits in the event.
 
void increaseRPCHits (int hits)
 Increase by 'hits' the number of RPC hits in the event.
 
int getSciHits () const
 Returns the number of scintillator hits in the event. More...
 
void increaseSciHits ()
 Increase by 1 the number of scintillator hits in the event.
 
void increaseSciHits (int hits)
 Increase by 'hits' the number of scintillator hits in the event.
 
int getOutOfRangeHits () const
 Returns the number of OutOfRange-flagged hits in the event. More...
 
void increaseOutOfRangeHits ()
 Increase by 1 the number of outOfRange-flagged hits in the event.
 
void increaseOutOfRangeHits (int hits)
 Increase by 'hits' the number of outOfRange-flagged hits in the event.
 
unsigned int getRevo9TriggerWord () const
 Get revo9 trigger word (from DCs). More...
 
void setRevo9TriggerWord (unsigned int revo9TriggerWord)
 Set Revo9 trigger word (from DCs). More...
 
unsigned int getUserWord () const
 Get user word (from DCs). More...
 
void setUserWord (unsigned int userWord)
 Set user word (from DCs). More...
 
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). More...
 
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). More...
 
void copyRelations (const RelationsInterface< BASE > *sourceObj)
 Copies all relations of sourceObj (pointing from or to sourceObj) to this object (including weights). More...
 
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. More...
 
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. More...
 
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. More...
 
template<class TO >
TO * getRelatedTo (const std::string &name="", const std::string &namedRelation="") const
 Get the object to which this object has a relation. More...
 
template<class FROM >
FROM * getRelatedFrom (const std::string &name="", const std::string &namedRelation="") const
 Get the object from which this object has a relation. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual std::string getName () const
 Return a short name that describes this object, e.g. More...
 
virtual std::string getInfoHTML () const
 Return a short summary of this object's contents in HTML format. More...
 
std::string getInfo () const
 Return a short summary of this object's contents in raw text format. More...
 
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.
 

Protected Member Functions

 ClassDef (KLMDigitEventInfo, 5)
 Class version.
 
TClonesArray * getArrayPointer () const
 Returns the pointer to the raw DataStore array holding this object (protected since these arrays are easy to misuse).
 

Protected Attributes

unsigned int m_TriggerCTime
 Trigger CTime.
 
unsigned int m_triggerCTimeOfPreviousEvent
 Trigger CTime of previous event.
 
unsigned int m_triggerUTime
 Trigger UTime.
 
unsigned int m_windowStart
 Window start.
 
int m_nRPCHits
 RPC hits in the event.
 
int m_nSciHits
 Scintillator hits in the event.
 
int m_nOutOfRangeHits
 Out-of-range hits (skipped hits with layer > 14 for BKLM).
 
unsigned int m_Revo9TriggerWord
 Revo9 trigger word (from DCs).
 
unsigned int m_UserWord
 User word (from DCs)
 

Private Attributes

DataStore::StoreEntrym_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.
 

Detailed Description

Class to store debugging informations from the unpacker (event based).

Definition at line 34 of file KLMDigitEventInfo.h.

Constructor & Destructor Documentation

◆ KLMDigitEventInfo()

KLMDigitEventInfo ( RawKLM rawKLM,
int  entry 
)
inline

Constructor.

Parameters
[in]rawKLMRawKLM.
[in]entryEntry (corresponds to the data form one copper).

Definition at line 59 of file KLMDigitEventInfo.h.

61  {
62  }
63 
68  unsigned int getTriggerCTime() const
69  {
70  return m_TriggerCTime;

Member Function Documentation

◆ addRelationTo() [1/2]

void addRelationTo ( const RelationsInterface< BASE > *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (with caching).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 144 of file RelationsObject.h.

◆ addRelationTo() [2/2]

void addRelationTo ( const TObject *  object,
float  weight = 1.0,
const std::string &  namedRelation = "" 
) const
inlineinherited

Add a relation from this object to another object (no caching, can be quite slow).

Parameters
objectThe object to which the relation should point.
weightThe weight of the relation.
namedRelationAdditional name for the relation, or "" for the default naming

Definition at line 157 of file RelationsObject.h.

◆ copyRelations()

void copyRelations ( const RelationsInterface< BASE > *  sourceObj)
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 172 of file RelationsObject.h.

◆ getInfo()

std::string getInfo ( ) const
inlineinherited

Return a short summary of this object's contents in raw text format.

Returns the contents of getInfoHTML() while translating line-breaks etc.

Note
: You don't need to implement this function (it's not virtual), getInfoHTML() is enough.

Definition at line 372 of file RelationsObject.h.

◆ getInfoHTML()

virtual std::string getInfoHTML ( ) const
inlinevirtualinherited

Return a short summary of this object's contents in HTML format.

Reimplement this in your own class to provide useful output for display or debugging purposes. For example, you might do something like:

std::stringstream out;
out << "<b>PDG</b>: " << m_pdg << "<br>";
out << "<b>Covariance Matrix</b>: " << HTML::getString(getCovariance5()) << "<br>";
return out.str();
See also
Particle::getInfoHTML() for a more complex example.
HTML for some utility functions.
Use getInfo() to get a raw text version of this output.

Reimplemented in TrackFitResult, TRGSummary, Track, SoftwareTriggerResult, Particle, RecoTrack, MCParticle, Cluster, and PIDLikelihood.

Definition at line 364 of file RelationsObject.h.

◆ getIntTriggerCTime()

int getIntTriggerCTime ( ) const
inline

Returns trigger CTIME as int.

Returns
Trigger CTIME.

Definition at line 85 of file KLMDigitEventInfo.h.

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Return a short name that describes this object, e.g.

pi+ for an MCParticle.

Reimplemented in SpacePoint, Particle, and MCParticle.

Definition at line 346 of file RelationsObject.h.

◆ getOutOfRangeHits()

int getOutOfRangeHits ( ) const
inline

Returns the number of OutOfRange-flagged hits in the event.

Returns
nOutOfRangeHits

Definition at line 215 of file KLMDigitEventInfo.h.

◆ getRelated()

T* getRelated ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to or from which this object has a relation.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 280 of file RelationsObject.h.

◆ getRelatedFrom()

FROM* getRelatedFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object from which this object has a relation.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 265 of file RelationsObject.h.

◆ getRelatedFromWithWeight()

std::pair<FROM*, float> getRelatedFromWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from an array.

Template Parameters
FROMThe class of objects from which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 316 of file RelationsObject.h.

◆ getRelatedTo()

TO* getRelatedTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the object to which this object has a relation.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
The first related object or a null pointer.

Definition at line 250 of file RelationsObject.h.

◆ getRelatedToWithWeight()

std::pair<TO*, float> getRelatedToWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing to an array.

Template Parameters
TOThe class of objects to which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 299 of file RelationsObject.h.

◆ getRelatedWithWeight()

std::pair<T*, float> getRelatedWithWeight ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get first related object & weight of relation pointing from/to an array.

Template Parameters
TThe class of objects to or from which the relation points.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
Pair of first related object and the relation weight, or (NULL, 1.0) if none found.

Definition at line 333 of file RelationsObject.h.

◆ getRelationsFrom()

RelationVector<FROM> getRelationsFrom ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from another store array to this object.

Template Parameters
FROMThe class of objects from which the relations point.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 214 of file RelationsObject.h.

◆ getRelationsTo()

RelationVector<TO> getRelationsTo ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations that point from this object to another store array.

Template Parameters
TOThe class of objects to which the relations point.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 199 of file RelationsObject.h.

◆ getRelationsWith()

RelationVector<T> getRelationsWith ( const std::string &  name = "",
const std::string &  namedRelation = "" 
) const
inlineinherited

Get the relations between this object and another store array.

Relations in both directions are returned.

Template Parameters
TThe class of objects to or from which the relations point.
Parameters
nameThe 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.
namedRelationAdditional name for the relation, or "" for the default naming
Returns
A vector of relations.

Definition at line 232 of file RelationsObject.h.

◆ getRevo9TriggerWord()

unsigned int getRevo9TriggerWord ( ) const
inline

Get revo9 trigger word (from DCs).

Returns
Revo9 trigger word (from DCs).

Definition at line 240 of file KLMDigitEventInfo.h.

◆ getRPCHits()

int getRPCHits ( ) const
inline

Returns the number of RPC hits in the event.

Returns
nRPCHits

Definition at line 165 of file KLMDigitEventInfo.h.

◆ getSciHits()

int getSciHits ( ) const
inline

Returns the number of scintillator hits in the event.

Returns
nSciHits

Definition at line 190 of file KLMDigitEventInfo.h.

◆ getTriggerCTime()

unsigned int getTriggerCTime ( ) const
inline

Get trigger CTIME.

Returns
Trigger CTIME.

Definition at line 76 of file KLMDigitEventInfo.h.

◆ getTriggerInterval()

long int getTriggerInterval ( ) const
inline

Returns trigger interval (triggerCTime - triggerCTimeOfPreviousEvent)

Returns
trigger interval

Definition at line 103 of file KLMDigitEventInfo.h.

◆ getTriggerIntervalInUs()

double getTriggerIntervalInUs ( ) const
inline

Returns trigger interval (triggerCTime - triggerCTimeOfPreviousEvent) in us.

Returns
trigger interval in us

Definition at line 113 of file KLMDigitEventInfo.h.

◆ getTriggerUTime()

unsigned int getTriggerUTime ( ) const
inline

Get trigger UTIME.

Returns
Trigger UTIME.

Definition at line 131 of file KLMDigitEventInfo.h.

◆ getUserWord()

unsigned int getUserWord ( ) const
inline

Get user word (from DCs).

Returns
User word (from DCs).

Definition at line 258 of file KLMDigitEventInfo.h.

◆ getWindowStart()

unsigned int getWindowStart ( ) const
inline

Get window start.

Returns
Window start.

Definition at line 148 of file KLMDigitEventInfo.h.

◆ setRevo9TriggerWord()

void setRevo9TriggerWord ( unsigned int  revo9TriggerWord)
inline

Set Revo9 trigger word (from DCs).

Parameters
[in]revo9TriggerWordRevo9 trigger word (from DCs).

Definition at line 249 of file KLMDigitEventInfo.h.

◆ setTriggerCTime()

void setTriggerCTime ( unsigned int  triggerCTime)
inline

Set trigger CTIME.

Parameters
[in]triggerCTimeTrigger CTIME.

Definition at line 94 of file KLMDigitEventInfo.h.

◆ setUserWord()

void setUserWord ( unsigned int  userWord)
inline

Set user word (from DCs).

Parameters
[in]userWordUser word (from DCs).

Definition at line 267 of file KLMDigitEventInfo.h.


The documentation for this class was generated from the following file:
Belle2::KLMDigitEventInfo::getTriggerCTime
unsigned int getTriggerCTime() const
Get trigger CTIME.
Definition: KLMDigitEventInfo.h:76
Belle2::HTML::getString
std::string getString(const TMatrixFBase &matrix, int precision=2, bool color=true)
get HTML table representing a matrix.
Definition: HTML.cc:18
Belle2::KLMDigitEventInfo::m_TriggerCTime
unsigned int m_TriggerCTime
Trigger CTime.
Definition: KLMDigitEventInfo.h:275