Belle II Software development
DBObjCalibrationConstMapBase.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#include <utility>
12#include <map>
13#include <TObject.h>
14#include <TClass.h>
15
16namespace Belle2 {
36 class DBObjCalibrationConstMapBase: public TObject {
37
38 public:
39
41 typedef int baseType;
43 typedef std::pair<baseType, baseType> ElementParameter;
45 typedef std::map<ElementParameter, double> ElementParameterMap;
46
49
52
55
57 virtual double get(baseType id, baseType param) const;
58
60 virtual void set(baseType id, baseType param, double value);;
61
63 virtual double add(baseType id, baseType param, double value, bool subtractInsteadOfAdd = false);
64
66 virtual void dump() const;
67 private:
72 };
73
75} // end namespace Belle2
76
Base for calibration or alignment parameters identified by two unsigned shorts Typically first is som...
virtual void set(baseType id, baseType param, double value)
Set parameter correction for given WireID and parameter number.
ClassDef(DBObjCalibrationConstMapBase, 1)
Storage for alignment and calibration constants.
const ElementParameterMap & getMap()
Get the underlying map of constants.
std::pair< baseType, baseType > ElementParameter
(element, parameter)
std::map< ElementParameter, double > ElementParameterMap
Map of (element, parameter) and its values.
int baseType
The underlying element type (also for param id)
ElementParameterMap m_constants
Map of map of all calibration elements' constants.
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 (optionally with minus sign...
virtual void dump() const
Write all elements' parameters' values to standard output.
Abstract base class for different kinds of events.