CMS 3D CMS Logo

DCCEESRPBlock.cc
Go to the documentation of this file.
5 
7  : DCCSRPBlock(u, m, e, unpack) {}
8 
10  // Set SR flag digis
12 }
13 
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 }
34 
36  expNumbSrFlags_ = 36; //to be corrected
37 
38  int dccId = mapper_->getActiveDCC() - 600;
40  expNumbSrFlags_ = 41;
41 
42  //todo : checks to be implemented...
43  return true;
44 }
unsigned short srFlags_[SRP_NUMBFLAGS]
Definition: DCCSRPBlock.h:51
std::vector< EcalSrFlag * > getSrFlagPointer(unsigned int feChannel)
unsigned int expNumbSrFlags_
Definition: DCCSRPBlock.h:49
DCCEESRPBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
Definition: DCCEESRPBlock.cc:6
void updateCollectors() override
Definition: DCCEESRPBlock.cc:9
void addSRFlagToCollection() override
unsigned short srFlag(unsigned int feChannel)
Definition: DCCSRPBlock.h:38
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
bool checkSrpIdAndNumbSRFlags() override
unsigned dccId(DetId const &, EcalElectronicsMapping const *)
std::unique_ptr< EESrFlagCollection > * eeSrFlagsDigis_
Definition: DCCEESRPBlock.h:41
DCCDataUnpacker * unpacker_
EcalElectronicsMapper * mapper_
std::unique_ptr< EESrFlagCollection > * eeSrFlagsCollection()