CMS 3D CMS Logo

List of all members | Classes | Public Member Functions
rpcrawtodigi::DebugDigisPrintout Class Reference

#include <DebugDigisPrintout.h>

Classes

struct  MyDigi
 

Public Member Functions

std::string operator() (const RPCDigiCollection *digis)
 

Detailed Description

Definition at line 11 of file DebugDigisPrintout.h.

Member Function Documentation

◆ operator()()

std::string rpcrawtodigi::DebugDigisPrintout::operator() ( const RPCDigiCollection digis)
inline

Definition at line 29 of file DebugDigisPrintout.h.

29  {
30  std::ostringstream str;
31  str << "DebugDigisPrintout:";
32  if (!digis)
33  return str.str();
34  typedef DigiContainerIterator<RPCDetId, RPCDigi> DigiRangeIterator;
35  std::vector<MyDigi> myDigis;
36 
37  int nDet = 0;
38  int nDigisAll = 0;
39  for (DigiRangeIterator it = digis->begin(); it != digis->end(); it++) {
40  nDet++;
41  RPCDetId rpcDetId = (*it).first;
42  uint32_t rawDetId = rpcDetId.rawId();
43  RPCDigiCollection::Range range = digis->get(rpcDetId);
44  for (std::vector<RPCDigi>::const_iterator id = range.first; id != range.second; id++) {
45  nDigisAll++;
46  const RPCDigi& digi = (*id);
47  MyDigi myDigi = {rawDetId, digi.strip(), digi.bx()};
48  if (myDigis.end() == std::find(myDigis.begin(), myDigis.end(), myDigi))
49  myDigis.push_back(myDigi);
50  }
51  }
52  std::sort(myDigis.begin(), myDigis.end());
53  str << " dets: " << nDet << " allDigis: " << nDigisAll << " unigueDigis: " << myDigis.size() << std::endl;
54  for (std::vector<MyDigi>::const_iterator it = myDigis.begin(); it != myDigis.end(); ++it)
55  str << "debugDIGI: " << it->det << ", " << it->strip << ", " << it->bx << std::endl;
56  return str.str();
57  }

References RPCDigi::bx(), spr::find(), FastTimerService_cff::range, DetId::rawId(), jetUpdater_cfi::sort, str, and RPCDigi::strip().

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
RPCDetId
Definition: RPCDetId.h:16
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
RPCDigi::bx
int bx() const
Definition: RPCDigi.h:28
str
#define str(s)
Definition: TestProcessor.cc:52
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
RPCDigi::strip
int strip() const
Definition: RPCDigi.h:27
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
RPCDigi
Definition: RPCDigi.h:19
MuonDigiCollection< RPCDetId, RPCDigi >::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
DigiContainerIterator
Definition: MuonDigiCollection.h:30