CMS 3D CMS Logo

DCCEBTCCBlock.cc
Go to the documentation of this file.
5 
7  : DCCTCCBlock(u, m, e, unpack) {
10 }
11 
13 
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 }
39 
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 }
DCCDataUnpacker.h
DCCEventBlock
Definition: DCCEventBlock.h:29
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
DCCDataBlockPrototype::data_
const uint64_t * data_
Definition: DCCDataBlockPrototype.h:73
EcalElectronicsMapper::getActiveSM
unsigned int getActiveSM()
Definition: EcalElectronicsMapper.h:128
DCCDataUnpacker
Definition: DCCDataUnpacker.h:49
DCCDataUnpacker::silentMode_
static std::atomic< bool > silentMode_
Definition: DCCDataUnpacker.h:185
DCCEBTCCBlock::updateCollectors
void updateCollectors() override
Definition: DCCEBTCCBlock.cc:12
DCCTCCBlock::nTSamples_
unsigned int nTSamples_
Definition: DCCTCCBlock.h:57
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
EcalElectronicsMapper.h
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
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
EcalElectronicsMapper
Definition: EcalElectronicsMapper.h:36
DCCDataBlockPrototype::mapper_
EcalElectronicsMapper * mapper_
Definition: DCCDataBlockPrototype.h:69
EcalElectronicsMapper::getTPPointer
EcalTriggerPrimitiveDigi * getTPPointer(unsigned int tccId, unsigned int tower)
Definition: EcalElectronicsMapper.h:98
DCCEBTCCBlock.h
DCCEBTCCBlock::addTriggerPrimitivesToCollection
void addTriggerPrimitivesToCollection() override
Definition: DCCEBTCCBlock.cc:40
DCCTCCBlock::tccId_
unsigned int tccId_
Definition: DCCTCCBlock.h:51
BeamSpotPI::unpack
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
Definition: BeamSpotPayloadInspectorHelper.h:23
DCCTCCBlock
Definition: DCCTCCBlock.h:33
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
DCCEBTCCBlock::DCCEBTCCBlock
DCCEBTCCBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack)
Definition: DCCEBTCCBlock.cc:6
DCCEBTCCBlock::checkTccIdAndNumbTTs
bool checkTccIdAndNumbTTs() override
Definition: DCCEBTCCBlock.cc:14
DCCTCCBlock::nTTs_
unsigned int nTTs_
Definition: DCCTCCBlock.h:56
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37