CMS 3D CMS Logo

ESDataFormatter.h
Go to the documentation of this file.
1 #ifndef ESDATAFORMATTER_H
2 #define ESDATAFORMATTER_H
3 
4 #include <iostream>
5 #include <vector>
6 #include <bitset>
7 #include <sstream>
8 #include <map>
9 
15 
17 public:
18  struct Meta_Data {
19  int run_number = 0;
20  int orbit_number = 0;
21  int bx = 0;
22  int lv1 = 0;
23  int kchip_bc = 0;
24  int kchip_ec = 0;
25  Meta_Data() = default;
26  Meta_Data(int r, int o, int b, int l, int k_bc, int k_ec)
27  : run_number(r), orbit_number(o), bx(b), lv1(l), kchip_bc(k_bc), kchip_ec(k_ec){};
28  };
29 
30  typedef std::vector<ESDataFrame> DetDigis;
31  typedef std::map<int, DetDigis> Digis;
32 
33  typedef uint8_t Word8;
34  typedef uint16_t Word16;
35  typedef uint32_t Word32;
36  typedef uint64_t Word64;
37 
39  : pset_(ps),
40  trgtype_(0),
41  debug_(pset_.getUntrackedParameter<bool>("debugMode", false)),
42  printInHex_(pset_.getUntrackedParameter<bool>("printInHex", false)){};
43  virtual ~ESDataFormatter(){};
44 
45  virtual void DigiToRaw(int fedId, Digis& digis, FEDRawData& fedRawData, const Meta_Data& meta_data) const = 0;
46 
47 protected:
49  const int trgtype_;
50  const bool debug_;
51  const bool printInHex_;
52 
55 
56  std::string print(const Word64& word) const;
57  std::string print(const Word16& word) const;
58 };
59 
60 #endif
ESDataFormatter::Meta_Data
Definition: ESDataFormatter.h:18
electrons_cff.bool
bool
Definition: electrons_cff.py:393
funct::false
false
Definition: Factorize.h:29
ESDataFormatter::Meta_Data::Meta_Data
Meta_Data()=default
ESDataFormatter::pset_
const edm::ParameterSet pset_
Definition: ESDataFormatter.h:48
ESDataFormatter::~ESDataFormatter
virtual ~ESDataFormatter()
Definition: ESDataFormatter.h:43
ESDataFormatter::debug_
const bool debug_
Definition: ESDataFormatter.h:50
FEDRawData.h
ESDataFormatter::Digis
std::map< int, DetDigis > Digis
Definition: ESDataFormatter.h:31
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
FEDRawData
Definition: FEDRawData.h:19
ESDataFormatter::Word64
uint64_t Word64
Definition: ESDataFormatter.h:36
ESDataFormatter::printInHex_
const bool printInHex_
Definition: ESDataFormatter.h:51
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
ESDataFrame.h
ESDataFormatter::Word8
uint8_t Word8
Definition: ESDataFormatter.h:33
l1t_dqm_sourceclient-live_cfg.fedRawData
fedRawData
Definition: l1t_dqm_sourceclient-live_cfg.py:188
EcalDigiCollections.h
ESDataFormatter::formatMinor_
int formatMinor_
Definition: ESDataFormatter.h:54
b
double b
Definition: hdecay.h:118
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ESDataFormatter::Meta_Data::run_number
int run_number
Definition: ESDataFormatter.h:19
ESDataFormatter::Meta_Data::orbit_number
int orbit_number
Definition: ESDataFormatter.h:20
edm::ParameterSet
Definition: ParameterSet.h:47
ESDataFormatter::Meta_Data::kchip_ec
int kchip_ec
Definition: ESDataFormatter.h:24
FEDRawDataCollection.h
ESDataFormatter
Definition: ESDataFormatter.h:16
l1tstage2_dqm_sourceclient-live_cfg.fedId
fedId
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:88
ESDataFormatter::Meta_Data::Meta_Data
Meta_Data(int r, int o, int b, int l, int k_bc, int k_ec)
Definition: ESDataFormatter.h:26
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
alignCSCRings.r
r
Definition: alignCSCRings.py:93
ESDataFormatter::DetDigis
std::vector< ESDataFrame > DetDigis
Definition: ESDataFormatter.h:30
ESDataFormatter::print
std::string print(const Word64 &word) const
Definition: ESDataFormatter.cc:11
ESDataFormatter::ESDataFormatter
ESDataFormatter(const edm::ParameterSet &ps)
Definition: ESDataFormatter.h:38
ESDataFormatter::Meta_Data::bx
int bx
Definition: ESDataFormatter.h:21
ESDataFormatter::Meta_Data::kchip_bc
int kchip_bc
Definition: ESDataFormatter.h:23
ESDataFormatter::Word32
uint32_t Word32
Definition: ESDataFormatter.h:35
ESDataFormatter::DigiToRaw
virtual void DigiToRaw(int fedId, Digis &digis, FEDRawData &fedRawData, const Meta_Data &meta_data) const =0
ESDataFormatter::Meta_Data::lv1
int lv1
Definition: ESDataFormatter.h:22
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
ESDataFormatter::Word16
uint16_t Word16
Definition: ESDataFormatter.h:34
ParameterSet.h
ESDataFormatter::trgtype_
const int trgtype_
Definition: ESDataFormatter.h:49
ESDataFormatter::formatMajor_
int formatMajor_
Definition: ESDataFormatter.h:53