Belle II Software development
KLMTimeResolution.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
9/* Own header. */
10#include <klm/dbobjects/KLMTimeResolution.h>
11
12/* C++ headers. */
13#include <limits>
14
15using namespace Belle2;
16
18{
19 std::map<KLMChannelNumber, float>::const_iterator it;
20 it = m_TimeResolution.find(channel);
21 if (it == m_TimeResolution.end())
22 return std::numeric_limits<float>::quiet_NaN();
23 return it->second;
24}
25
27{
28 std::map<KLMChannelNumber, float>::iterator it;
29 it = m_TimeResolution.find(channel);
30 if (it == m_TimeResolution.end())
31 m_TimeResolution.insert(std::pair<KLMChannelNumber, float>(channel, delay));
32 else
33 it->second = delay;
34}
std::map< KLMChannelNumber, float > m_TimeResolution
Time resolution.
float getTimeResolution(KLMChannelNumber channel) const
Get time resolution.
void setTimeResolution(KLMChannelNumber channel, float resolution)
Set time resolution.
uint16_t KLMChannelNumber
Channel number.
Abstract base class for different kinds of events.