CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DCCEventBlock.h
Go to the documentation of this file.
1 // Date : 30/05/2005
2 // Author : N.Almeida (LIP)
3 // falta fazer o update dos block sizes
4 
5 #ifndef DCCTBEVENTBLOCK_HH
6 #define DCCTBEVENTBLOCK_HH
7 
8 #include "DCCBlockPrototype.h"
9 
10 class DCCTBTowerBlock;
11 class DCCTBDataParser;
12 class DCCTBTrailerBlock;
13 class DCCTBTCCBlock;
14 class DCCTBSRPBlock;
15 
17 public:
19  const uint32_t* buffer,
20  uint32_t numbBytes,
21  uint32_t wordsToEnd,
22  uint32_t wordBufferOffset = 0,
23  uint32_t wordEventOffset = 0);
24 
25  ~DCCTBEventBlock() override;
26 
27  void dataCheck();
28 
29  std::vector<DCCTBTowerBlock*>& towerBlocks();
30  std::vector<DCCTBTCCBlock*>& tccBlocks();
33  std::vector<DCCTBTowerBlock*> towerBlocksById(uint32_t towerId);
35  std::pair<bool, std::string> compare(DCCTBEventBlock*);
36 
37  bool eventHasErrors();
39  void displayEvent(std::ostream& os = std::cout);
40 
41 protected:
42  enum dccFields {
43 
48 
53 
54  SR_NREAD = 0,
55 
56  BOE = 0x5,
57 
59 
62 
63  };
64 
65  std::vector<DCCTBTowerBlock*> towerBlocks_;
66  std::vector<DCCTBTCCBlock*> tccBlocks_;
70  bool emptyEvent;
71 };
72 
73 inline std::vector<DCCTBTowerBlock*>& DCCTBEventBlock::towerBlocks() { return towerBlocks_; }
74 inline std::vector<DCCTBTCCBlock*>& DCCTBEventBlock::tccBlocks() { return tccBlocks_; }
77 
78 #endif
std::vector< DCCTBTCCBlock * > tccBlocks_
Definition: DCCEventBlock.h:66
DCCTBSRPBlock * srpBlock()
Definition: DCCEventBlock.h:75
DCCTBEventBlock(DCCTBDataParser *parser, const uint32_t *buffer, uint32_t numbBytes, uint32_t wordsToEnd, uint32_t wordBufferOffset=0, uint32_t wordEventOffset=0)
void displayEvent(std::ostream &os=std::cout)
~DCCTBEventBlock() override
unsigned towerId(DetId const &, EcalElectronicsMapping const *)
std::vector< DCCTBTowerBlock * > towerBlocks_
Definition: DCCEventBlock.h:65
DCCTBTrailerBlock * trailerBlock()
Definition: DCCEventBlock.h:76
std::vector< DCCTBTCCBlock * > & tccBlocks()
Definition: DCCEventBlock.h:74
std::vector< DCCTBTowerBlock * > & towerBlocks()
Definition: DCCEventBlock.h:73
std::pair< bool, std::string > compare(DCCTBEventBlock *)
std::vector< DCCTBTowerBlock * > towerBlocksById(uint32_t towerId)
std::string eventErrorString()
DCCTBTrailerBlock * dccTrailerBlock_
Definition: DCCEventBlock.h:67
tuple cout
Definition: gather_cfg.py:144
DCCTBSRPBlock * srpBlock_
Definition: DCCEventBlock.h:68
virtual std::pair< bool, std::string > compare(DCCTBBlockPrototype *block)
uint32_t wordBufferOffset_
Definition: DCCEventBlock.h:69