CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EventRecords.h
Go to the documentation of this file.
1 #ifndef EventFilter_RPCRawToDigi_EventRecords_H
2 #define EventFilter_RPCRawToDigi_EventRecords_H
3 
8 #include <vector>
9 
10 namespace rpcrawtodigi {
11 class EventRecords {
12 public:
13 
14  EventRecords(int triggerbx=0)
15  : theTriggerBX(triggerbx),
17  {}
18 
19  EventRecords(int bx, const RecordBX & bxr, const RecordSLD & tbr, const RecordCD & lbr)
20  : theTriggerBX(bx),
22  theRecordBX(bxr), theRecordSLD(tbr), theRecordCD(lbr)
23  {}
24 
25  void add(const DataRecord & record);
26 
27  int triggerBx() const { return theTriggerBX;}
28 
29  int dataToTriggerDelay() const;
30 
31  bool complete() const { return theValidBX && theValidLN && theValidCD; }
32 
33  bool hasErrors() const { return (theErrors.size()>0); }
34 
35  bool samePartition(const EventRecords & r) const;
36 
37  const RecordBX & recordBX() const { return theRecordBX; }
38  const RecordSLD & recordSLD() const { return theRecordSLD; }
39  const RecordCD & recordCD() const { return theRecordCD; }
40  const std::vector<DataRecord> & errors() const { return theErrors; }
41 
42  static std::vector<EventRecords> mergeRecords(const std::vector<EventRecords> & r);
43 
44  std::string print(const DataRecord::DataRecordType& type) const;
45 
46 private:
52  std::vector<DataRecord> theErrors;
53 };
54 }
55 #endif
type
Definition: HCALResponse.h:22
const std::vector< DataRecord > & errors() const
Definition: EventRecords.h:40
std::string print(const DataRecord::DataRecordType &type) const
Definition: EventRecords.cc:83
JetCorrectorParameters::Record record
Definition: classes.h:11
const RecordSLD & recordSLD() const
Definition: EventRecords.h:38
EventRecords(int triggerbx=0)
Definition: EventRecords.h:14
int dataToTriggerDelay() const
Definition: EventRecords.cc:11
void add(const DataRecord &record)
Definition: EventRecords.cc:22
const RecordCD & recordCD() const
Definition: EventRecords.h:39
EventRecords(int bx, const RecordBX &bxr, const RecordSLD &tbr, const RecordCD &lbr)
Definition: EventRecords.h:19
static std::vector< EventRecords > mergeRecords(const std::vector< EventRecords > &r)
Definition: EventRecords.cc:61
std::vector< DataRecord > theErrors
Definition: EventRecords.h:52
const RecordBX & recordBX() const
Definition: EventRecords.h:37
bool samePartition(const EventRecords &r) const
Definition: EventRecords.cc:49