CMS 3D CMS Logo

DCCSRPBlock.h
Go to the documentation of this file.
1 #ifndef DCCSRPBLOCK_HH
2 #define DCCSRPBLOCK_HH
3 
4 /*
5  *\ Class DCCSRPBlock
6  *
7  * Class responsible for SR flag unpacking.
8  *
9  * \file DCCSRPBlock.h
10  *
11  *
12  * \author N. Almeida
13  *
14 */
15 
16 #include <iostream>
17 #include <memory>
18 #include <cstdint>
19 #include <string>
20 #include <vector>
21 #include <map>
22 #include <utility>
23 
24 #include "DCCDataBlockPrototype.h"
25 
29 
31 public:
33 
34  void display(std::ostream& o) override;
36  int unpack(const uint64_t** data, unsigned int* dwToEnd, unsigned int numbFlags = SRP_NUMBFLAGS);
37 
38  unsigned short srFlag(unsigned int feChannel) { return srFlags_[feChannel - 1]; }
39 
40 protected:
41  virtual void addSRFlagToCollection(){};
42 
43  virtual bool checkSrpIdAndNumbSRFlags() { return true; };
44 
45  unsigned int srpId_;
46  unsigned int bx_;
47  unsigned int l1_;
48  unsigned int nSRFlags_;
49  unsigned int expNumbSrFlags_;
50 
51  unsigned short srFlags_[SRP_NUMBFLAGS];
52 };
53 
54 #endif
unsigned int srpId_
Definition: DCCSRPBlock.h:43
unsigned short srFlags_[SRP_NUMBFLAGS]
Definition: DCCSRPBlock.h:51
void display(std::ostream &o) override
Definition: DCCSRPBlock.cc:93
unsigned int expNumbSrFlags_
Definition: DCCSRPBlock.h:49
unsigned int l1_
Definition: DCCSRPBlock.h:47
virtual bool checkSrpIdAndNumbSRFlags()
Definition: DCCSRPBlock.h:43
virtual void addSRFlagToCollection()
Definition: DCCSRPBlock.h:41
unsigned short srFlag(unsigned int feChannel)
Definition: DCCSRPBlock.h:38
unsigned int bx_
Definition: DCCSRPBlock.h:46
DCCSRPBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
Definition: DCCSRPBlock.cc:6
unsigned long long uint64_t
Definition: Time.h:13
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int unpack(const uint64_t **data, unsigned int *dwToEnd, unsigned int numbFlags=SRP_NUMBFLAGS)
Definition: DCCSRPBlock.cc:16
virtual int unpack(const uint64_t **data, unsigned int *dwToEnd)
unsigned int nSRFlags_
Definition: DCCSRPBlock.h:48