CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  * $Date: 2012/08/22 01:11:31 $
14  * $Revision: 1.8 $
15  *
16  * \author N. Almeida
17  * \author G. Franzoni
18  *
19 */
20 
23 #include "DCCRawDataDefinitions.h"
24 
25 class DCCFEBlock;
26 class DCCTCCBlock;
27 class DCCSRPBlock;
28 class DCCDataUnpacker;
29 class DCCMemBlock;
31 
32 
34 
35  public :
36 
37  DCCEventBlock( DCCDataUnpacker * u, EcalElectronicsMapper * m, bool hU, bool srpU, bool tccU, bool feU, bool memU, bool forceToKeepFRdata);
38 
39  virtual ~DCCEventBlock();
40 
41  virtual void unpack(const uint64_t * buffer, size_t bufferSize, unsigned int expFedId){};
42 
43  void reset();
44 
45  void enableSyncChecks();
46 
47  void enableFeIdChecks();
48 
49  void updateCollectors();
50 
51  void display(std::ostream & o);
52 
53  unsigned int smId() { return smId_; }
54  unsigned int fov() { return fov_; }
55  unsigned int mem() { return mem_; }
56  unsigned int l1A() { return l1_; }
57  unsigned int bx() { return bx_; }
59 
60  void setSRPSyncNumbers(short l1, short bx){ srpLv1_=l1; srpBx_=bx; }
61  void setFESyncNumbers(short l1, short bx, short id){ feLv1_[id]= l1; feBx_[id]=bx;}
62  void setTCCSyncNumbers(short l1, short bx, short id){ tccLv1_[id]= l1; tccBx_[id]=bx;}
63  void setHLTChannel( int channel, short value ){ hlt_[channel-1] = value; }
64  short getHLTChannel(int channel){ return hlt_[channel-1];}
65 
66 
67  protected :
68 
69  void addHeaderToCollection();
70 
71  int virtual unpackTCCBlocks(){ return BLOCK_UNPACKED;}
72 
74  const uint64_t * data_;
75  unsigned int eventSize_;
76  unsigned int dwToEnd_;
77 
78  unsigned int next_tower_search(const unsigned int current_tower_id);
79 
80  std::vector<short> feChStatus_;
81  std::vector<short> tccChStatus_;
82  std::vector<short> hlt_;
83 
84  std::vector<short> feLv1_; std::vector<short> feBx_;
85  std::vector<short> tccLv1_; std::vector<short> tccBx_;
86  short srpLv1_; short srpBx_;
87 
88 
89  unsigned int srChStatus_;
90 
91  unsigned int fov_;
92  unsigned int fedId_;
93  unsigned int bx_;
94  unsigned int l1_;
95  unsigned int triggerType_;
96  unsigned int smId_;
97  unsigned int blockLength_;
98  unsigned int dccErrors_;
99  unsigned int runNumber_;
100  unsigned int runType_;
101  unsigned int detailedTriggerType_;
102 
103  unsigned int orbitCounter_;
104  unsigned int mem_;
105  unsigned int sr_;
106  unsigned int zs_;
107  unsigned int tzs_;
108 
114 
121 
122  std::auto_ptr<EcalRawDataCollection> * dccHeaders_;
123 
124 
125 };
126 
127 
128 // this code intended for sync checking in files:
129 // DCC(FE|Mem|TCC|SRP)Block.cc
130 
131 enum BlockType {FE_MEM = 1, TCC_SRP = 2};
132 
133 bool isSynced(const unsigned int dccBx,
134  const unsigned int bx,
135  const unsigned int dccL1,
136  const unsigned int l1,
137  const BlockType type,
138  const unsigned int fov);
139 
140 #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_
EcalElectronicsMapper * mapper_
DCCFEBlock * towerBlock_
DCCSRPBlock * srpBlock_
void setTCCSyncNumbers(short l1, short bx, short id)
Definition: DCCEventBlock.h:62
unsigned int dwToEnd_
Definition: DCCEventBlock.h:76
void enableFeIdChecks()
unsigned int mem_
unsigned int smId()
Definition: DCCEventBlock.h:53
std::auto_ptr< EcalRawDataCollection > * dccHeaders_
DCCMemBlock * memBlock_
unsigned int srChStatus_
Definition: DCCEventBlock.h:89
void setHLTChannel(int channel, short value)
Definition: DCCEventBlock.h:63
unsigned int detailedTriggerType_
std::vector< short > hlt_
Definition: DCCEventBlock.h:82
unsigned int blockLength_
Definition: DCCEventBlock.h:97
unsigned int triggerType_
Definition: DCCEventBlock.h:95
const uint64_t * data_
Definition: DCCEventBlock.h:74
DCCDataUnpacker * unpacker_
Definition: DCCEventBlock.h:73
unsigned int runNumber_
Definition: DCCEventBlock.h:99
std::vector< short > tccBx_
Definition: DCCEventBlock.h:85
unsigned int sr_
unsigned int l1_
Definition: DCCEventBlock.h:94
unsigned int bx()
Definition: DCCEventBlock.h:57
unsigned int eventSize_
Definition: DCCEventBlock.h:75
std::vector< short > tccLv1_
Definition: DCCEventBlock.h:85
std::vector< short > feBx_
Definition: DCCEventBlock.h:84
unsigned int fov()
Definition: DCCEventBlock.h:54
void setFESyncNumbers(short l1, short bx, short id)
Definition: DCCEventBlock.h:61
unsigned int orbitCounter_
DCCDataUnpacker * unpacker()
Definition: DCCEventBlock.h:58
DCCTCCBlock * tccBlock_
std::vector< short > feChStatus_
Definition: DCCEventBlock.h:80
unsigned long long uint64_t
Definition: Time.h:15
void updateCollectors()
unsigned int fov_
Definition: DCCEventBlock.h:91
std::vector< short > feLv1_
Definition: DCCEventBlock.h:84
unsigned int bx_
Definition: DCCEventBlock.h:93
BlockType
short getHLTChannel(int channel)
Definition: DCCEventBlock.h:64
virtual ~DCCEventBlock()
unsigned int zs_
virtual void unpack(const uint64_t *buffer, size_t bufferSize, unsigned int expFedId)
Definition: DCCEventBlock.h:41
void addHeaderToCollection()
unsigned int next_tower_search(const unsigned int current_tower_id)
unsigned int tzs_
unsigned int smId_
Definition: DCCEventBlock.h:96
void display(std::ostream &o)
void setSRPSyncNumbers(short l1, short bx)
Definition: DCCEventBlock.h:60
virtual int unpackTCCBlocks()
Definition: DCCEventBlock.h:71
std::vector< short > tccChStatus_
Definition: DCCEventBlock.h:81
unsigned int fedId_
Definition: DCCEventBlock.h:92
unsigned int mem()
Definition: DCCEventBlock.h:55
unsigned int l1A()
Definition: DCCEventBlock.h:56
unsigned int dccErrors_
Definition: DCCEventBlock.h:98