CMS 3D CMS Logo

DataRecord.cc
Go to the documentation of this file.
10 
11 using namespace rpcrawtodigi;
12 
14  DataRecordType wordType = UndefinedType;
15  if (RecordBX::matchType(*this))
16  wordType = StartOfBXData;
17  if (RecordSLD::matchType(*this))
18  wordType = StartOfTbLinkInputNumberData;
19  if (RecordCD::matchType(*this))
20  wordType = ChamberData;
21  if (EmptyWord::matchType(*this))
22  wordType = Empty;
23  if (ErrorRCDM::matchType(*this))
24  wordType = RCDM;
25  if (ErrorSDDM::matchType(*this))
26  wordType = SDDM;
27  if (ErrorRDDM::matchType(*this))
28  wordType = RDDM;
29  if (ErrorRDM::matchType(*this))
30  wordType = RDM;
31 
32  return wordType;
33 }
34 
36  std::ostringstream str;
37 
38  if (RecordBX::matchType(record))
39  return RecordBX(record).print();
40  if (RecordSLD::matchType(record))
41  return RecordSLD(record).print();
42  if (RecordCD::matchType(record))
43  return RecordCD(record).print();
44  if (EmptyWord::matchType(record))
45  return EmptyWord().print();
46  if (ErrorRCDM::matchType(record))
47  return ErrorRCDM(record).print();
48  if (ErrorSDDM::matchType(record))
49  return ErrorSDDM(record).print();
50  if (ErrorRDDM::matchType(record))
51  return ErrorRDDM(record).print();
52  if (ErrorRDM::matchType(record))
53  return ErrorRDM(record).print();
54 
55  return str.str();
56 }
57 
60  switch (code) {
61  case (None): {
62  result = "None";
63  break;
64  }
65  case (StartOfBXData): {
66  result = "StartOfBXData";
67  break;
68  }
69  case (StartOfTbLinkInputNumberData): {
70  result = "StartOfTBLnkData";
71  break;
72  }
73  case (ChamberData): {
74  result = "ChamberData";
75  break;
76  }
77  case (Empty): {
78  result = "Empty";
79  break;
80  }
81  case (RDDM): {
82  result = "RDDM";
83  break;
84  }
85  case (SDDM): {
86  result = "SDDM";
87  break;
88  }
89  case (RCDM): {
90  result = "RCDM";
91  break;
92  }
93  case (RDM): {
94  result = "RDM";
95  break;
96  }
97  default: { result = "UndefinedType"; }
98  }
99  return result;
100 }
static bool matchType(const DataRecord &record)
Definition: RecordSLD.h:36
JetCorrectorParameters::Record record
Definition: classes.h:7
static bool matchType(const DataRecord &record)
Definition: RecordBX.cc:4
static bool matchType(const DataRecord &record)
Definition: ErrorRDM.cc:5
static bool matchType(const DataRecord &record)
Definition: RecordCD.h:45
std::string print() const
Definition: EmptyWord.h:15
std::string print() const
Definition: RecordCD.cc:49
static std::string name(const DataRecordType &code)
Definition: DataRecord.cc:58
std::string print() const
Definition: ErrorRDDM.cc:13
std::string print() const
Definition: RecordBX.cc:6
static bool matchType(const DataRecord &record)
Definition: ErrorRCDM.cc:5
static bool matchType(const DataRecord &record)
Definition: ErrorSDDM.h:15
std::string print() const
Definition: RecordSLD.cc:4
static bool matchType(const DataRecord &record)
Definition: EmptyWord.h:16
std::string print() const
Definition: ErrorRCDM.cc:13
std::string print() const
Definition: ErrorSDDM.h:16
static bool matchType(const DataRecord &record)
Definition: ErrorRDDM.cc:5
std::string print() const
Definition: DataRecord.h:37
#define str(s)
DataRecordType type() const
Definition: DataRecord.cc:13
std::string print() const
Definition: ErrorRDM.cc:11