CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BeamSpotOnlineObjects.h
Go to the documentation of this file.
1 #ifndef BEAMSPOTONLINEOBJECTS_H
2 #define BEAMSPOTONLINEOBJECTS_H
3 
18 
19 #include <cmath>
20 #include <sstream>
21 #include <cstring>
22 #include <vector>
23 #include <string>
24 
26 public:
30  lastAnalyzedRun_ = 0;
32  intParams_.resize(ISIZE, std::vector<int>(1, 0));
33  floatParams_.resize(FSIZE, std::vector<float>(1, 0.0));
34  stringParams_.resize(SSIZE, std::vector<std::string>(1, ""));
35  timeParams_.resize(TSIZE, std::vector<unsigned long long>(1, 0ULL));
36  }
37 
38  ~BeamSpotOnlineObjects() override {}
39 
41  enum IntParamIndex { NUM_TRACKS = 0, NUM_PVS = 1, USED_EVENTS = 2, MAX_PVS = 3, ISIZE = 4 };
42  enum FloatParamIndex { MEAN_PV = 0, ERR_MEAN_PV = 1, RMS_PV = 2, ERR_RMS_PV = 3, FSIZE = 4 };
43  enum StringParamIndex { START_TIME = 0, END_TIME = 1, LUMI_RANGE = 2, SSIZE = 3 };
45 
47  // set lastAnalyzedLumi_, last analyzed lumisection
49 
50  // set lastAnalyzedRun_, run of the last analyzed lumisection
52 
53  // set lastAnalyzedFill_, fill of the last analyzed lumisection
55 
56  // set number of tracks used in the BeamSpot fit
57  void SetNumTracks(int val);
58 
59  // set number of Primary Vertices used in the BeamSpot fit
60  void SetNumPVs(int val);
61 
62  // set number of Events used in the BeamSpot fit (for DIP)
63  void SetUsedEvents(int val);
64 
65  // set max number of Primary Vertices used in the BeamSpot fit (for DIP)
66  void SetMaxPVs(int val);
67 
68  // set mean number of PVs (for DIP)
69  void SetMeanPV(float val);
70 
71  // set error on mean number of PVs (for DIP)
72  void SetMeanErrorPV(float val);
73 
74  // set rms of number of PVs (for DIP)
75  void SetRmsPV(float val);
76 
77  // set error on rm of number of PVs (for DIP)
78  void SetRmsErrorPV(float val);
79 
80  // set start time of the firs LS as string (for DIP)
82 
83  // set end time of the last LS as string (for DIP)
85 
86  // set lumi range as string (for DIP)
88 
89  // set creation time of the payload
91 
92  // set timestamp of the first LS (for DIP)
94 
95  // set timestamp of the last LS (for DIP)
97 
99  // get lastAnalyzedLumi_, last analyzed lumisection
100  int GetLastAnalyzedLumi() const { return lastAnalyzedLumi_; }
101 
102  // get lastAnalyzedRun_, run of the last analyzed lumisection
103  int GetLastAnalyzedRun() const { return lastAnalyzedRun_; }
104 
105  // get lastAnalyzedFill_, fill of the last analyzed lumisection
106  int GetLastAnalyzedFill() const { return lastAnalyzedFill_; }
107 
108  // get number of tracks used in the BeamSpot fit
109  int GetNumTracks() const;
110 
111  // get number of Primary Vertices used in the BeamSpot fit
112  int GetNumPVs() const;
113 
114  // get number of Events used in the BeamSpot fit (for DIP)
115  int GetUsedEvents() const;
116 
117  // get max number of Primary Vertices used in the BeamSpot fit (for DIP)
118  int GetMaxPVs() const;
119 
120  // get mean number of PVs (for DIP)
121  float GetMeanPV() const;
122 
123  // get error on mean number of PVs (for DIP)
124  float GetMeanErrorPV() const;
125 
126  // get rms of number of PVs (for DIP)
127  float GetRmsPV() const;
128 
129  // get error on rm of number of PVs (for DIP)
130  float GetRmsErrorPV() const;
131 
132  // get start time of the firs LS as string (for DIP)
133  std::string GetStartTime() const;
134 
135  // get end time of the last LS as string (for DIP)
136  std::string GetEndTime() const;
137 
138  // get lumi range as string (for DIP)
139  std::string GetLumiRange() const;
140 
141  // get creation time of the payload
143 
144  // get timestamp of the first LS (for DIP)
146 
147  // get timestamp of the last LS (for DIP)
149 
151  void print(std::stringstream& ss) const;
152 
153 private:
157  std::vector<std::vector<int> > intParams_;
158  std::vector<std::vector<float> > floatParams_;
159  std::vector<std::vector<std::string> > stringParams_;
160  std::vector<std::vector<unsigned long long> > timeParams_; // unsigned long long is equal to cond::Time_t
161 
163 };
164 
165 std::ostream& operator<<(std::ostream&, BeamSpotOnlineObjects beam);
166 
167 #endif
std::string GetStartTime() const
void SetLastAnalyzedLumi(int val)
Setters Methods.
cond::Time_t GetCreationTime() const
std::string GetLumiRange() const
cond::Time_t GetStartTimeStamp() const
int GetLastAnalyzedLumi() const
Getters Methods.
void SetEndTime(std::string val)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
std::vector< std::vector< int > > intParams_
std::string GetEndTime() const
unsigned long long Time_t
Definition: Time.h:14
void SetStartTimeStamp(cond::Time_t val)
BeamSpotOnlineObjects()
default constructor
std::vector< std::vector< std::string > > stringParams_
void SetStartTime(std::string val)
std::vector< std::vector< unsigned long long > > timeParams_
void SetLumiRange(std::string val)
#define COND_SERIALIZABLE
Definition: Serializable.h:39
std::vector< std::vector< float > > floatParams_
void SetEndTimeStamp(cond::Time_t val)
void print(std::stringstream &ss) const
Print BeamSpotOnline parameters.
cond::Time_t GetEndTimeStamp() const
void SetCreationTime(cond::Time_t val)