CMS 3D CMS Logo

DCCEESRPBlock Class Reference

#include <EventFilter/EcalRawToDigiDev/interface/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.

00008                                                                                                             : 
00009 DCCSRPBlock(u,m,e,unpack)
00010 {}


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(), DCCDataBlockPrototype::mapper_, n, pSCDetId_, EcalSrFlag::setValue(), sr, DCCSRPBlock::srFlag(), DCCSRPBlock::srFlags_, SRP_SRFLAG_MASK, and DCCDataBlockPrototype::unpackInternalData_.

00019                                          {
00020   
00021   // Point to SR flags 
00022   data_++;
00023   uint16_t * my16Bitp_ = reinterpret_cast<uint16_t *> (data_);
00024 
00025   
00026   for( uint n=0; n<expNumbSrFlags_ ;n++,pSCDetId_++ ){
00027    
00028     if( n!=0 && n%4==0 ) my16Bitp_++;
00029  
00030      ushort srFlag =  ( *my16Bitp_ >> ( (n-(n/4)*4) * 3 ) )  &  SRP_SRFLAG_MASK ;
00031      srFlags_[n] = srFlag;
00032      if(unpackInternalData_){
00033        EESrFlag * sr = (EESrFlag*) mapper_->getSrFlagPointer(n+1);
00034        if(sr){
00035          sr->setValue(srFlag); 
00036          (*eeSrFlagsDigis_)->push_back(*sr);
00037        } 
00038     }
00039      
00040   }
00041    
00042 }

bool DCCEESRPBlock::checkSrpIdAndNumbSRFlags (  )  [protected, virtual]

Reimplemented from DCCSRPBlock.

Definition at line 44 of file DCCEESRPBlock.cc.

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

00044                                             {
00045 
00046   expNumbSrFlags_=36;//to be corrected
00047 
00048   int dccId = mapper_->getActiveDCC() - 600;
00049   if (dccId == SECTOR_EEM_CCU_JUMP || dccId == SECTOR_EEP_CCU_JUMP) expNumbSrFlags_ = 41;
00050 
00051   //todo :  checks to be implemented...
00052   return true;
00053 
00054 } 

void DCCEESRPBlock::updateCollectors (  )  [virtual]

Reimplemented from DCCDataBlockPrototype.

Definition at line 13 of file DCCEESRPBlock.cc.

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

00013                                     {
00014   // Set SR flag digis
00015   eeSrFlagsDigis_ = unpacker_->eeSrFlagsCollection(); 
00016 }


Member Data Documentation

std::auto_ptr<EESrFlagCollection>* DCCEESRPBlock::eeSrFlagsDigis_ [protected]

Definition at line 49 of file DCCEESRPBlock.h.

Referenced by updateCollectors().

EcalScDetId* DCCEESRPBlock::pSCDetId_ [protected]

Definition at line 51 of file DCCEESRPBlock.h.

Referenced by addSRFlagToCollection().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:41 2009 for CMSSW by  doxygen 1.5.4