CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
EcalDigiDisplay Class Reference

#include <EcalDigiDisplay.h>

Inheritance diagram for EcalDigiDisplay:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EcalDigiDisplay (const edm::ParameterSet &ps)
 
 ~EcalDigiDisplay () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void readEBDigis (edm::Handle< EBDigiCollection > digis, int Mode)
 
void readEEDigis (edm::Handle< EEDigiCollection > digis, int Mode)
 
void readPNDigis (edm::Handle< EcalPnDiodeDigiCollection > PNs, int Mode)
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Protected Attributes

bool cryDigi
 
std::string digiProducer_
 
std::string ebDigiCollection_
 
const EcalElectronicsMappingecalElectronicsMap_
 
std::string eeDigiCollection_
 
EcalFedMapfedMap
 
bool inputIsOk
 
std::vector< int > listChannels
 
std::vector< int > listPns
 
std::vector< int > listTowers
 
int mode
 
bool pnDigi
 
std::vector< std::string > requestedEbs_
 
std::vector< int > requestedFeds_
 
bool ttDigi
 

Private Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &c) override
 
void beginRun (edm::Run const &, edm::EventSetup const &c) override
 
void endJob () override
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Detailed Description

Definition at line 20 of file EcalDigiDisplay.h.

Constructor & Destructor Documentation

◆ EcalDigiDisplay()

EcalDigiDisplay::EcalDigiDisplay ( const edm::ParameterSet ps)

Definition at line 33 of file EcalDigiDisplay.cc.

33  {
34  //=========================================================================
35 
36  ebDigiCollection_ = ps.getParameter<std::string>("ebDigiCollection");
37  eeDigiCollection_ = ps.getParameter<std::string>("eeDigiCollection");
38  digiProducer_ = ps.getParameter<std::string>("digiProducer");
39 
40  requestedFeds_ = ps.getUntrackedParameter<std::vector<int> >("requestedFeds");
41  requestedEbs_ = ps.getUntrackedParameter<std::vector<std::string> >("requestedEbs");
42 
43  cryDigi = ps.getUntrackedParameter<bool>("cryDigi");
44  ttDigi = ps.getUntrackedParameter<bool>("ttDigi");
45  pnDigi = ps.getUntrackedParameter<bool>("pnDigi");
46 
47  mode = ps.getUntrackedParameter<int>("mode");
48  listChannels = ps.getUntrackedParameter<std::vector<int> >("listChannels");
49  listTowers = ps.getUntrackedParameter<std::vector<int> >("listTowers");
50  listPns = ps.getUntrackedParameter<std::vector<int> >("listPns");
51 
52  std::vector<int> listDefaults;
53  listDefaults.push_back(-1);
54  requestedFeds_ = ps.getUntrackedParameter<std::vector<int> >("requestedFeds", listDefaults);
55  bool fedIsGiven = false;
56 
57  std::vector<std::string> ebDefaults;
58  ebDefaults.push_back("none");
59  requestedEbs_ = ps.getUntrackedParameter<std::vector<std::string> >("requestedEbs", ebDefaults);
60  // FEDs and EBs
61  if (requestedFeds_[0] != -1) {
62  edm::LogInfo("EcalDigiDisplay") << "FED id is given! Goining to beginRun! ";
63  fedIsGiven = true;
64  } else {
65  if (requestedEbs_[0] != "none") {
66  //EB id is given and convert to FED id
67  requestedFeds_.clear();
68  fedMap = new EcalFedMap();
69  for (std::vector<std::string>::const_iterator ebItr = requestedEbs_.begin(); ebItr != requestedEbs_.end();
70  ++ebItr) {
71  requestedFeds_.push_back(fedMap->getFedFromSlice(*ebItr));
72  }
73  delete fedMap;
74  } else {
75  //Select all FEDs in the Event
76  for (int i = 601; i < 655; ++i) {
77  requestedFeds_.push_back(i);
78  }
79  }
80  }
81 
82  //Channel list
83  listChannels = ps.getUntrackedParameter<std::vector<int> >("listChannels", listDefaults);
84  //Tower list
85  listTowers = ps.getUntrackedParameter<std::vector<int> >("listTowers", listDefaults);
86 
87  //Consistancy checks:
88  std::vector<int>::iterator fedIter;
89  std::vector<int>::iterator intIter;
90  inputIsOk = true;
91 
92  if (fedIsGiven) {
93  for (fedIter = requestedFeds_.begin(); fedIter != requestedFeds_.end(); ++fedIter) {
94  if ((*fedIter) < 601 || (*fedIter) > 655) {
95  edm::LogError("EcalDigiDisplay") << " FED value: " << (*fedIter) << " found in requetsedFeds. "
96  << " Valid range is 601-654. Returning.";
97  inputIsOk = false;
98  return;
99  } //Loop over requetsed FEDS
100  }
101  }
102  bool barrelSM = false;
103  //Loop over and Check if Barrel SM is picked up
104  for (fedIter = requestedFeds_.begin(); fedIter != requestedFeds_.end(); ++fedIter) {
105  if ((*fedIter) > 609 && (*fedIter) < 646 && inputIsOk) // if EB SM is being picked up
106  barrelSM = true;
107  }
108 
109  if (barrelSM) {
110  if (cryDigi) {
111  // Check with channels in Barrel
112  for (intIter = listChannels.begin(); intIter != listChannels.end(); intIter++) {
113  if (((*intIter) < 1) || (1700 < (*intIter))) {
114  edm::LogError("EcalDigiDisplay") << " ic value: " << (*intIter) << " found in listChannels. "
115  << " Valid range is 1-1700. Returning.";
116  inputIsOk = false;
117  return;
118  }
119  }
120  }
121  //Check with Towers in Barrel
122  if (ttDigi) {
123  for (intIter = listTowers.begin(); intIter != listTowers.end(); intIter++) {
124  if (((*intIter) < 1) || (70 < (*intIter))) {
125  edm::LogError("EcalDigiDisplay") << " TT value: " << (*intIter) << " found in listTowers. "
126  << " Valid range for EB SM is 1-70. Returning.";
127  inputIsOk = false;
128  return;
129  }
130  }
131  }
132  } else //if EE DCC is being picked up
133  if (ttDigi) {
134  //Check with Towers in Endcap
135  for (intIter = listTowers.begin(); intIter != listTowers.end(); intIter++) {
136  if ((*intIter) > 34) {
137  edm::LogError("EcalDigiDisplay") << " TT value: " << (*intIter) << " found in listTowers. "
138  << " Valid range for EE DCC is 1-34. Returning.";
139  inputIsOk = false;
140  return;
141  }
142  }
143  }
144 
145  //PNs
146  listPns = ps.getUntrackedParameter<std::vector<int> >("listPns", listDefaults);
147  /*
148  if ( listPns[0] != -1 ) pnDigi = true;
149  else {
150  listPns.clear();
151  for ( int i=1; i < 11; ++i ) {
152  listPns.push_back(i);
153  }
154  }
155  */
156  if (pnDigi) {
157  for (intIter = listPns.begin(); intIter != listPns.end(); intIter++) {
158  if (((*intIter) < 1) || (10 < (*intIter))) {
159  edm::LogError("EcalDigiDisplay") << " Pn number : " << (*intIter) << " found in listPns. "
160  << " Valid range is 1-10. Returning.";
161  inputIsOk = false;
162  return;
163  }
164  }
165  }
166 }

References cryDigi, digiProducer_, ebDigiCollection_, eeDigiCollection_, fedMap, EcalFedMap::getFedFromSlice(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), mps_fire::i, inputIsOk, listChannels, listPns, listTowers, mode, pnDigi, requestedEbs_, requestedFeds_, AlCaHLTBitMon_QueryRunRegistry::string, and ttDigi.

◆ ~EcalDigiDisplay()

EcalDigiDisplay::~EcalDigiDisplay ( )
override

Definition at line 168 of file EcalDigiDisplay.cc.

168  {
169  //=========================================================================
170  //delete *;
171 }

Member Function Documentation

◆ analyze()

void EcalDigiDisplay::analyze ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 184 of file EcalDigiDisplay.cc.

184  {
185  //========================================================================
186 
187  if (!inputIsOk)
188  return;
189 
190  //Get DCC headers
192  try {
193  e.getByLabel(digiProducer_, dccHeader);
194  } catch (cms::Exception& ex) {
195  edm::LogError("EcalDigiUnpackerModule") << "Can't get DCC Headers!";
196  }
197 
198  //
199  bool ebDigisFound = false;
200  bool eeDigisFound = false;
201  bool pnDigisFound = false;
202  // retrieving crystal data from Event
204  try {
205  e.getByLabel(digiProducer_, ebDigiCollection_, eb_digis);
206  if (!eb_digis->empty())
207  ebDigisFound = true;
208  } catch (cms::Exception& ex) {
209  edm::LogError("EcalDigiUnpackerModule") << "EB Digis were not found!";
210  }
211 
212  //
214  try {
215  e.getByLabel(digiProducer_, eeDigiCollection_, ee_digis);
216  if (!ee_digis->empty())
217  eeDigisFound = true;
218  } catch (cms::Exception& ex) {
219  edm::LogError("EcalDigiUnpackerModule") << "EE Digis were not found!";
220  }
221 
222  // retrieving crystal PN diodes from Event
224  try {
225  e.getByLabel(digiProducer_, pn_digis);
226  if (!pn_digis->empty())
227  pnDigisFound = true;
228  } catch (cms::Exception& ex) {
229  edm::LogError("EcalDigiUnpackerModule") << "PNs were not found!";
230  }
231 
232  //=============================
233  //Call for funcitons
234  //=============================
235  if (cryDigi || ttDigi) {
236  if (ebDigisFound)
237  readEBDigis(eb_digis, mode);
238  if (eeDigisFound)
239  readEEDigis(ee_digis, mode);
240  if (!(ebDigisFound || eeDigisFound)) {
241  edm::LogWarning("EcalDigiUnpackerModule") << "No Digis were found! Returning..";
242  return;
243  }
244  }
245  if (pnDigi) {
246  if (pnDigisFound)
247  readPNDigis(pn_digis, mode);
248  }
249 }

References cryDigi, digiProducer_, MillePedeFileConverter_cfg::e, ebDigiCollection_, eeDigiCollection_, edm::SortedCollection< T, SORT >::empty(), edm::DataFrameContainer::empty(), inputIsOk, mode, pnDigi, readEBDigis(), readEEDigis(), readPNDigis(), and ttDigi.

◆ beginRun()

void EcalDigiDisplay::beginRun ( edm::Run const &  ,
edm::EventSetup const &  c 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 174 of file EcalDigiDisplay.cc.

174  {
175  //========================================================================
176  edm::LogInfo("EcalDigiDisplay") << "entering beginRun! ";
177 
179  c.get<EcalMappingRcd>().get(elecHandle);
180  ecalElectronicsMap_ = elecHandle.product();
181 }

References c, ecalElectronicsMap_, get, and edm::ESHandle< T >::product().

◆ endJob()

void EcalDigiDisplay::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 401 of file EcalDigiDisplay.cc.

401  {
402  //==================================================
403  edm::LogInfo("EcalDigiDisplay") << "DONE!.... ";
404 }

Referenced by o2olib.O2ORunMgr::executeJob().

◆ readEBDigis()

void EcalDigiDisplay::readEBDigis ( edm::Handle< EBDigiCollection digis,
int  Mode 
)
protected

Definition at line 255 of file EcalDigiDisplay.cc.

255  {
256  for (EBDigiCollection::const_iterator digiItr = digis->begin(); digiItr != digis->end(); ++digiItr) {
257  EBDetId detId = EBDetId((*digiItr).id());
259 
260  int FEDid = elecId.dccId() + 600;
261  std::vector<int>::iterator fedIter = find(requestedFeds_.begin(), requestedFeds_.end(), FEDid);
262  if (fedIter == requestedFeds_.end())
263  continue;
264 
265  int ic = EBDetId((*digiItr).id()).ic();
266  int tt = EBDetId((*digiItr).id()).tower().iTT();
267 
268  //Check if Mode is set 1 or 2
269  if (Mode == 1) {
270  edm::LogInfo("EcalDigiDisplay") << "\n\n^^^^^^^^^^^^^^^^^^ [EcalDigiDisplay] digi cry collection size "
271  << digis->size();
272  edm::LogInfo("EcalDigiDisplay") << " [EcalDigiDisplay] dumping first " << listChannels[0]
273  << " crystals\n";
274  //It will break if all required digis are dumpped
275  if (ic > listChannels[0])
276  continue;
277  } else if (Mode == 2) {
278  std::vector<int>::iterator icIterCh;
279  std::vector<int>::iterator icIterTt;
280  icIterCh = find(listChannels.begin(), listChannels.end(), ic);
281  icIterTt = find(listTowers.begin(), listTowers.end(), tt);
282  if (icIterCh == listChannels.end() && icIterTt == listTowers.end())
283  continue;
284  edm::LogInfo("EcalDigiDisplay") << "\n\n^^^^^^^^^^^^^^^^^^ [EcalDigiDisplay] digi cry collection size "
285  << digis->size();
286  } else {
287  edm::LogInfo("EcalDigiDisplay") << "[EcalDigiDisplay] parameter mode set to: " << Mode
288  << ". Only mode 1 and 2 are allowed. Returning...";
289  inputIsOk = false;
290  return;
291  }
292  std::cout << "FEDID: " << FEDid << std::endl;
293  std::cout << "Tower: " << EBDetId((*digiItr).id()).tower().iTT() << " ic-cry: " << EBDetId((*digiItr).id()).ic()
294  << " i-phi: " << EBDetId((*digiItr).id()).iphi() << " j-eta: " << EBDetId((*digiItr).id()).ieta()
295  << std::endl;
296  //Get Samples
297  for (unsigned int i = 0; i < (*digiItr).size(); ++i) {
298  EBDataFrame df(*digiItr);
299  if (!(i % 3))
300  std::cout << "\n\t";
301  std::cout << "sId: " << (i + 1) << " " << df.sample(i) << "\t";
302  }
303  std::cout << " " << std::endl;
304  }
305 }

References edm::DataFrameContainer::begin(), gather_cfg::cout, EcalElectronicsId::dccId(), hgcalPerformanceValidation::df, ecalElectronicsMap_, edm::DataFrameContainer::end(), spr::find(), EcalElectronicsMapping::getElectronicsId(), mps_fire::i, LEDCalibrationChannels::ieta, inputIsOk, LEDCalibrationChannels::iphi, listChannels, listTowers, requestedFeds_, edm::DataFrameContainer::size(), hgcalTowerProducer_cfi::tower, and groupFilesInBlocks::tt.

Referenced by analyze().

◆ readEEDigis()

void EcalDigiDisplay::readEEDigis ( edm::Handle< EEDigiCollection digis,
int  Mode 
)
protected

Definition at line 308 of file EcalDigiDisplay.cc.

308  {
309  //For Endcap so far works only Mode 2
310  if (Mode != 2) {
311  std::cout << "For Endcap mode needs to be set to 2" << std::endl;
312  return;
313  }
314 
315  for (EEDigiCollection::const_iterator digiItr = digis->begin(); digiItr != digis->end(); ++digiItr) {
316  //Make sure that digis are form requested place
317  EEDetId detId = EEDetId((*digiItr).id());
319 
320  int FEDid = elecId.dccId() + 600;
321  std::vector<int>::iterator fedIter = find(requestedFeds_.begin(), requestedFeds_.end(), FEDid);
322  if (fedIter == requestedFeds_.end())
323  continue;
324 
325  edm::LogInfo("EcalDigiDisplay") << "\n\n^^^^^^^^^^^^^^^^^^ [EcalDigiDisplay] digi cry collection size "
326  << digis->size();
327 
328  int crystalId = 10000 * FEDid + 100 * elecId.towerId() + 5 * (elecId.stripId() - 1) + elecId.xtalId();
329  int chId = elecId.towerId(); // this is a channel in Endcap DCC, sometimes also called as Super Crystal
330 
331  std::vector<int>::iterator icIterCh;
332  std::vector<int>::iterator icIterTt;
333  icIterCh = find(listChannels.begin(), listChannels.end(), crystalId);
334  icIterTt = find(listTowers.begin(), listTowers.end(), chId);
335  if (icIterCh == listChannels.end() && icIterTt == listTowers.end())
336  continue;
337 
338  std::cout << "FEDID: " << FEDid << std::endl;
339  std::cout << "Tower: " << elecId.towerId() << "crystalId: " << crystalId
340  << " i-x: " << EEDetId((*digiItr).id()).ix() << " j-y: " << EEDetId((*digiItr).id()).iy() << std::endl;
341 
342  //Get samples
343  for (unsigned int i = 0; i < (*digiItr).size(); ++i) {
344  EEDataFrame df(*digiItr);
345  if (!(i % 3))
346  std::cout << "\n\t";
347  std::cout << "sId: " << (i + 1) << " " << df.sample(i) << "\t";
348  }
349  std::cout << " " << std::endl;
350  }
351 }

References edm::DataFrameContainer::begin(), gather_cfg::cout, EcalElectronicsId::dccId(), hgcalPerformanceValidation::df, ecalElectronicsMap_, edm::DataFrameContainer::end(), spr::find(), EcalElectronicsMapping::getElectronicsId(), mps_fire::i, listChannels, listTowers, requestedFeds_, and edm::DataFrameContainer::size().

Referenced by analyze().

◆ readPNDigis()

void EcalDigiDisplay::readPNDigis ( edm::Handle< EcalPnDiodeDigiCollection PNs,
int  Mode 
)
protected

Definition at line 353 of file EcalDigiDisplay.cc.

353  {
354  int pnDigiCounter = 0;
355 
356  //Loop over PN digis
357  for (EcalPnDiodeDigiCollection::const_iterator pnItr = PNs->begin(); pnItr != PNs->end(); ++pnItr) {
358  EcalPnDiodeDetId pnDetId = EcalPnDiodeDetId((*pnItr).id());
359  //Make sure that we look at the requested place
360  int FEDid = pnDetId.iDCCId() + 600;
361  std::vector<int>::iterator fedIter = find(requestedFeds_.begin(), requestedFeds_.end(), FEDid);
362  if (fedIter == requestedFeds_.end())
363  continue;
364  int pnNum = (*pnItr).id().iPnId();
365 
366  if (Mode == 1) {
367  edm::LogInfo("EcalDigiDisplay") << "\n\n^^^^^^^^^^^^^^^^^^ EcalDigiDisplay digi PN collection. Size: "
368  << PNs->size();
369  edm::LogInfo("EcalDigiDisplay") << " [EcalDigiDisplay] dumping first " << listPns[0]
370  << " PNs ";
371 
372  if ((pnDigiCounter++) >= listPns[0])
373  break;
374  } else if (Mode == 2) {
375  edm::LogInfo("EcalDigiDisplay") << "\n\n^^^^^^^^^^^^^^^^^^ EcalDigiDisplay digi PN collection. Size: "
376  << PNs->size();
377 
378  // Check that we look at PN from the given list
379  std::vector<int>::iterator pnIter;
380  pnIter = find(listPns.begin(), listPns.end(), pnNum);
381  if (pnIter == listPns.end())
382  continue;
383  } else {
384  edm::LogError("EcalDigiDisplay") << "[EcalDigiDisplay] parameter mode set to: " << Mode
385  << ". Only mode 1 and 2 are allowed. Returning...";
386  inputIsOk = false;
387  return;
388  }
389 
390  std::cout << "DCCID: " << pnDetId.iDCCId() << std::endl;
391  std::cout << "\nPN num: " << (*pnItr).id().iPnId();
392  for (int samId = 0; samId < (*pnItr).size(); samId++) {
393  if (!(samId % 3))
394  std::cout << "\n\t";
395  std::cout << "sId: " << (samId + 1) << " " << (*pnItr).sample(samId) << "\t";
396  }
397  }
398 }

References edm::SortedCollection< T, SORT >::begin(), gather_cfg::cout, edm::SortedCollection< T, SORT >::end(), spr::find(), EcalPnDiodeDetId::iDCCId(), inputIsOk, listPns, requestedFeds_, and edm::SortedCollection< T, SORT >::size().

Referenced by analyze().

Member Data Documentation

◆ cryDigi

bool EcalDigiDisplay::cryDigi
protected

Definition at line 47 of file EcalDigiDisplay.h.

Referenced by analyze(), and EcalDigiDisplay().

◆ digiProducer_

std::string EcalDigiDisplay::digiProducer_
protected

Definition at line 41 of file EcalDigiDisplay.h.

Referenced by analyze(), and EcalDigiDisplay().

◆ ebDigiCollection_

std::string EcalDigiDisplay::ebDigiCollection_
protected

Definition at line 39 of file EcalDigiDisplay.h.

Referenced by analyze(), and EcalDigiDisplay().

◆ ecalElectronicsMap_

const EcalElectronicsMapping* EcalDigiDisplay::ecalElectronicsMap_
protected

Definition at line 57 of file EcalDigiDisplay.h.

Referenced by beginRun(), readEBDigis(), and readEEDigis().

◆ eeDigiCollection_

std::string EcalDigiDisplay::eeDigiCollection_
protected

Definition at line 40 of file EcalDigiDisplay.h.

Referenced by analyze(), and EcalDigiDisplay().

◆ fedMap

EcalFedMap* EcalDigiDisplay::fedMap
protected

Definition at line 37 of file EcalDigiDisplay.h.

Referenced by EcalDigiDisplay().

◆ inputIsOk

bool EcalDigiDisplay::inputIsOk
protected

Definition at line 46 of file EcalDigiDisplay.h.

Referenced by analyze(), EcalDigiDisplay(), readEBDigis(), and readPNDigis().

◆ listChannels

std::vector<int> EcalDigiDisplay::listChannels
protected

Definition at line 53 of file EcalDigiDisplay.h.

Referenced by EcalDigiDisplay(), readEBDigis(), and readEEDigis().

◆ listPns

std::vector<int> EcalDigiDisplay::listPns
protected

Definition at line 55 of file EcalDigiDisplay.h.

Referenced by EcalDigiDisplay(), and readPNDigis().

◆ listTowers

std::vector<int> EcalDigiDisplay::listTowers
protected

Definition at line 54 of file EcalDigiDisplay.h.

Referenced by EcalDigiDisplay(), readEBDigis(), and readEEDigis().

◆ mode

int EcalDigiDisplay::mode
protected

Definition at line 51 of file EcalDigiDisplay.h.

Referenced by analyze(), and EcalDigiDisplay().

◆ pnDigi

bool EcalDigiDisplay::pnDigi
protected

Definition at line 49 of file EcalDigiDisplay.h.

Referenced by analyze(), and EcalDigiDisplay().

◆ requestedEbs_

std::vector<std::string> EcalDigiDisplay::requestedEbs_
protected

Definition at line 44 of file EcalDigiDisplay.h.

Referenced by EcalDigiDisplay().

◆ requestedFeds_

std::vector<int> EcalDigiDisplay::requestedFeds_
protected

Definition at line 43 of file EcalDigiDisplay.h.

Referenced by EcalDigiDisplay(), readEBDigis(), readEEDigis(), and readPNDigis().

◆ ttDigi

bool EcalDigiDisplay::ttDigi
protected

Definition at line 48 of file EcalDigiDisplay.h.

Referenced by analyze(), and EcalDigiDisplay().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
EcalDigiDisplay::requestedEbs_
std::vector< std::string > requestedEbs_
Definition: EcalDigiDisplay.h:44
HcalTopologyMode::Mode
Mode
Definition: HcalTopologyMode.h:26
EcalDigiDisplay::fedMap
EcalFedMap * fedMap
Definition: EcalDigiDisplay.h:37
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
EcalDigiDisplay::digiProducer_
std::string digiProducer_
Definition: EcalDigiDisplay.h:41
EBDetId
Definition: EBDetId.h:17
EBDataFrame
Definition: EBDataFrame.h:11
gather_cfg.cout
cout
Definition: gather_cfg.py:144
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
edm::SortedCollection::size
size_type size() const
Definition: SortedCollection.h:215
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EcalPnDiodeDetId
Definition: EcalPnDiodeDetId.h:22
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
EcalElectronicsId::dccId
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
Definition: EcalElectronicsId.h:31
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
EcalDigiDisplay::inputIsOk
bool inputIsOk
Definition: EcalDigiDisplay.h:46
EcalDigiDisplay::listPns
std::vector< int > listPns
Definition: EcalDigiDisplay.h:55
EcalDigiDisplay::ecalElectronicsMap_
const EcalElectronicsMapping * ecalElectronicsMap_
Definition: EcalDigiDisplay.h:57
EcalDigiDisplay::requestedFeds_
std::vector< int > requestedFeds_
Definition: EcalDigiDisplay.h:43
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
edm::DataFrameContainer::empty
bool empty() const
Definition: DataFrameContainer.h:160
EcalDigiDisplay::listChannels
std::vector< int > listChannels
Definition: EcalDigiDisplay.h:53
EcalDigiDisplay::readPNDigis
void readPNDigis(edm::Handle< EcalPnDiodeDigiCollection > PNs, int Mode)
Definition: EcalDigiDisplay.cc:353
edm::ESHandle< EcalElectronicsMapping >
EcalElectronicsMapping::getElectronicsId
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
Definition: EcalElectronicsMapping.cc:324
EcalDigiDisplay::ebDigiCollection_
std::string ebDigiCollection_
Definition: EcalDigiDisplay.h:39
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
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
EcalPnDiodeDetId::iDCCId
int iDCCId() const
get the DCCId
Definition: EcalPnDiodeDetId.h:44
EcalDigiDisplay::eeDigiCollection_
std::string eeDigiCollection_
Definition: EcalDigiDisplay.h:40
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalDigiDisplay::readEBDigis
void readEBDigis(edm::Handle< EBDigiCollection > digis, int Mode)
Definition: EcalDigiDisplay.cc:255
edm::DataFrameContainer::begin
const_iterator begin() const
The iterator returned can not safely be used across threads.
Definition: DataFrameContainer.h:149
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
EcalMappingRcd
Definition: EcalMappingRcd.h:15
EcalFedMap
Definition: EcalFedMap.h:7
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:733
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalFedMap::getFedFromSlice
int getFedFromSlice(std::string)
Definition: EcalFedMap.cc:96
EcalDigiDisplay::mode
int mode
Definition: EcalDigiDisplay.h:51
EcalDigiDisplay::readEEDigis
void readEEDigis(edm::Handle< EEDigiCollection > digis, int Mode)
Definition: EcalDigiDisplay.cc:308
EcalDigiDisplay::ttDigi
bool ttDigi
Definition: EcalDigiDisplay.h:48
cms::Exception
Definition: Exception.h:70
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
EEDataFrame
Definition: EEDataFrame.h:12
EcalDigiDisplay::pnDigi
bool pnDigi
Definition: EcalDigiDisplay.h:49
EcalDigiDisplay::listTowers
std::vector< int > listTowers
Definition: EcalDigiDisplay.h:54
EcalDigiDisplay::cryDigi
bool cryDigi
Definition: EcalDigiDisplay.h:47
edm::DataFrameContainer::end
const_iterator end() const
Definition: DataFrameContainer.h:152
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162
edm::SortedCollection::empty
bool empty() const
Definition: SortedCollection.h:210
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37