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 
50  void setFormulaExpr(const std::string& expr) { expression = expr; }
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
const_iterator begin() const
Access the data.
void setVersion(int version)
std::map< uint32_t, std::vector< double > > payload
std::map< uint32_t, std::vector< double > >::const_iterator const_iterator
int version() const
Version numer specifying the structure of the payload. See .cc file for details.
const_iterator end() const
const DTRecoConditions & operator=(const DTRecoConditions &)
DTRecoConditions()
Constructor.
virtual ~DTRecoConditions()
Destructor.
#define COND_TRANSIENT
Definition: Serializable.h:63
std::atomic< TFormula * > formula
#define COND_SERIALIZABLE
Definition: Serializable.h:39
std::string getFormulaExpr() const
std::string expression
void setFormulaExpr(const std::string &expr)
Set the expression representing the formula used for parametrization.
std::atomic< int > formulaType