CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

DCCEESRPBlock Class Reference

#include <DCCEESRPBlock.h>

Inheritance diagram for DCCEESRPBlock:
DCCSRPBlock DCCDataBlockPrototype

List of all members.

Public Member Functions

 DCCEESRPBlock (DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
void updateCollectors ()

Protected Member Functions

void addSRFlagToCollection ()
bool checkSrpIdAndNumbSRFlags ()

Protected Attributes

std::auto_ptr
< EESrFlagCollection > * 
eeSrFlagsDigis_
EcalScDetIdpSCDetId_

Detailed Description

Definition at line 35 of file DCCEESRPBlock.h.


Constructor & Destructor Documentation

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

Definition at line 8 of file DCCEESRPBlock.cc.

                                                                                                            : 
DCCSRPBlock(u,m,e,unpack)
{}

Member Function Documentation

void DCCEESRPBlock::addSRFlagToCollection ( ) [protected, virtual]

Reimplemented from DCCSRPBlock.

Definition at line 19 of file DCCEESRPBlock.cc.

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

                                         {
  
  // Point to SR flags 
  data_++;
  const uint16_t * my16Bitp_ = reinterpret_cast<const uint16_t *> (data_);

  
  for( unsigned int n=0; n<expNumbSrFlags_ ;n++,pSCDetId_++ ){
   
    if( n!=0 && n%4==0 ) my16Bitp_++;
 
     unsigned short srFlag =  ( *my16Bitp_ >> ( (n-(n/4)*4) * 3 ) )  &  SRP_SRFLAG_MASK ;
     srFlags_[n] = srFlag;
     if(unpackInternalData_){
       std::vector<EcalSrFlag*> srs = mapper_->getSrFlagPointer(n+1);
       for(size_t i = 0; i < srs.size(); ++i){
         srs[i]->setValue(srFlag); 
         (*eeSrFlagsDigis_)->push_back(*((EESrFlag*)srs[i]));
       } 
     }  
  }
}
bool DCCEESRPBlock::checkSrpIdAndNumbSRFlags ( ) [protected, virtual]

Reimplemented from DCCSRPBlock.

Definition at line 42 of file DCCEESRPBlock.cc.

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

                                            {

  expNumbSrFlags_=36;//to be corrected

  int dccId = mapper_->getActiveDCC() - 600;
  if (dccId == SECTOR_EEM_CCU_JUMP || dccId == SECTOR_EEP_CCU_JUMP) expNumbSrFlags_ = 41;

  //todo :  checks to be implemented...
  return true;

} 
void DCCEESRPBlock::updateCollectors ( ) [virtual]

Member Data Documentation

Definition at line 49 of file DCCEESRPBlock.h.

Referenced by updateCollectors().

Definition at line 51 of file DCCEESRPBlock.h.

Referenced by addSRFlagToCollection().