CMS 3D CMS Logo

Functions
EcalRawToDigi.cc File Reference
#include "EventFilter/EcalRawToDigi/plugins/EcalRawToDigi.h"
#include "EventFilter/EcalRawToDigi/interface/EcalElectronicsMapper.h"
#include "EventFilter/EcalRawToDigi/interface/DCCDataUnpacker.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"

Go to the source code of this file.

Functions

void printStatusRecords (const DCCDataUnpacker *unpacker, const EcalElectronicsMapping *mapping)
 

Function Documentation

◆ printStatusRecords()

void printStatusRecords ( const DCCDataUnpacker unpacker,
const EcalElectronicsMapping mapping 
)

Definition at line 198 of file EcalRawToDigi.cc.

198  {
199  // Endcap
200  std::cout << "===> ENDCAP" << std::endl;
201  for (int i = 0; i < EEDetId::kSizeForDenseIndexing; ++i) {
202  const EEDetId id = EEDetId::unhashIndex(i);
203  if (!id.null()) {
204  // channel status
205  const uint16_t code = unpacker->getChannelValue(id);
206 
207  if (code) {
208  const EcalElectronicsId ei = mapping->getElectronicsId(id);
209 
210  // convert DCC ID (1 - 54) to FED ID (601 - 654)
211  const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId());
212 
213  std::cout << " id " << id.rawId() << " -> (" << id.ix() << ", " << id.iy() << ", " << id.zside() << ") "
214  << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", "
215  << ei.xtalId() << ") "
216  << "status = " << code << std::endl;
217  }
218  }
219  }
220  std::cout << "<=== ENDCAP" << std::endl;
221 
222  std::cout << "===> BARREL" << std::endl;
223  for (int i = 0; i < EBDetId::kSizeForDenseIndexing; ++i) {
224  const EBDetId id = EBDetId::unhashIndex(i);
225  if (!id.null()) {
226  // channel status
227  const uint16_t code = unpacker->getChannelValue(id);
228 
229  if (code) {
230  const EcalElectronicsId ei = mapping->getElectronicsId(id);
231 
232  // convert DCC ID (1 - 54) to FED ID (601 - 654)
233  const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId());
234 
235  std::cout << " id " << id.rawId() << " -> (" << id.ieta() << ", " << id.iphi() << ", " << id.zside() << ") "
236  << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", "
237  << ei.xtalId() << ") "
238  << "status = " << code << std::endl;
239  }
240  }
241  }
242  std::cout << "<=== BARREL" << std::endl;
243 }

References gather_cfg::cout, EcalElectronicsId::dccId(), DCCDataUnpacker::electronicsMapper(), DCCDataUnpacker::getChannelValue(), EcalElectronicsMapper::getDCCId(), mps_fire::i, EBDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, taus_updatedMVAIds_cff::mapping, EcalElectronicsId::stripId(), EcalElectronicsId::towerId(), EBDetId::unhashIndex(), EEDetId::unhashIndex(), and EcalElectronicsId::xtalId().

mps_fire.i
i
Definition: mps_fire.py:428
EcalElectronicsMapper::getDCCId
unsigned int getDCCId(unsigned int aSMId) const
Definition: EcalElectronicsMapper.cc:400
EBDetId
Definition: EBDetId.h:17
EEDetId::unhashIndex
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EBDetId::unhashIndex
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
EcalElectronicsId::dccId
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
Definition: EcalElectronicsId.h:31
EcalElectronicsId::towerId
int towerId() const
get the tower id
Definition: EcalElectronicsId.h:33
EEDetId::kSizeForDenseIndexing
Definition: EEDetId.h:329
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
EEDetId
Definition: EEDetId.h:14
DCCDataUnpacker::getChannelValue
uint16_t getChannelValue(const DetId &id) const
Definition: DCCDataUnpacker.cc:76
EBDetId::kSizeForDenseIndexing
Definition: EBDetId.h:155
DCCDataUnpacker::electronicsMapper
const EcalElectronicsMapper * electronicsMapper() const
Definition: DCCDataUnpacker.h:165
EcalElectronicsId::stripId
int stripId() const
get the tower id
Definition: EcalElectronicsId.h:35
EcalElectronicsId::xtalId
int xtalId() const
get the channel id
Definition: EcalElectronicsId.h:37
taus_updatedMVAIds_cff.mapping
mapping
Definition: taus_updatedMVAIds_cff.py:29