CMS 3D CMS Logo

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