File indexing completed on 2023-03-17 10:46:47
0001 #ifndef CondFormats_DTObjects_DTRecoConditions_H
0002 #define CondFormats_DTObjects_DTRecoConditions_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "CondFormats/Serialization/interface/Serializable.h"
0016
0017 #include <map>
0018 #include <vector>
0019 #include <string>
0020 #include <cstdint>
0021 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
0022 #include <atomic>
0023 #endif
0024
0025 class DTWireId;
0026 class TFormula;
0027
0028 class DTRecoConditions {
0029 public:
0030 typedef std::map<uint32_t, std::vector<double> >::const_iterator const_iterator;
0031
0032
0033 DTRecoConditions();
0034 DTRecoConditions(const DTRecoConditions&);
0035 const DTRecoConditions& operator=(const DTRecoConditions&);
0036
0037
0038 virtual ~DTRecoConditions();
0039
0040 void setVersion(int version) { theVersion = version; }
0041
0042
0043 int version() const { return theVersion; }
0044
0045
0046
0047 float get(const DTWireId& wireid, double* x = nullptr) const;
0048
0049
0050 void setFormulaExpr(const std::string& expr) { expression = expr; }
0051
0052 std::string getFormulaExpr() const { return expression; }
0053
0054
0055 void set(const DTWireId& wireid, const std::vector<double>& values);
0056
0057
0058 const_iterator begin() const;
0059 const_iterator end() const;
0060
0061 private:
0062
0063 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
0064 mutable std::atomic<TFormula*> formula COND_TRANSIENT;
0065 #else
0066 mutable TFormula* formula COND_TRANSIENT;
0067 #endif
0068
0069
0070 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
0071 mutable std::atomic<int> formulaType COND_TRANSIENT;
0072 #else
0073 mutable int formulaType COND_TRANSIENT;
0074 #endif
0075
0076
0077 std::string expression;
0078
0079
0080 std::map<uint32_t, std::vector<double> > payload;
0081
0082
0083 int theVersion;
0084
0085 COND_SERIALIZABLE;
0086 };
0087 #endif