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"
#include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
#include "CondFormats/EcalObjects/interface/EcalChannelStatus.h"
#include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.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 185 of file EcalRawToDigi.cc.

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

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:355
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:28