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 183 of file EcalRawToDigi.cc.

183  {
184  // Endcap
185  std::cout << "===> ENDCAP" << std::endl;
186  for (int i = 0; i < EEDetId::kSizeForDenseIndexing; ++i) {
187  const EEDetId id = EEDetId::unhashIndex(i);
188  if (!id.null()) {
189  // channel status
190  const uint16_t code = unpacker->getChannelValue(id);
191 
192  if (code) {
193  const EcalElectronicsId ei = mapping->getElectronicsId(id);
194 
195  // convert DCC ID (1 - 54) to FED ID (601 - 654)
196  const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId());
197 
198  std::cout << " id " << id.rawId() << " -> (" << id.ix() << ", " << id.iy() << ", " << id.zside() << ") "
199  << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", "
200  << ei.xtalId() << ") "
201  << "status = " << code << std::endl;
202  }
203  }
204  }
205  std::cout << "<=== ENDCAP" << std::endl;
206 
207  std::cout << "===> BARREL" << std::endl;
208  for (int i = 0; i < EBDetId::kSizeForDenseIndexing; ++i) {
209  const EBDetId id = EBDetId::unhashIndex(i);
210  if (!id.null()) {
211  // channel status
212  const uint16_t code = unpacker->getChannelValue(id);
213 
214  if (code) {
215  const EcalElectronicsId ei = mapping->getElectronicsId(id);
216 
217  // convert DCC ID (1 - 54) to FED ID (601 - 654)
218  const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId());
219 
220  std::cout << " id " << id.rawId() << " -> (" << id.ieta() << ", " << id.iphi() << ", " << id.zside() << ") "
221  << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", "
222  << ei.xtalId() << ") "
223  << "status = " << code << std::endl;
224  }
225  }
226  }
227  std::cout << "<=== BARREL" << std::endl;
228 }

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