CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DCCEESRPBlock Class Reference

#include <DCCEESRPBlock.h>

Inheritance diagram for DCCEESRPBlock:
DCCSRPBlock DCCDataBlockPrototype

Public Member Functions

 DCCEESRPBlock (DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
 
void updateCollectors ()
 
- Public Member Functions inherited from DCCSRPBlock
 DCCSRPBlock (DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
 
void display (std::ostream &o)
 
unsigned short srFlag (unsigned int feChannel)
 
int unpack (const uint64_t **data, unsigned int *dwToEnd, unsigned int numbFlags=SRP_NUMBFLAGS)
 
- Public Member Functions inherited from DCCDataBlockPrototype
 DCCDataBlockPrototype (DCCDataUnpacker *unpacker, EcalElectronicsMapper *mapper, DCCEventBlock *event, bool unpack=true)
 
void enableSyncChecks ()
 
virtual unsigned int getLength ()
 
virtual int unpack (const uint64_t **data, unsigned int *dwToEnd)
 
virtual void updateEventPointers ()
 
virtual ~DCCDataBlockPrototype ()
 

Protected Member Functions

void addSRFlagToCollection ()
 
bool checkSrpIdAndNumbSRFlags ()
 

Protected Attributes

std::auto_ptr
< EESrFlagCollection > * 
eeSrFlagsDigis_
 
EcalScDetIdpSCDetId_
 
- Protected Attributes inherited from DCCSRPBlock
unsigned int bx_
 
unsigned int expNumbSrFlags_
 
unsigned int l1_
 
unsigned int nSRFlags_
 
unsigned short srFlags_ [SRP_NUMBFLAGS]
 
unsigned int srpId_
 
- Protected Attributes inherited from DCCDataBlockPrototype
unsigned int blockLength_
 
const uint64_t * data_
 
const uint64_t ** datap_
 
unsigned int * dwToEnd_
 
bool error_
 
DCCEventBlockevent_
 
EcalElectronicsMappermapper_
 
bool sync_
 
DCCDataUnpackerunpacker_
 
bool unpackInternalData_
 

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.

8  :
9 DCCSRPBlock(u,m,e,unpack)
10 {}
DCCSRPBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
Definition: DCCSRPBlock.cc:6
int unpack(const uint64_t **data, unsigned int *dwToEnd, unsigned int numbFlags=SRP_NUMBFLAGS)
Definition: DCCSRPBlock.cc:19

Member Function Documentation

void DCCEESRPBlock::addSRFlagToCollection ( )
protectedvirtual

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_.

19  {
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 }
int i
Definition: DBlmapReader.cc:9
unsigned short srFlags_[SRP_NUMBFLAGS]
Definition: DCCSRPBlock.h:59
std::vector< EcalSrFlag * > getSrFlagPointer(unsigned int feChannel)
unsigned int expNumbSrFlags_
Definition: DCCSRPBlock.h:57
unsigned short srFlag(unsigned int feChannel)
Definition: DCCSRPBlock.h:45
EcalElectronicsMapper * mapper_
EcalScDetId * pSCDetId_
Definition: DCCEESRPBlock.h:51
bool DCCEESRPBlock::checkSrpIdAndNumbSRFlags ( )
protectedvirtual

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.

42  {
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 }
unsigned int expNumbSrFlags_
Definition: DCCSRPBlock.h:57
unsigned dccId(const DetId &)
EcalElectronicsMapper * mapper_
void DCCEESRPBlock::updateCollectors ( )
virtual

Reimplemented from DCCDataBlockPrototype.

Definition at line 13 of file DCCEESRPBlock.cc.

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

13  {
14  // Set SR flag digis
16 }
std::auto_ptr< EESrFlagCollection > * eeSrFlagsDigis_
Definition: DCCEESRPBlock.h:49
DCCDataUnpacker * unpacker_
std::auto_ptr< EESrFlagCollection > * eeSrFlagsCollection()

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().