CMS 3D CMS Logo

DCCEventBlock.h
Go to the documentation of this file.
1 #ifndef DCCEVENTBLOCK_HH
2 #define DCCEVENTBLOCK_HH
3 
4 
5 /*
6  *\ Class DCCEventBlock
7  *
8  * Class responsible for managing the raw data unpacking.
9  * The class instantes the DCCMemBlock
10  *
11  * \file DCCEventBlock.h
12  *
13  *
14  * \author N. Almeida
15  * \author G. Franzoni
16  *
17 */
18 
21 #include "DCCRawDataDefinitions.h"
22 
23 class DCCFEBlock;
24 class DCCTCCBlock;
25 class DCCSRPBlock;
26 class DCCDataUnpacker;
27 class DCCMemBlock;
29 
30 
32 
33  public :
34 
35  DCCEventBlock( DCCDataUnpacker * u, EcalElectronicsMapper * m, bool hU, bool srpU, bool tccU, bool feU, bool memU, bool forceToKeepFRdata);
36 
37  virtual ~DCCEventBlock();
38 
39  virtual void unpack(const uint64_t * buffer, size_t bufferSize, unsigned int expFedId){};
40 
41  void reset();
42 
43  void enableSyncChecks();
44 
45  void enableFeIdChecks();
46 
47  void updateCollectors();
48 
49  void display(std::ostream & o);
50 
51  unsigned int smId() { return smId_; }
52  unsigned int fov() { return fov_; }
53  unsigned int mem() { return mem_; }
54  unsigned int l1A() { return l1_; }
55  unsigned int bx() { return bx_; }
57 
58  void setSRPSyncNumbers(short l1, short bx){ srpLv1_=l1; srpBx_=bx; }
59  void setFESyncNumbers(short l1, short bx, short id){ feLv1_[id]= l1; feBx_[id]=bx;}
60  void setTCCSyncNumbers(short l1, short bx, short id){ tccLv1_[id]= l1; tccBx_[id]=bx;}
61  void setHLTChannel( int channel, short value ){ hlt_[channel-1] = value; }
62  short getHLTChannel(int channel){ return hlt_[channel-1];}
63 
64 
65  protected :
66 
67  void addHeaderToCollection();
68 
69  int virtual unpackTCCBlocks(){ return BLOCK_UNPACKED;}
70 
72  const uint64_t * data_;
73  unsigned int eventSize_;
74  unsigned int dwToEnd_;
75 
76  unsigned int next_tower_search(const unsigned int current_tower_id);
77 
78  std::vector<short> feChStatus_;
79  std::vector<short> tccChStatus_;
80  std::vector<short> hlt_;
81 
82  std::vector<short> feLv1_; std::vector<short> feBx_;
83  std::vector<short> tccLv1_; std::vector<short> tccBx_;
84  short srpLv1_; short srpBx_;
85 
86 
87  unsigned int srChStatus_;
88 
89  unsigned int fov_;
90  unsigned int fedId_;
91  unsigned int bx_;
92  unsigned int l1_;
93  unsigned int triggerType_;
94  unsigned int smId_;
95  unsigned int blockLength_;
96  unsigned int dccErrors_;
97  unsigned int runNumber_;
98  unsigned int runType_;
99  unsigned int detailedTriggerType_;
100 
101  unsigned int orbitCounter_;
102  unsigned int mem_;
103  unsigned int sr_;
104  unsigned int zs_;
105  unsigned int tzs_;
106 
112 
119 
120  std::unique_ptr<EcalRawDataCollection> * dccHeaders_;
121 
122 
123 };
124 
125 
126 // this code intended for sync checking in files:
127 // DCC(FE|Mem|TCC|SRP)Block.cc
128 
129 enum BlockType {FE_MEM = 1, TCC_SRP = 2};
130 
131 bool isSynced(const unsigned int dccBx,
132  const unsigned int bx,
133  const unsigned int dccL1,
134  const unsigned int l1,
135  const BlockType type,
136  const unsigned int fov);
137 
138 #endif
type
Definition: HCALResponse.h:21
bool forceToKeepFRdata_
bool isSynced(const unsigned int dccBx, const unsigned int bx, const unsigned int dccL1, const unsigned int l1, const BlockType type, const unsigned int fov)
DCCEventBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, bool hU, bool srpU, bool tccU, bool feU, bool memU, bool forceToKeepFRdata)
void enableSyncChecks()
unsigned int runType_
Definition: DCCEventBlock.h:98
EcalElectronicsMapper * mapper_
DCCFEBlock * towerBlock_
DCCSRPBlock * srpBlock_
void setTCCSyncNumbers(short l1, short bx, short id)
Definition: DCCEventBlock.h:60
unsigned int dwToEnd_
Definition: DCCEventBlock.h:74
void enableFeIdChecks()
unsigned int mem_
unsigned int smId()
Definition: DCCEventBlock.h:51
DCCMemBlock * memBlock_
unsigned int srChStatus_
Definition: DCCEventBlock.h:87
void setHLTChannel(int channel, short value)
Definition: DCCEventBlock.h:61
unsigned int detailedTriggerType_
Definition: DCCEventBlock.h:99
std::vector< short > hlt_
Definition: DCCEventBlock.h:80
unsigned int blockLength_
Definition: DCCEventBlock.h:95
unsigned int triggerType_
Definition: DCCEventBlock.h:93
const uint64_t * data_
Definition: DCCEventBlock.h:72
DCCDataUnpacker * unpacker_
Definition: DCCEventBlock.h:71
unsigned int runNumber_
Definition: DCCEventBlock.h:97
std::vector< short > tccBx_
Definition: DCCEventBlock.h:83
unsigned int sr_
unsigned int l1_
Definition: DCCEventBlock.h:92
unsigned int bx()
Definition: DCCEventBlock.h:55
unsigned int eventSize_
Definition: DCCEventBlock.h:73
std::vector< short > tccLv1_
Definition: DCCEventBlock.h:83
std::vector< short > feBx_
Definition: DCCEventBlock.h:82
unsigned int fov()
Definition: DCCEventBlock.h:52
void setFESyncNumbers(short l1, short bx, short id)
Definition: DCCEventBlock.h:59
unsigned int orbitCounter_
Definition: value.py:1
DCCDataUnpacker * unpacker()
Definition: DCCEventBlock.h:56
DCCTCCBlock * tccBlock_
std::vector< short > feChStatus_
Definition: DCCEventBlock.h:78
unsigned long long uint64_t
Definition: Time.h:15
void updateCollectors()
unsigned int fov_
Definition: DCCEventBlock.h:89
std::vector< short > feLv1_
Definition: DCCEventBlock.h:82
unsigned int bx_
Definition: DCCEventBlock.h:91
BlockType
short getHLTChannel(int channel)
Definition: DCCEventBlock.h:62
std::unique_ptr< EcalRawDataCollection > * dccHeaders_
virtual ~DCCEventBlock()
unsigned int zs_
virtual void unpack(const uint64_t *buffer, size_t bufferSize, unsigned int expFedId)
Definition: DCCEventBlock.h:39
void addHeaderToCollection()
unsigned int next_tower_search(const unsigned int current_tower_id)
unsigned int tzs_
unsigned int smId_
Definition: DCCEventBlock.h:94
void display(std::ostream &o)
void setSRPSyncNumbers(short l1, short bx)
Definition: DCCEventBlock.h:58
virtual int unpackTCCBlocks()
Definition: DCCEventBlock.h:69
std::vector< short > tccChStatus_
Definition: DCCEventBlock.h:79
unsigned int fedId_
Definition: DCCEventBlock.h:90
unsigned int mem()
Definition: DCCEventBlock.h:53
unsigned int l1A()
Definition: DCCEventBlock.h:54
unsigned int dccErrors_
Definition: DCCEventBlock.h:96