CMS 3D CMS Logo

DCCFEBlock.h
Go to the documentation of this file.
1 #ifndef DCCFEBLOCK_HH
2 #define DCCFEBLOCK_HH
3 
4 #include <iostream>
5 #include <memory>
6 #include <cstdint>
7 #include <string>
8 #include <vector>
9 #include <map>
10 #include <utility>
11 
16 
17 #include "DCCDataBlockPrototype.h"
18 
19 class DCCEventBlock;
20 class DCCDataUnpacker;
21 
23 public:
24  DCCFEBlock(DCCDataUnpacker* u, EcalElectronicsMapper* m, DCCEventBlock* e, bool unpack, bool forceToKeepFRdata);
25 
26  ~DCCFEBlock() override { delete[] xtalGains_; }
27 
28  void zsFlag(bool zs) { zs_ = zs; }
29 
30  void enableFeIdChecks() { checkFeId_ = true; }
31 
32  void updateCollectors() override;
33 
34  void display(std::ostream& o) override;
36  int unpack(const uint64_t** data, unsigned int* dwToEnd, bool zs, unsigned int expectedTowerID);
37 
38  unsigned int getLength() override { return blockLength_; }
39 
40 protected:
41  virtual int unpackXtalData(unsigned int stripID, unsigned int xtalID) { return BLOCK_UNPACKED; };
42  virtual void fillEcalElectronicsError(std::unique_ptr<EcalElectronicsIdCollection>*){};
43 
44  bool zs_;
45  bool checkFeId_;
46  unsigned int expTowerID_;
48  unsigned int expXtalTSamples_;
50  unsigned int lastStripId_;
51  unsigned int lastXtalId_;
52 
53  unsigned int towerId_;
54  unsigned int numbDWInXtalBlock_;
55  unsigned int xtalBlockSize_;
56  unsigned int nTSamples_;
57 
58  unsigned int blockSize_;
59  unsigned int bx_;
60  unsigned int l1_;
61 
62  short* xtalGains_;
63  std::unique_ptr<EcalElectronicsIdCollection>* invalidTTIds_;
64  std::unique_ptr<EcalElectronicsIdCollection>* invalidZSXtalIds_;
65  std::unique_ptr<EcalElectronicsIdCollection>* invalidBlockLengths_;
66 };
67 
68 #endif
unsigned int towerId_
Definition: DCCFEBlock.h:53
std::unique_ptr< EcalElectronicsIdCollection > * invalidTTIds_
Definition: DCCFEBlock.h:63
unsigned int blockSize_
Definition: DCCFEBlock.h:58
std::unique_ptr< EcalElectronicsIdCollection > * invalidBlockLengths_
Definition: DCCFEBlock.h:65
unsigned int expTowerID_
Definition: DCCFEBlock.h:46
bool zs_
Definition: DCCFEBlock.h:42
unsigned int xtalBlockSize_
Definition: DCCFEBlock.h:55
unsigned int getLength() override
Definition: DCCFEBlock.h:38
int unpack(const uint64_t **data, unsigned int *dwToEnd, bool zs, unsigned int expectedTowerID)
Definition: DCCFEBlock.cc:22
virtual void fillEcalElectronicsError(std::unique_ptr< EcalElectronicsIdCollection > *)
Definition: DCCFEBlock.h:42
unsigned int nTSamples_
Definition: DCCFEBlock.h:56
void zsFlag(bool zs)
Definition: DCCFEBlock.h:28
DCCFEBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack, bool forceToKeepFRdata)
Definition: DCCFEBlock.cc:7
void updateCollectors() override
Definition: DCCFEBlock.cc:16
unsigned int lastXtalId_
Definition: DCCFEBlock.h:51
~DCCFEBlock() override
Definition: DCCFEBlock.h:26
unsigned int l1_
Definition: DCCFEBlock.h:60
bool forceToKeepFRdata_
Definition: DCCFEBlock.h:47
unsigned long long uint64_t
Definition: Time.h:13
unsigned int bx_
Definition: DCCFEBlock.h:59
unsigned int expXtalTSamples_
Definition: DCCFEBlock.h:48
unsigned int lastStripId_
Definition: DCCFEBlock.h:50
virtual int unpackXtalData(unsigned int stripID, unsigned int xtalID)
Definition: DCCFEBlock.h:41
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
virtual int unpack(const uint64_t **data, unsigned int *dwToEnd)
unsigned int numbDWInXtalBlock_
Definition: DCCFEBlock.h:54
void enableFeIdChecks()
Definition: DCCFEBlock.h:30
unsigned int unfilteredDataBlockLength_
Definition: DCCFEBlock.h:49
std::unique_ptr< EcalElectronicsIdCollection > * invalidZSXtalIds_
Definition: DCCFEBlock.h:64
void display(std::ostream &o) override
Definition: DCCFEBlock.cc:225
short * xtalGains_
Definition: DCCFEBlock.h:62
bool checkFeId_
Definition: DCCFEBlock.h:45