Belle II Software  release-05-02-19
DBObjCalibrationConstMapBase.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Tadeas Bilka *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <utility>
14 #include <map>
15 #include <TObject.h>
16 #include <TClass.h>
17 
18 namespace Belle2 {
38  class DBObjCalibrationConstMapBase: public TObject {
39 
40  public:
41 
43  typedef int baseType;
45  typedef std::pair<baseType, baseType> ElementParameter;
47  typedef std::map<ElementParameter, double> ElementParameterMap;
48 
50  const ElementParameterMap& getMap() {return m_constants;}
51 
54 
57 
59  virtual double get(baseType id, baseType param) const;
60 
62  virtual void set(baseType id, baseType param, double value);;
63 
65  virtual double add(baseType id, baseType param, double value, bool subtractInsteadOfAdd = false);
66 
68  virtual void dump() const;
69  private:
74  };
75 
77 } // end namespace Belle2
78 
Belle2::DBObjCalibrationConstMapBase::set
virtual void set(baseType id, baseType param, double value)
Set parameter correction for given WireID and parameter number.
Definition: DBObjCalibrationConstMapBase.cc:31
Belle2::DBObjCalibrationConstMapBase::ElementParameterMap
std::map< ElementParameter, double > ElementParameterMap
Map of (element, parameter) and its values.
Definition: DBObjCalibrationConstMapBase.h:55
Belle2::DBObjCalibrationConstMapBase::ElementParameter
std::pair< baseType, baseType > ElementParameter
(element, parameter)
Definition: DBObjCalibrationConstMapBase.h:53
Belle2::DBObjCalibrationConstMapBase
Base for calibration or alignment parameters identified by two unsigned shorts Typically first is som...
Definition: DBObjCalibrationConstMapBase.h:46
Belle2::DBObjCalibrationConstMapBase::~DBObjCalibrationConstMapBase
virtual ~DBObjCalibrationConstMapBase()
Destructor.
Definition: DBObjCalibrationConstMapBase.cc:15
Belle2::DBObjCalibrationConstMapBase::getMap
const ElementParameterMap & getMap()
Get the underlying map of constants.
Definition: DBObjCalibrationConstMapBase.h:58
Belle2::DBObjCalibrationConstMapBase::m_constants
ElementParameterMap m_constants
Map of map of all calibration elements' constants.
Definition: DBObjCalibrationConstMapBase.h:78
Belle2::DBObjCalibrationConstMapBase::add
virtual double add(baseType id, baseType param, double value, bool subtractInsteadOfAdd=false)
Add correction to already stored (or to 0. if not set yet) constant value (optionaly with minus sign)
Definition: DBObjCalibrationConstMapBase.cc:37
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DBObjCalibrationConstMapBase::baseType
int baseType
The underlying element type (also for param id)
Definition: DBObjCalibrationConstMapBase.h:51
Belle2::DBObjCalibrationConstMapBase::DBObjCalibrationConstMapBase
DBObjCalibrationConstMapBase()
Constructor.
Definition: DBObjCalibrationConstMapBase.h:61
Belle2::DBObjCalibrationConstMapBase::dump
virtual void dump() const
Write all elements' parameters' values to standard output.
Definition: DBObjCalibrationConstMapBase.cc:7
Belle2::DBObjCalibrationConstMapBase::ClassDef
ClassDef(DBObjCalibrationConstMapBase, 1)
Storage for alignment and calibration constants.
Belle2::DBObjCalibrationConstMapBase::get
virtual double get(baseType id, baseType param) const
Get parameter value for given element and parameter number.
Definition: DBObjCalibrationConstMapBase.cc:20