Belle II Software light-2406-ragdoll
BinnedEventT0.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <framework/dataobjects/BinnedEventT0.h>
9#include <framework/logging/Logger.h>
10
11using namespace Belle2;
12
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}
23
25{
26 m_eventT0Map[detector] = eventT0;
27}
28
30{
31 return m_eventT0Map.find(detector) != m_eventT0Map.end();
32}
33
35{
36 m_eventT0Map.clear();
37}
bool hasBinnedEventT0(const Const::EDetector detector) const
Check if one of the detectors in the given set has a binned t0 estimation.
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.
std::map< Const::EDetector, int > m_eventT0Map
Internal storage of the event t0 list.
Definition: BinnedEventT0.h:49
void clear()
Clear the list of extracted event T0 estimations.
EDetector
Enum for identifying the detector components (detector and subdetector).
Definition: Const.h:42
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24