CMS 3D CMS Logo

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  timeParams_.resize(TSIZE, std::vector<unsigned long long>(1, 0ULL));
34  }
35 
36  ~BeamSpotOnlineObjects() override {}
37 
39  enum IntParamIndex { NUM_TRACKS = 0, NUM_PVS = 1, ISIZE = 2 };
40  enum TimeParamIndex { CREATE_TIME = 0, TSIZE = 1 };
41 
43  // set lastAnalyzedLumi_, last analyzed lumisection
45 
46  // set lastAnalyzedRun_, run of the last analyzed lumisection
48 
49  // set lastAnalyzedFill_, fill of the last analyzed lumisection
51 
52  // set number of tracks used in the BeamSpot fit
53  void SetNumTracks(int val);
54 
55  // set number of Primary Vertices used in the BeamSpot fit
56  void SetNumPVs(int val);
57 
58  // set creation time of the payload
60 
62  // get lastAnalyzedLumi_, last analyzed lumisection
63  int GetLastAnalyzedLumi() const { return lastAnalyzedLumi_; }
64 
65  // get lastAnalyzedRun_, run of the last analyzed lumisection
66  int GetLastAnalyzedRun() const { return lastAnalyzedRun_; }
67 
68  // get lastAnalyzedFill_, fill of the last analyzed lumisection
69  int GetLastAnalyzedFill() const { return lastAnalyzedFill_; }
70 
71  // get number of tracks used in the BeamSpot fit
72  int GetNumTracks() const;
73 
74  // get number of Primary Vertices used in the BeamSpot fit
75  int GetNumPVs() const;
76 
77  // get creation time of the payload
79 
81  void print(std::stringstream& ss) const;
82 
83 private:
87  std::vector<std::vector<int> > intParams_;
88  std::vector<std::vector<float> > floatParams_;
89  std::vector<std::vector<std::string> > stringParams_;
90  std::vector<std::vector<unsigned long long> > timeParams_;
91 
93 };
94 
95 std::ostream& operator<<(std::ostream&, BeamSpotOnlineObjects beam);
96 
97 #endif
BeamSpotOnlineObjects::intParams_
std::vector< std::vector< int > > intParams_
Definition: BeamSpotOnlineObjects.h:87
BeamSpotOnlineObjects::lastAnalyzedFill_
int lastAnalyzedFill_
Definition: BeamSpotOnlineObjects.h:86
BeamSpotOnlineObjects::TimeParamIndex
TimeParamIndex
Definition: BeamSpotOnlineObjects.h:40
BeamSpotOnlineObjects::GetNumPVs
int GetNumPVs() const
Definition: BeamSpotOnlineObjects.cc:52
BeamSpotOnlineObjects::NUM_TRACKS
Definition: BeamSpotOnlineObjects.h:39
BeamSpotOnlineObjects::SetCreationTime
void SetCreationTime(cond::Time_t val)
Definition: BeamSpotOnlineObjects.cc:65
BeamSpotOnlineObjects::SetNumTracks
void SetNumTracks(int val)
Definition: BeamSpotOnlineObjects.cc:59
Time.h
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
operator<<
std::ostream & operator<<(std::ostream &, BeamSpotOnlineObjects beam)
Definition: BeamSpotOnlineObjects.cc:91
BeamSpotOnlineObjects::CREATE_TIME
Definition: BeamSpotOnlineObjects.h:40
BeamSpotOnlineObjects::lastAnalyzedRun_
int lastAnalyzedRun_
Definition: BeamSpotOnlineObjects.h:85
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
BeamSpotObjects.h
BeamSpotOnlineObjects::BeamSpotOnlineObjects
BeamSpotOnlineObjects()
default constructor
Definition: BeamSpotOnlineObjects.h:28
BeamSpotOnlineObjects::TSIZE
Definition: BeamSpotOnlineObjects.h:40
BeamSpotOnlineObjects::floatParams_
std::vector< std::vector< float > > floatParams_
Definition: BeamSpotOnlineObjects.h:88
EcalCondDBWriter_cfi.beam
beam
Definition: EcalCondDBWriter_cfi.py:45
BeamSpotOnlineObjects::GetLastAnalyzedLumi
int GetLastAnalyzedLumi() const
Getters Methods.
Definition: BeamSpotOnlineObjects.h:63
BeamSpotOnlineObjects::timeParams_
std::vector< std::vector< unsigned long long > > timeParams_
Definition: BeamSpotOnlineObjects.h:90
BeamSpotOnlineObjects::lastAnalyzedLumi_
int lastAnalyzedLumi_
Definition: BeamSpotOnlineObjects.h:84
BeamSpotOnlineObjects::~BeamSpotOnlineObjects
~BeamSpotOnlineObjects() override
Definition: BeamSpotOnlineObjects.h:36
BeamSpotOnlineObjects::GetCreationTime
cond::Time_t GetCreationTime() const
Definition: BeamSpotOnlineObjects.cc:54
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
Serializable.h
BeamSpotOnlineObjects::GetNumTracks
int GetNumTracks() const
Definition: BeamSpotOnlineObjects.cc:48
BeamSpotOnlineObjects::IntParamIndex
IntParamIndex
Enums.
Definition: BeamSpotOnlineObjects.h:39
BeamSpotOnlineObjects::stringParams_
std::vector< std::vector< std::string > > stringParams_
Definition: BeamSpotOnlineObjects.h:89
BeamSpotObjects
Definition: BeamSpotObjects.h:20
BeamSpotOnlineObjects::GetLastAnalyzedRun
int GetLastAnalyzedRun() const
Definition: BeamSpotOnlineObjects.h:66
BeamSpotOnlineObjects::SetLastAnalyzedFill
void SetLastAnalyzedFill(int val)
Definition: BeamSpotOnlineObjects.h:50
BeamSpotOnlineObjects::ISIZE
Definition: BeamSpotOnlineObjects.h:39
heppy_batch.val
val
Definition: heppy_batch.py:351
BeamSpotOnlineObjects::SetLastAnalyzedLumi
void SetLastAnalyzedLumi(int val)
Setters Methods.
Definition: BeamSpotOnlineObjects.h:44
BeamSpotOnlineObjects
Definition: BeamSpotOnlineObjects.h:25
BeamSpotOnlineObjects::NUM_PVS
Definition: BeamSpotOnlineObjects.h:39
BeamSpotOnlineObjects::SetLastAnalyzedRun
void SetLastAnalyzedRun(int val)
Definition: BeamSpotOnlineObjects.h:47
BeamSpotOnlineObjects::GetLastAnalyzedFill
int GetLastAnalyzedFill() const
Definition: BeamSpotOnlineObjects.h:69
BeamSpotOnlineObjects::print
void print(std::stringstream &ss) const
Print BeamSpotOnline parameters.
Definition: BeamSpotOnlineObjects.cc:70
BeamSpotOnlineObjects::SetNumPVs
void SetNumPVs(int val)
Definition: BeamSpotOnlineObjects.cc:63