CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DCCEESRPBlock Class Reference

#include <DCCEESRPBlock.h>

Inheritance diagram for DCCEESRPBlock:
DCCSRPBlock DCCDataBlockPrototype

Public Member Functions

 DCCEESRPBlock (DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
 
void updateCollectors () override
 
- Public Member Functions inherited from DCCSRPBlock
 DCCSRPBlock (DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
 
void display (std::ostream &o) override
 
unsigned short srFlag (unsigned int feChannel)
 
int unpack (const uint64_t **data, unsigned int *dwToEnd, unsigned int numbFlags=SRP_NUMBFLAGS)
 
- Public Member Functions inherited from DCCDataBlockPrototype
 DCCDataBlockPrototype (DCCDataUnpacker *unpacker, EcalElectronicsMapper *mapper, DCCEventBlock *event, bool unpack=true)
 
void enableSyncChecks ()
 
virtual unsigned int getLength ()
 
virtual int unpack (const uint64_t **data, unsigned int *dwToEnd)
 
virtual void updateEventPointers ()
 
virtual ~DCCDataBlockPrototype ()
 

Protected Member Functions

void addSRFlagToCollection () override
 
bool checkSrpIdAndNumbSRFlags () override
 

Protected Attributes

std::unique_ptr
< EESrFlagCollection > * 
eeSrFlagsDigis_
 
- Protected Attributes inherited from DCCSRPBlock
unsigned int bx_
 
unsigned int expNumbSrFlags_
 
unsigned int l1_
 
unsigned int nSRFlags_
 
unsigned short srFlags_ [SRP_NUMBFLAGS]
 
unsigned int srpId_
 
- Protected Attributes inherited from DCCDataBlockPrototype
unsigned int blockLength_
 
const uint64_t * data_
 
const uint64_t ** datap_
 
unsigned int * dwToEnd_
 
bool error_
 
DCCEventBlockevent_
 
EcalElectronicsMappermapper_
 
bool sync_
 
DCCDataUnpackerunpacker_
 
bool unpackInternalData_
 

Detailed Description

Definition at line 30 of file DCCEESRPBlock.h.

Constructor & Destructor Documentation

DCCEESRPBlock::DCCEESRPBlock ( DCCDataUnpacker u,
EcalElectronicsMapper m,
DCCEventBlock e,
bool  unpack 
)

Definition at line 6 of file DCCEESRPBlock.cc.

7  : DCCSRPBlock(u, m, e, unpack) {}
DCCSRPBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
Definition: DCCSRPBlock.cc:6
int unpack(const uint64_t **data, unsigned int *dwToEnd, unsigned int numbFlags=SRP_NUMBFLAGS)
Definition: DCCSRPBlock.cc:16

Member Function Documentation

void DCCEESRPBlock::addSRFlagToCollection ( )
overrideprotectedvirtual

Reimplemented from DCCSRPBlock.

Definition at line 14 of file DCCEESRPBlock.cc.

References DCCDataBlockPrototype::data_, DCCSRPBlock::expNumbSrFlags_, EcalElectronicsMapper::getSrFlagPointer(), mps_fire::i, DCCDataBlockPrototype::mapper_, dqmiodumpmetadata::n, DCCSRPBlock::srFlag(), DCCSRPBlock::srFlags_, SRP_SRFLAG_MASK, and DCCDataBlockPrototype::unpackInternalData_.

14  {
15  // Point to SR flags
16  data_++;
17  const uint16_t *my16Bitp_ = reinterpret_cast<const uint16_t *>(data_);
18 
19  for (unsigned int n = 0; n < expNumbSrFlags_; ++n) {
20  if (n != 0 && n % 4 == 0)
21  my16Bitp_++;
22 
23  unsigned short srFlag = (*my16Bitp_ >> ((n - (n / 4) * 4) * 3)) & SRP_SRFLAG_MASK;
24  srFlags_[n] = srFlag;
25  if (unpackInternalData_) {
26  std::vector<EcalSrFlag *> srs = mapper_->getSrFlagPointer(n + 1);
27  for (size_t i = 0; i < srs.size(); ++i) {
28  srs[i]->setValue(srFlag);
29  (*eeSrFlagsDigis_)->push_back(*((EESrFlag *)srs[i]));
30  }
31  }
32  }
33 }
unsigned short srFlags_[SRP_NUMBFLAGS]
Definition: DCCSRPBlock.h:51
std::vector< EcalSrFlag * > getSrFlagPointer(unsigned int feChannel)
unsigned int expNumbSrFlags_
Definition: DCCSRPBlock.h:49
unsigned short srFlag(unsigned int feChannel)
Definition: DCCSRPBlock.h:38
EcalElectronicsMapper * mapper_
bool DCCEESRPBlock::checkSrpIdAndNumbSRFlags ( )
overrideprotectedvirtual

Reimplemented from DCCSRPBlock.

Definition at line 35 of file DCCEESRPBlock.cc.

References ecaldqm::dccId(), DCCSRPBlock::expNumbSrFlags_, EcalElectronicsMapper::getActiveDCC(), DCCDataBlockPrototype::mapper_, SECTOR_EEM_CCU_JUMP, and SECTOR_EEP_CCU_JUMP.

35  {
36  expNumbSrFlags_ = 36; //to be corrected
37 
38  int dccId = mapper_->getActiveDCC() - 600;
39  if (dccId == SECTOR_EEM_CCU_JUMP || dccId == SECTOR_EEP_CCU_JUMP)
40  expNumbSrFlags_ = 41;
41 
42  //todo : checks to be implemented...
43  return true;
44 }
unsigned int expNumbSrFlags_
Definition: DCCSRPBlock.h:49
unsigned dccId(DetId const &, EcalElectronicsMapping const *)
EcalElectronicsMapper * mapper_
void DCCEESRPBlock::updateCollectors ( )
overridevirtual

Reimplemented from DCCDataBlockPrototype.

Definition at line 9 of file DCCEESRPBlock.cc.

References DCCDataUnpacker::eeSrFlagsCollection(), eeSrFlagsDigis_, and DCCDataBlockPrototype::unpacker_.

9  {
10  // Set SR flag digis
12 }
std::unique_ptr< EESrFlagCollection > * eeSrFlagsDigis_
Definition: DCCEESRPBlock.h:41
DCCDataUnpacker * unpacker_
std::unique_ptr< EESrFlagCollection > * eeSrFlagsCollection()

Member Data Documentation

std::unique_ptr<EESrFlagCollection>* DCCEESRPBlock::eeSrFlagsDigis_
protected

Definition at line 41 of file DCCEESRPBlock.h.

Referenced by updateCollectors().