Belle II Software development
KLMTimeCableDelay.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/KLMTimeCableDelay.h>
11
12/* Basf2 headers. */
13#include <framework/logging/Logger.h>
14
15using namespace Belle2;
16
18{
19}
20
22{
23}
24
26{
27 std::map<KLMChannelNumber, float>::iterator it;
28 it = m_timeDelay.find(channel);
29 if (it == m_timeDelay.end())
30 m_timeDelay.insert(std::pair<KLMChannelNumber, float>(channel, delay));
31 else
32 it->second = delay;
33}
34
36{
37 std::map<KLMChannelNumber, float>::const_iterator it;
38 it = m_timeDelay.find(channel);
39 if (it == m_timeDelay.end())
40 return std::numeric_limits<float>::quiet_NaN();
41 return it->second;
42}
43
45{
46 m_timeDelay.clear();
47}
void clearTimeDelay()
Clear the time calibration constants.
std::map< KLMChannelNumber, float > m_timeDelay
Map of the time calibration constants.
float getTimeDelay(KLMChannelNumber channel) const
Get the time calibration constant.
void setTimeDelay(KLMChannelNumber channel, float timeDelay)
Set the time calibration constant.
uint16_t KLMChannelNumber
Channel number.
Abstract base class for different kinds of events.