Belle II Software light-2406-ragdoll
BinnedEventT0 Class Reference

Database object for storing a binned EventT0 coming from the trigger. More...

#include <BinnedEventT0.h>

Inheritance diagram for BinnedEventT0:
Collaboration diagram for BinnedEventT0:

Public Member Functions

int getBinnedEventT0 (const Const::EDetector detector) const
 Return the stored binned event t0 for the given detector or 0 if nothing stored.
 
void addBinnedEventT0 (int eventT0, Const::EDetector detector)
 Store a binned event t0 for the given detector replacing any other hypothesis for this detector.
 
bool hasBinnedEventT0 (const Const::EDetector detector) const
 Check if one of the detectors in the given set has a binned t0 estimation.
 
void clear ()
 Clear the list of extracted event T0 estimations.
 

Private Attributes

std::map< Const::EDetector, int > m_eventT0Map
 Internal storage of the event t0 list.
 

Detailed Description

Database object for storing a binned EventT0 coming from the trigger.

It stores one binned (integer) event t0 estimation for each detector, which will be replaced whenever you store a new one for the same detector.

It is only possible to extract the estimations for one detector at the time, as averaging does not make sense for the binned data (additionally, the detectors may have different time offsets unknown to this object).

It is in the responsibility of the user to calculate a floating point t0 in nanoseconds out of the integer estimations if desired.

Definition at line 33 of file BinnedEventT0.h.

Member Function Documentation

◆ addBinnedEventT0()

void addBinnedEventT0 ( int  eventT0,
Const::EDetector  detector 
)

Store a binned event t0 for the given detector replacing any other hypothesis for this detector.

Definition at line 24 of file BinnedEventT0.cc.

25{
26 m_eventT0Map[detector] = eventT0;
27}
std::map< Const::EDetector, int > m_eventT0Map
Internal storage of the event t0 list.
Definition: BinnedEventT0.h:49

◆ clear()

void clear ( )

Clear the list of extracted event T0 estimations.

Definition at line 34 of file BinnedEventT0.cc.

35{
36 m_eventT0Map.clear();
37}

◆ getBinnedEventT0()

int getBinnedEventT0 ( const Const::EDetector  detector) const

Return the stored binned event t0 for the given detector or 0 if nothing stored.

Definition at line 13 of file BinnedEventT0.cc.

14{
15 const auto& foundEventT0 = m_eventT0Map.find(detector);
16 if (foundEventT0 == m_eventT0Map.end()) {
17 B2ERROR("No binned event t0 available for the given detector. Returning 0.");
18 return 0;
19 }
20
21 return foundEventT0->second;
22}

◆ hasBinnedEventT0()

bool hasBinnedEventT0 ( const Const::EDetector  detector) const

Check if one of the detectors in the given set has a binned t0 estimation.

Definition at line 29 of file BinnedEventT0.cc.

30{
31 return m_eventT0Map.find(detector) != m_eventT0Map.end();
32}

Member Data Documentation

◆ m_eventT0Map

std::map<Const::EDetector, int> m_eventT0Map
private

Internal storage of the event t0 list.

Definition at line 49 of file BinnedEventT0.h.


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