CMS 3D CMS Logo

DCCEESRPBlock.cc
Go to the documentation of this file.
5 
6 
7 
9 DCCSRPBlock(u,m,e,unpack)
10 {}
11 
12 
14  // Set SR flag digis
16 }
17 
18 
20 
21  // Point to SR flags
22  data_++;
23  const uint16_t * my16Bitp_ = reinterpret_cast<const uint16_t *> (data_);
24 
25 
26  for( unsigned int n=0; n<expNumbSrFlags_ ;n++,pSCDetId_++ ){
27 
28  if( n!=0 && n%4==0 ) my16Bitp_++;
29 
30  unsigned short srFlag = ( *my16Bitp_ >> ( (n-(n/4)*4) * 3 ) ) & SRP_SRFLAG_MASK ;
31  srFlags_[n] = srFlag;
33  std::vector<EcalSrFlag*> srs = mapper_->getSrFlagPointer(n+1);
34  for(size_t i = 0; i < srs.size(); ++i){
35  srs[i]->setValue(srFlag);
36  (*eeSrFlagsDigis_)->push_back(*((EESrFlag*)srs[i]));
37  }
38  }
39  }
40 }
41 
43 
44  expNumbSrFlags_=36;//to be corrected
45 
46  int dccId = mapper_->getActiveDCC() - 600;
47  if (dccId == SECTOR_EEM_CCU_JUMP || dccId == SECTOR_EEP_CCU_JUMP) expNumbSrFlags_ = 41;
48 
49  //todo : checks to be implemented...
50  return true;
51 
52 }
53 
unsigned short srFlags_[SRP_NUMBFLAGS]
Definition: DCCSRPBlock.h:57
std::vector< EcalSrFlag * > getSrFlagPointer(unsigned int feChannel)
unsigned int expNumbSrFlags_
Definition: DCCSRPBlock.h:55
DCCEESRPBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
Definition: DCCEESRPBlock.cc:8
void updateCollectors() override
void addSRFlagToCollection() override
unsigned short srFlag(unsigned int feChannel)
Definition: DCCSRPBlock.h:43
bool checkSrpIdAndNumbSRFlags() override
std::unique_ptr< EESrFlagCollection > * eeSrFlagsDigis_
Definition: DCCEESRPBlock.h:47
DCCDataUnpacker * unpacker_
EcalElectronicsMapper * mapper_
unsigned dccId(DetId const &)
std::unique_ptr< EESrFlagCollection > * eeSrFlagsCollection()
EcalScDetId * pSCDetId_
Definition: DCCEESRPBlock.h:49