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 
18  public :
19 
20  typedef std::vector<ESDataFrame> DetDigis;
21  typedef std::map<int, DetDigis> Digis;
22 
23  typedef uint8_t Word8;
24  typedef uint16_t Word16;
25  typedef uint32_t Word32;
26  typedef uint64_t Word64;
27 
29  pset_(ps), run_number_(0), orbit_number_(0), bx_(0), lv1_(0), trgtype_(0),
30  kchip_bc_(0), kchip_ec_(0) {
31  debug_ = pset_.getUntrackedParameter<bool>("debugMode", false);
32  printInHex_ = pset_.getUntrackedParameter<bool>("printInHex", false);
33  };
34  virtual ~ESDataFormatter() {};
35 
36  virtual void DigiToRaw(int fedId, Digis & digis, FEDRawData& fedRawData) = 0;
37 
38  virtual void setRunNumber(int i) {run_number_ = i;};
39  virtual void setOrbitNumber(int i) {orbit_number_ = i;};
40  virtual void setBX(int i) {bx_ = i;};
41  virtual void setLV1(int i) {lv1_ = i;};
42  virtual void setTriggerType(int i) {trgtype_ = i;};
43  virtual void setKchipBC(int i) {kchip_bc_ = i;};
44  virtual void setKchipEC(int i) {kchip_ec_ = i;};
45 
46  protected :
47 
49 
52  int bx_;
53  int lv1_;
54  int trgtype_;
55  int kchip_bc_;
56  int kchip_ec_;
57 
58  bool debug_;
59  bool printInHex_;
60 
63 
64  std::string print(const Word64 & word) const;
65  std::string print(const Word16 & word) const;
66 
67 };
68 
69 #endif
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
virtual void DigiToRaw(int fedId, Digis &digis, FEDRawData &fedRawData)=0
virtual void setRunNumber(int i)
virtual void setKchipEC(int i)
std::map< int, DetDigis > Digis
virtual void setKchipBC(int i)
virtual void setBX(int i)
ESDataFormatter(const edm::ParameterSet &ps)
virtual void setOrbitNumber(int i)
virtual void setLV1(int i)
unsigned long long uint64_t
Definition: Time.h:15
const edm::ParameterSet pset_
virtual void setTriggerType(int i)
std::string print(const Word64 &word) const
virtual ~ESDataFormatter()
std::vector< ESDataFrame > DetDigis