CMS 3D CMS Logo

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 
9 #include "DCCBlockPrototype.h"
10 
11 class DCCTBTowerBlock;
12 class DCCTBDataParser;
13 class DCCTBTrailerBlock;
14 class DCCTBTCCBlock;
15 class DCCTBSRPBlock;
16 
18 
19  public :
20 
23  const uint32_t * buffer,
24  uint32_t numbBytes,
25  uint32_t wordsToEnd,
26  uint32_t wordBufferOffset = 0 ,
27  uint32_t wordEventOffset = 0
28  );
29 
30  ~DCCTBEventBlock() override;
31 
32  void dataCheck();
33 
34  std::vector< DCCTBTowerBlock * > & towerBlocks();
35  std::vector< DCCTBTCCBlock * > & tccBlocks();
38  std::vector< DCCTBTowerBlock * > towerBlocksById(uint32_t towerId);
40  std::pair<bool,std::string> compare(DCCTBEventBlock * );
41 
42  bool eventHasErrors();
44  void displayEvent(std::ostream & os=std::cout);
45 
46 
47  protected :
48  enum dccFields{
49 
54 
59 
60  SR_NREAD = 0,
61 
62 
63  BOE = 0x5,
64 
66 
69 
70 
71  };
72 
73  std::vector< DCCTBTowerBlock * > towerBlocks_ ;
74  std::vector< DCCTBTCCBlock * > tccBlocks_ ;
78  bool emptyEvent;
79 };
80 
81 
82 inline std::vector< DCCTBTowerBlock * > & DCCTBEventBlock::towerBlocks() { return towerBlocks_; }
83 inline std::vector< DCCTBTCCBlock * > & DCCTBEventBlock::tccBlocks() { return tccBlocks_; }
86 
87 #endif
std::vector< DCCTBTCCBlock * > tccBlocks_
Definition: DCCEventBlock.h:74
DCCTBSRPBlock * srpBlock()
Definition: DCCEventBlock.h:84
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
DCCTBTrailerBlock * trailerBlock()
Definition: DCCEventBlock.h:85
std::vector< DCCTBTCCBlock * > & tccBlocks()
Definition: DCCEventBlock.h:83
std::vector< DCCTBTowerBlock * > & towerBlocks()
Definition: DCCEventBlock.h:82
std::pair< bool, std::string > compare(DCCTBEventBlock *)
std::vector< DCCTBTowerBlock * > towerBlocksById(uint32_t towerId)
l1t::HGCalTowerID towerId
Definition: classes.h:34
std::vector< DCCTBTowerBlock * > towerBlocks_
Definition: DCCEventBlock.h:73
std::string eventErrorString()
DCCTBTrailerBlock * dccTrailerBlock_
Definition: DCCEventBlock.h:75
DCCTBSRPBlock * srpBlock_
Definition: DCCEventBlock.h:76
virtual std::pair< bool, std::string > compare(DCCTBBlockPrototype *block)
uint32_t wordBufferOffset_
Definition: DCCEventBlock.h:77