CMS 3D CMS Logo

PPSTimingCalibration.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of CTPPS offline software.
4  * Authors:
5  * Filip Dej
6  * Laurent Forthomme
7  *
8  ****************************************************************************/
9 
10 #ifndef CondFormats_PPSObjects_PPSTimingCalibration_h
11 #define CondFormats_PPSObjects_PPSTimingCalibration_h
12 
14 
15 #include <map>
16 #include <vector>
17 
19 public:
21  struct Key {
22  int db, sampic, channel, cell;
23 
25  bool operator<(const Key& rhs) const;
26  friend std::ostream& operator<<(std::ostream& os, const Key& key);
27 
29  };
30  //--------------------------------------------------------------------------
31 
32  using ParametersMap = std::map<Key, std::vector<double> >;
33  using TimingMap = std::map<Key, std::pair<double, double> >;
34 
35  PPSTimingCalibration() = default;
36  PPSTimingCalibration(const std::string& formula, const ParametersMap& params, const TimingMap& timeinfo)
38  ~PPSTimingCalibration() = default;
39 
40  std::vector<double> parameters(int key1, int key2, int key3, int key4) const;
41  inline const std::string& formula() const { return formula_; }
42  double timeOffset(int key1, int key2, int key3, int key4 = -1) const;
43  double timePrecision(int key1, int key2, int key3, int key4 = -1) const;
44 
45  friend std::ostream& operator<<(std::ostream& os, const PPSTimingCalibration& data);
46 
47 private:
51 
53 };
54 
55 #endif
PPSTimingCalibration::TimingMap
std::map< Key, std::pair< double, double > > TimingMap
Definition: PPSTimingCalibration.h:38
PPSTimingCalibration::Key::channel
int channel
Definition: PPSTimingCalibration.h:33
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
PPSTimingCalibration::Key
Helper structure for indexing calibration data.
Definition: PPSTimingCalibration.h:26
PPSTimingCalibration::parameters_
ParametersMap parameters_
Definition: PPSTimingCalibration.h:54
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
PPSTimingCalibration::formula_
std::string formula_
Definition: PPSTimingCalibration.h:53
PPSTimingCalibration::Key::sampic
int sampic
Definition: PPSTimingCalibration.h:33
PPSTimingCalibration::operator<<
friend std::ostream & operator<<(std::ostream &os, const PPSTimingCalibration &data)
Definition: PPSTimingCalibration.cc:55
PPSTimingCalibration::formula
const std::string & formula() const
Definition: PPSTimingCalibration.h:46
PPSTimingCalibration::Key::operator<
bool operator<(const Key &rhs) const
Comparison operator.
Definition: PPSTimingCalibration.cc:13
PPSTimingCalibration::ParametersMap
std::map< Key, std::vector< double > > ParametersMap
Definition: PPSTimingCalibration.h:37
PPSTimingCalibration::Key::cell
int cell
Definition: PPSTimingCalibration.h:33
PPSTimingCalibration::Key::operator<<
friend std::ostream & operator<<(std::ostream &os, const Key &key)
Definition: PPSTimingCalibration.cc:25
PPSTimingCalibration::timeOffset
double timeOffset(int key1, int key2, int key3, int key4=-1) const
Definition: PPSTimingCalibration.cc:39
PPSTimingCalibration::Key::db
int db
Definition: PPSTimingCalibration.h:33
PPSTimingCalibration::timePrecision
double timePrecision(int key1, int key2, int key3, int key4=-1) const
Definition: PPSTimingCalibration.cc:47
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PPSTimingCalibration::parameters
std::vector< double > parameters(int key1, int key2, int key3, int key4) const
Definition: PPSTimingCalibration.cc:31
PPSTimingCalibration::timeInfo_
TimingMap timeInfo_
Definition: PPSTimingCalibration.h:55
PPSTimingCalibration::PPSTimingCalibration
PPSTimingCalibration()=default
Serializable.h
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
PPSTimingCalibration
Definition: PPSTimingCalibration.h:17
crabWrapper.key
key
Definition: crabWrapper.py:19
PPSTimingCalibration::~PPSTimingCalibration
~PPSTimingCalibration()=default