CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
int i
Definition: DBlmapReader.cc:9
unsigned short srFlags_[SRP_NUMBFLAGS]
Definition: DCCSRPBlock.h:57
bool checkSrpIdAndNumbSRFlags()
std::vector< EcalSrFlag * > getSrFlagPointer(unsigned int feChannel)
void updateCollectors()
void addSRFlagToCollection()
unsigned int expNumbSrFlags_
Definition: DCCSRPBlock.h:55
DCCEESRPBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
Definition: DCCEESRPBlock.cc:8
unsigned short srFlag(unsigned int feChannel)
Definition: DCCSRPBlock.h:43
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