Belle II Software  release-08-01-10
SVDCalibrationsScalar.h
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 #pragma once
10 
11 namespace Belle2 {
18  template <class T >
20 
21  public:
22  typedef T calibrationType;
25  /*
26  * this class is used to deal with a value for side
27  */
29 
32 
34  static inline calibrationType get(const payloadContainerType& svdScalar, unsigned int /*strip*/)
35  {
36  return svdScalar;
37  }
38 
40  const static inline calibrationType& getReference(const payloadContainerType& svdScalar, unsigned int /*strip*/)
41  {
42  return svdScalar;
43  }
44 
46  static inline void set(payloadContainerType& svdScalar, unsigned int /*strip*/,
47  const calibrationType& value)
48  {
49  svdScalar = value;
50  }
51 
53  static void init(payloadContainerType& svdScalar, unsigned int /*layer*/,
54  unsigned int /*ladder*/, unsigned int /*sensor*/,
55  unsigned int /*side*/, const T& defaultT)
56  {
57  svdScalar = defaultT;
58  }
59  };
61 }
template class for scalar (one per side) calibrations
~SVDCalibrationsScalar()
default destructor
static void set(payloadContainerType &svdScalar, unsigned int, const calibrationType &value)
set the calibration of the side
static void init(payloadContainerType &svdScalar, unsigned int, unsigned int, unsigned int, unsigned int, const T &defaultT)
initialize the calibration scalar
static const calibrationType & getReference(const payloadContainerType &svdScalar, unsigned int)
get a reference to the calibration of the side
static calibrationType get(const payloadContainerType &svdScalar, unsigned int)
get the calibration of the side
calibrationType payloadContainerType
typedef of the payload container, one per side
T calibrationType
typedef of the calibration type class
Abstract base class for different kinds of events.