CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions
DCCEBTCCBlock Class Reference

#include <DCCEBTCCBlock.h>

Inheritance diagram for DCCEBTCCBlock:
DCCTCCBlock DCCDataBlockPrototype

Public Member Functions

void addTriggerPrimitivesToCollection () override
 
 DCCEBTCCBlock (DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
 
void updateCollectors () override
 
- Public Member Functions inherited from DCCTCCBlock
 DCCTCCBlock (DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
 
void display (std::ostream &o) override
 
virtual int unpack (const uint64_t **data, unsigned int *dwToEnd)
 
int unpack (const uint64_t **data, unsigned int *dwToEnd, short tccChId=0)
 
- 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

bool checkTccIdAndNumbTTs () override
 

Additional Inherited Members

- Protected Attributes inherited from DCCTCCBlock
unsigned int bx_
 
unsigned int expNumbTTs_
 
unsigned int expTccId_
 
unsigned int l1_
 
unsigned int nTSamples_
 
unsigned int nTTs_
 
EcalPseudoStripInputDigipPS_
 
unsigned int ps_
 
std::unique_ptr< EcalPSInputDigiCollection > * pss_
 
EcalTriggerPrimitiveDigipTP_
 
EcalTrigTowerDetIdpTTDetId_
 
unsigned int tccId_
 
std::unique_ptr< EcalTrigPrimDigiCollection > * tps_
 
- 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 32 of file DCCEBTCCBlock.h.

Constructor & Destructor Documentation

◆ DCCEBTCCBlock()

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

Member Function Documentation

◆ addTriggerPrimitivesToCollection()

void DCCEBTCCBlock::addTriggerPrimitivesToCollection ( )
overridevirtual

Reimplemented from DCCTCCBlock.

Definition at line 40 of file DCCEBTCCBlock.cc.

40  {
41  //point to trigger data
42  data_++;
43 
44  unsigned int towersInPhi = EcalElectronicsMapper::kTowersInPhi;
45 
46  const uint16_t* tccP_ = reinterpret_cast<const uint16_t*>(data_);
47 
48  for (unsigned int i = 1; i <= expNumbTTs_; i++) {
49  unsigned int theTT = i;
50 
51  if (NUMB_SM_EB_PLU_MIN <= mapper_->getActiveSM() && mapper_->getActiveSM() <= NUMB_SM_EB_PLU_MAX) {
52  unsigned int u = (i - 1) % towersInPhi;
53  u = towersInPhi - u;
54  theTT = ((i - 1) / towersInPhi) * towersInPhi + u;
55  }
56 
57  pTP_ = mapper_->getTPPointer(tccId_, theTT);
58  for (unsigned int ns = 0; ns < nTSamples_; ns++, tccP_++) {
59  pTP_->setSampleValue(ns, (*tccP_));
60  (*tps_)->push_back(*pTP_);
61  }
62  }
63 }

References DCCDataBlockPrototype::data_, DCCTCCBlock::expNumbTTs_, EcalElectronicsMapper::getActiveSM(), EcalElectronicsMapper::getTPPointer(), mps_fire::i, EcalElectronicsMapper::kTowersInPhi, DCCDataBlockPrototype::mapper_, DCCTCCBlock::nTSamples_, NUMB_SM_EB_PLU_MAX, DCCTCCBlock::pTP_, EcalTriggerPrimitiveDigi::setSampleValue(), and DCCTCCBlock::tccId_.

◆ checkTccIdAndNumbTTs()

bool DCCEBTCCBlock::checkTccIdAndNumbTTs ( )
overrideprotectedvirtual

Reimplemented from DCCTCCBlock.

Definition at line 14 of file DCCEBTCCBlock.cc.

14  {
16 
17  if (tccId_ != expTccId_) {
19  edm::LogWarning("IncorrectBlock") << "Error on event " << event_->l1A() << " with bx " << event_->bx()
20  << " in fed " << mapper_->getActiveDCC() << "\n TCC id is " << tccId_
21  << " while expected is " << expTccId_ << "\n TCC Block Skipped ...";
22  //todo : add this to error colection
23  }
24  return false;
25  }
26 
27  //Check number of TT Flags
28  if (nTTs_ != expNumbTTs_) {
30  edm::LogWarning("IncorrectBlock") << "Unable to unpack TCC block for event " << event_->l1A() << " in fed "
31  << mapper_->getActiveDCC() << "\n Number of TTs " << nTTs_
32  << " is different from expected " << expNumbTTs_ << "\n TCC Block Skipped ...";
33  //todo : add this to error colection
34  }
35  return false;
36  }
37  return true;
38 }

References DCCEventBlock::bx(), DCCDataBlockPrototype::event_, DCCTCCBlock::expNumbTTs_, DCCTCCBlock::expTccId_, EcalElectronicsMapper::getActiveDCC(), EcalElectronicsMapper::getActiveSM(), DCCEventBlock::l1A(), DCCDataBlockPrototype::mapper_, DCCTCCBlock::nTTs_, DCCDataUnpacker::silentMode_, DCCTCCBlock::tccId_, and TCCID_SMID_SHIFT_EB.

◆ updateCollectors()

void DCCEBTCCBlock::updateCollectors ( )
overridevirtual
mps_fire.i
i
Definition: mps_fire.py:355
DCCDataBlockPrototype::data_
const uint64_t * data_
Definition: DCCDataBlockPrototype.h:73
DCCTCCBlock::DCCTCCBlock
DCCTCCBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
Definition: DCCTCCBlock.cc:7
EcalElectronicsMapper::getActiveSM
unsigned int getActiveSM()
Definition: EcalElectronicsMapper.h:128
DCCDataUnpacker::silentMode_
static std::atomic< bool > silentMode_
Definition: DCCDataUnpacker.h:185
DCCTCCBlock::unpack
int unpack(const uint64_t **data, unsigned int *dwToEnd, short tccChId=0)
Definition: DCCTCCBlock.cc:10
DCCTCCBlock::nTSamples_
unsigned int nTSamples_
Definition: DCCTCCBlock.h:57
EcalTriggerPrimitiveDigi::setSampleValue
void setSampleValue(int i, uint16_t value)
Definition: EcalTriggerPrimitiveDigi.h:37
DCCTCCBlock::pTP_
EcalTriggerPrimitiveDigi * pTP_
Definition: DCCTCCBlock.h:63
EcalElectronicsMapper::getEBTCCBlockLength
unsigned int getEBTCCBlockLength()
Definition: EcalElectronicsMapper.h:136
EcalElectronicsMapper::kTowersInPhi
Definition: EcalElectronicsMapper.h:161
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
DCCDataBlockPrototype::unpacker_
DCCDataUnpacker * unpacker_
Definition: DCCDataBlockPrototype.h:67
TCCID_SMID_SHIFT_EB
Definition: DCCRawDataDefinitions.h:40
DCCEventBlock::bx
unsigned int bx()
Definition: DCCEventBlock.h:58
EcalElectronicsMapper::getActiveDCC
unsigned int getActiveDCC()
Definition: EcalElectronicsMapper.h:126
TCC_EB_NUMBTTS
Definition: DCCRawDataDefinitions.h:39
DCCTCCBlock::tps_
std::unique_ptr< EcalTrigPrimDigiCollection > * tps_
Definition: DCCTCCBlock.h:65
edm::LogWarning
Definition: MessageLogger.h:141
NUMB_SM_EB_PLU_MAX
Definition: DCCRawDataDefinitions.h:57
DCCDataBlockPrototype::event_
DCCEventBlock * event_
Definition: DCCDataBlockPrototype.h:70
DCCTCCBlock::expNumbTTs_
unsigned int expNumbTTs_
Definition: DCCTCCBlock.h:58
DCCEventBlock::l1A
unsigned int l1A()
Definition: DCCEventBlock.h:57
DCCDataBlockPrototype::mapper_
EcalElectronicsMapper * mapper_
Definition: DCCDataBlockPrototype.h:69
EcalElectronicsMapper::getTPPointer
EcalTriggerPrimitiveDigi * getTPPointer(unsigned int tccId, unsigned int tower)
Definition: EcalElectronicsMapper.h:98
DCCTCCBlock::tccId_
unsigned int tccId_
Definition: DCCTCCBlock.h:51
DCCDataUnpacker::ecalTpsCollection
std::unique_ptr< EcalTrigPrimDigiCollection > * ecalTpsCollection()
Definition: DCCDataUnpacker.h:122
DCCDataBlockPrototype::blockLength_
unsigned int blockLength_
Definition: DCCDataBlockPrototype.h:76
DCCTCCBlock::expTccId_
unsigned int expTccId_
Definition: DCCTCCBlock.h:59
DCCTCCBlock::nTTs_
unsigned int nTTs_
Definition: DCCTCCBlock.h:56
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37