CMS 3D CMS Logo

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

#include <DigiAnalyzer.h>

Inheritance diagram for DigiAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &iSetup) override
 
 DigiAnalyzer (edm::ParameterSet const &conf)
 
- 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
 
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::vector< ModuleDescription const * > &modules, 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)
 

Private Attributes

edm::EDGetTokenT< CSCALCTDigiCollectional_token
 
edm::EDGetTokenT< CSCComparatorDigiCollectioncd_token
 
edm::EDGetTokenT< CSCCLCTDigiCollectioncl_token
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectionco_token
 
edm::EDGetTokenT< CSCDCCFormatStatusDigiCollectiondc_token
 
edm::EDGetTokenT< CSCDDUStatusDigiCollectiondd_token
 
int eventNumber
 
edm::EDGetTokenT< CSCRPCDigiCollectionrd_token
 
edm::EDGetTokenT< CSCStripDigiCollectionsd_token
 
edm::EDGetTokenT< CSCWireDigiCollectionwd_token
 

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 wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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>
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 

Detailed Description

Demo analyzer for reading digis author A.Tumanov 2/22/06 Updated 10.09.2013 but untested - Tim Cox

Definition at line 27 of file DigiAnalyzer.h.

Constructor & Destructor Documentation

◆ DigiAnalyzer()

DigiAnalyzer::DigiAnalyzer ( edm::ParameterSet const &  conf)
explicit

Demo analyzer for reading digis author A.Tumanov 2/22/06 Code updated but not tested - needs updated config file - 10.09.2013 Tim Cox

Definition at line 15 of file DigiAnalyzer.cc.

15  {
16  eventNumber = 0;
17 
18  wd_token = consumes<CSCWireDigiCollection>(conf.getParameter<edm::InputTag>("wireDigiTag"));
19  sd_token = consumes<CSCStripDigiCollection>(conf.getParameter<edm::InputTag>("stripDigiTag"));
20  cd_token = consumes<CSCComparatorDigiCollection>(conf.getParameter<edm::InputTag>("compDigiTag"));
21  al_token = consumes<CSCALCTDigiCollection>(conf.getParameter<edm::InputTag>("alctDigiTag"));
22  cl_token = consumes<CSCCLCTDigiCollection>(conf.getParameter<edm::InputTag>("clctDigiTag"));
23  rd_token = consumes<CSCRPCDigiCollection>(conf.getParameter<edm::InputTag>("rpcDigiTag"));
24  co_token = consumes<CSCCorrelatedLCTDigiCollection>(conf.getParameter<edm::InputTag>("corrlctDigiTag"));
25  dd_token = consumes<CSCDDUStatusDigiCollection>(conf.getParameter<edm::InputTag>("ddusDigiTag"));
26  dc_token = consumes<CSCDCCFormatStatusDigiCollection>(conf.getParameter<edm::InputTag>("dccfDigiTag"));
27 }

References al_token, cd_token, cl_token, co_token, dc_token, dd_token, eventNumber, edm::ParameterSet::getParameter(), rd_token, sd_token, and wd_token.

Member Function Documentation

◆ analyze()

void DigiAnalyzer::analyze ( edm::Event const &  e,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 29 of file DigiAnalyzer.cc.

29  {
39 
40  e.getByToken(dd_token, dduStatusDigi);
41  e.getByToken(wd_token, wires);
42  e.getByToken(sd_token, strips);
43  e.getByToken(cd_token, comparators);
44  e.getByToken(al_token, alcts);
45  e.getByToken(cl_token, clcts);
46  e.getByToken(rd_token, rpcs);
47  e.getByToken(co_token, correlatedlcts);
48  e.getByToken(dc_token, formatStatusDigi);
49 
50  for (CSCDCCFormatStatusDigiCollection::DigiRangeIterator j = formatStatusDigi->begin(); j != formatStatusDigi->end();
51  j++) {
52  std::vector<CSCDCCFormatStatusDigi>::const_iterator digiItr = (*j).second.first;
53  std::vector<CSCDCCFormatStatusDigi>::const_iterator last = (*j).second.second;
54  for (; digiItr != last; ++digiItr) {
55  digiItr->print();
56  }
57  }
58 
59  for (CSCDDUStatusDigiCollection::DigiRangeIterator j = dduStatusDigi->begin(); j != dduStatusDigi->end(); j++) {
60  std::vector<CSCDDUStatusDigi>::const_iterator digiItr = (*j).second.first;
61  std::vector<CSCDDUStatusDigi>::const_iterator last = (*j).second.second;
62  for (; digiItr != last; ++digiItr) {
63  CSCDDUHeader header(*digiItr);
64  std::cout << "L1 number = " << header.lvl1num() << std::endl;
65  std::cout << "DDU number = " << header.source_id() << std::endl;
66  }
67  }
68 
69  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin(); j != strips->end(); j++) {
70  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
71  CSCDetId const cscDetId = (*j).first;
72  std::cout << cscDetId << std::endl;
73  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
74  for (; digiItr != last; ++digiItr) {
75  digiItr->print();
76  }
77  }
78 
79  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin(); j != wires->end(); j++) {
80  CSCDetId const cscDetId = (*j).first;
81  std::cout << cscDetId << std::endl;
82  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
83  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
84  for (; digiItr != last; ++digiItr) {
85  digiItr->print();
86  }
87  }
88 
89  for (CSCComparatorDigiCollection::DigiRangeIterator j = comparators->begin(); j != comparators->end(); j++) {
90  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
91  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
92  for (; digiItr != last; ++digiItr) {
93  digiItr->print();
94  }
95  }
96 
97  for (CSCALCTDigiCollection::DigiRangeIterator j = alcts->begin(); j != alcts->end(); j++) {
98  std::vector<CSCALCTDigi>::const_iterator digiItr = (*j).second.first;
99  std::vector<CSCALCTDigi>::const_iterator last = (*j).second.second;
100  for (; digiItr != last; ++digiItr) {
101  digiItr->print();
102  }
103  }
104 
105  for (CSCCLCTDigiCollection::DigiRangeIterator j = clcts->begin(); j != clcts->end(); j++) {
106  std::vector<CSCCLCTDigi>::const_iterator digiItr = (*j).second.first;
107  std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
108  for (; digiItr != last; ++digiItr) {
109  digiItr->print();
110  }
111  }
112 
113  for (CSCRPCDigiCollection::DigiRangeIterator j = rpcs->begin(); j != rpcs->end(); j++) {
114  std::vector<CSCRPCDigi>::const_iterator digiItr = (*j).second.first;
115  std::vector<CSCRPCDigi>::const_iterator last = (*j).second.second;
116  for (; digiItr != last; ++digiItr) {
117  digiItr->print();
118  }
119  }
120 
121  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j = correlatedlcts->begin(); j != correlatedlcts->end(); j++) {
122  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiItr = (*j).second.first;
123  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
124  for (; digiItr != last; ++digiItr) {
125  digiItr->print();
126  }
127  }
128 
129  eventNumber++;
130  edm::LogInfo("DigiAnalyzer") << "end of event number " << eventNumber;
131 }

References al_token, cd_token, cl_token, co_token, gather_cfg::cout, dc_token, dd_token, MillePedeFileConverter_cfg::e, eventNumber, RecoTauValidation_cfi::header, dqmiolumiharvest::j, dqmdumpme::last, rd_token, sd_token, DigiDM_cff::strips, wd_token, and DigiDM_cff::wires.

Member Data Documentation

◆ al_token

edm::EDGetTokenT<CSCALCTDigiCollection> DigiAnalyzer::al_token
private

Definition at line 38 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

◆ cd_token

edm::EDGetTokenT<CSCComparatorDigiCollection> DigiAnalyzer::cd_token
private

Definition at line 37 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

◆ cl_token

edm::EDGetTokenT<CSCCLCTDigiCollection> DigiAnalyzer::cl_token
private

Definition at line 39 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

◆ co_token

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> DigiAnalyzer::co_token
private

Definition at line 41 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

◆ dc_token

edm::EDGetTokenT<CSCDCCFormatStatusDigiCollection> DigiAnalyzer::dc_token
private

Definition at line 43 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

◆ dd_token

edm::EDGetTokenT<CSCDDUStatusDigiCollection> DigiAnalyzer::dd_token
private

Definition at line 42 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

◆ eventNumber

int DigiAnalyzer::eventNumber
private

Definition at line 33 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

◆ rd_token

edm::EDGetTokenT<CSCRPCDigiCollection> DigiAnalyzer::rd_token
private

Definition at line 40 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

◆ sd_token

edm::EDGetTokenT<CSCStripDigiCollection> DigiAnalyzer::sd_token
private

Definition at line 36 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

◆ wd_token

edm::EDGetTokenT<CSCWireDigiCollection> DigiAnalyzer::wd_token
private

Definition at line 35 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

DigiAnalyzer::wd_token
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: DigiAnalyzer.h:35
DigiAnalyzer::sd_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: DigiAnalyzer.h:36
DigiAnalyzer::rd_token
edm::EDGetTokenT< CSCRPCDigiCollection > rd_token
Definition: DigiAnalyzer.h:40
DigiAnalyzer::eventNumber
int eventNumber
Definition: DigiAnalyzer.h:33
CSCDDUHeader
Definition: CSCDDUHeader.h:11
DigiDM_cff.wires
wires
Definition: DigiDM_cff.py:33
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::LogInfo
Definition: MessageLogger.h:254
edm::Handle< CSCWireDigiCollection >
dqmdumpme.last
last
Definition: dqmdumpme.py:56
DigiAnalyzer::cl_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
Definition: DigiAnalyzer.h:39
DigiAnalyzer::al_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
Definition: DigiAnalyzer.h:38
DigiAnalyzer::co_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
Definition: DigiAnalyzer.h:41
DigiAnalyzer::dc_token
edm::EDGetTokenT< CSCDCCFormatStatusDigiCollection > dc_token
Definition: DigiAnalyzer.h:43
CSCDetId
Definition: CSCDetId.h:26
DigiAnalyzer::cd_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
Definition: DigiAnalyzer.h:37
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:292
DigiAnalyzer::dd_token
edm::EDGetTokenT< CSCDDUStatusDigiCollection > dd_token
Definition: DigiAnalyzer.h:42
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
DigiContainerIterator
Definition: MuonDigiCollection.h:30
edm::InputTag
Definition: InputTag.h:15
DigiDM_cff.strips
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
Definition: DigiDM_cff.py:32
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37