CMS 3D CMS Logo

DTRecoConditions.h
Go to the documentation of this file.
1 #ifndef CondFormats_DTObjects_DTRecoConditions_H
2 #define CondFormats_DTObjects_DTRecoConditions_H
3 
16 
17 #include <map>
18 #include <vector>
19 #include <string>
20 #include <cstdint>
21 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
22 #include <atomic>
23 #endif
24 
25 class DTWireId;
26 class TFormula;
27 
29 public:
30  typedef std::map<uint32_t, std::vector<double> >::const_iterator const_iterator;
31 
36 
38  virtual ~DTRecoConditions();
39 
41 
43  int version() const { return theVersion; }
44 
47  float get(const DTWireId& wireid, double* x = nullptr) const;
48 
51 
53 
55  void set(const DTWireId& wireid, const std::vector<double>& values);
56 
58  const_iterator begin() const;
59  const_iterator end() const;
60 
61 private:
62  // The formula used for parametrization (transient pointer)
63 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
64  mutable std::atomic<TFormula*> formula COND_TRANSIENT;
65 #else
66  mutable TFormula* formula COND_TRANSIENT;
67 #endif
68 
69  // Formula evalaution strategy, derived from expression and cached for efficiency reasons
70 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
71  mutable std::atomic<int> formulaType COND_TRANSIENT;
72 #else
73  mutable int formulaType COND_TRANSIENT;
74 #endif
75 
76  // String with the expression representing the formula used for parametrization
78 
79  // Actual data
80  std::map<uint32_t, std::vector<double> > payload;
81 
82  // Versioning
84 
86 };
87 #endif
DTRecoConditions::DTRecoConditions
DTRecoConditions()
Constructor.
Definition: DTRecoConditions.cc:21
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
COND_TRANSIENT
#define COND_TRANSIENT
Definition: Serializable.h:63
DTRecoConditions::end
const_iterator end() const
Definition: DTRecoConditions.cc:84
DDAxes::x
DTRecoConditions::theVersion
int theVersion
Definition: DTRecoConditions.h:83
DTRecoConditions::get
float get(const DTWireId &wireid, double *x=nullptr) const
Get the value correspoding to the given WireId, / using x[] as parameters of the parametrization when...
Definition: DTRecoConditions.cc:42
DTRecoConditions::setFormulaExpr
void setFormulaExpr(const std::string &expr)
Set the expression representing the formula used for parametrization.
Definition: DTRecoConditions.h:50
DTRecoConditions::formula
std::atomic< TFormula * > formula
Definition: DTRecoConditions.h:64
DTRecoConditions::version
int version() const
Version numer specifying the structure of the payload. See .cc file for details.
Definition: DTRecoConditions.h:43
DTWireId
Definition: DTWireId.h:12
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
DTRecoConditions::const_iterator
std::map< uint32_t, std::vector< double > >::const_iterator const_iterator
Definition: DTRecoConditions.h:30
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTRecoConditions::setVersion
void setVersion(int version)
Definition: DTRecoConditions.h:40
Serializable.h
DTRecoConditions::expression
std::string expression
Definition: DTRecoConditions.h:77
DTRecoConditions::payload
std::map< uint32_t, std::vector< double > > payload
Definition: DTRecoConditions.h:80
DTRecoConditions::formulaType
std::atomic< int > formulaType
Definition: DTRecoConditions.h:71
jets_cff.expr
expr
Definition: jets_cff.py:485
DTRecoConditions::set
void set(const DTWireId &wireid, const std::vector< double > &values)
Fill the payload.
Definition: DTRecoConditions.cc:78
DTRecoConditions::~DTRecoConditions
virtual ~DTRecoConditions()
Destructor.
Definition: DTRecoConditions.cc:40
DTRecoConditions::begin
const_iterator begin() const
Access the data.
Definition: DTRecoConditions.cc:82
DTRecoConditions
Definition: DTRecoConditions.h:28
DTRecoConditions::getFormulaExpr
std::string getFormulaExpr() const
Definition: DTRecoConditions.h:52
DTRecoConditions::operator=
const DTRecoConditions & operator=(const DTRecoConditions &)
Definition: DTRecoConditions.cc:30