Belle II Software  release-05-01-25
SVDCalibrationsScalar.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Laura Zani, Eugenio Paoloni, Giulia Casarosa *
7  * *
8  * This software is provided "as is" without any warranty. *
9  * WARNING: PLEASE, PLEASE, PLEASE USE ONLY WITH CAUTION AT YOUR OWN RISK!*
10  **************************************************************************/
11 
12 #pragma once
13 
14 namespace Belle2 {
21  template <class T >
22  class SVDCalibrationsScalar {
23 
24  public:
25  typedef T calibrationType;
28  /*
29  * this class is used to deal with a value for side
30  */
32 
35 
37  static inline calibrationType get(const payloadContainerType& svdScalar, unsigned int /*strip*/)
38  {
39  return svdScalar;
40  }
41 
43  const static inline calibrationType& getReference(const payloadContainerType& svdScalar, unsigned int /*strip*/)
44  {
45  return svdScalar;
46  }
47 
49  static inline void set(payloadContainerType& svdScalar, unsigned int /*strip*/,
50  calibrationType value)
51  {
52  svdScalar = value;
53  }
54 
56  static void init(payloadContainerType& svdScalar, unsigned int /*layer*/,
57  unsigned int /*ladder*/ , unsigned int /*sensor*/,
58  unsigned int /*side*/, const T& defaultT)
59  {
60  svdScalar = defaultT;
61  }
62  };
64 }
Belle2::SVDCalibrationsScalar::set
static void set(payloadContainerType &svdScalar, unsigned int, calibrationType value)
set the calibration of the side
Definition: SVDCalibrationsScalar.h:58
Belle2::SVDCalibrationsScalar::get
static calibrationType get(const payloadContainerType &svdScalar, unsigned int)
get the calibration of the side
Definition: SVDCalibrationsScalar.h:46
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDCalibrationsScalar
template class for scalar (one per side) calibrations
Definition: SVDCalibrationsScalar.h:31
Belle2::SVDCalibrationsScalar::~SVDCalibrationsScalar
~SVDCalibrationsScalar()
default destructor
Definition: SVDCalibrationsScalar.h:43
Belle2::SVDCalibrationsScalar::payloadContainerType
calibrationType payloadContainerType
typedef of the payload container, one per side
Definition: SVDCalibrationsScalar.h:35
Belle2::SVDCalibrationsScalar::init
static void init(payloadContainerType &svdScalar, unsigned int, unsigned int, unsigned int, unsigned int, const T &defaultT)
initialize the calibration scalar
Definition: SVDCalibrationsScalar.h:65
Belle2::SVDCalibrationsScalar::calibrationType
T calibrationType
typedef of the calibration type class
Definition: SVDCalibrationsScalar.h:34
Belle2::SVDCalibrationsScalar::getReference
const static calibrationType & getReference(const payloadContainerType &svdScalar, unsigned int)
get a reference to the calibration of the side
Definition: SVDCalibrationsScalar.h:52