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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, 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)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, 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 ( 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.

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

15  {
16 
17  eventNumber = 0;
18 
19  wd_token = consumes<CSCWireDigiCollection>( conf.getParameter<edm::InputTag>("wireDigiTag") );
20  sd_token = consumes<CSCStripDigiCollection>( conf.getParameter<edm::InputTag>("stripDigiTag") );
21  cd_token = consumes<CSCComparatorDigiCollection>( conf.getParameter<edm::InputTag>("compDigiTag") );
22  al_token = consumes<CSCALCTDigiCollection>( conf.getParameter<edm::InputTag>("alctDigiTag") );
23  cl_token = consumes<CSCCLCTDigiCollection>( conf.getParameter<edm::InputTag>("clctDigiTag") );
24  rd_token = consumes<CSCRPCDigiCollection>( conf.getParameter<edm::InputTag>("rpcDigiTag") );
25  co_token = consumes<CSCCorrelatedLCTDigiCollection>( conf.getParameter<edm::InputTag>("corrlctDigiTag") );
26  dd_token = consumes<CSCDDUStatusDigiCollection>( conf.getParameter<edm::InputTag>("ddusDigiTag") );
27  dc_token = consumes<CSCDCCFormatStatusDigiCollection>( conf.getParameter<edm::InputTag>("dccfDigiTag") );
28 
29 }
edm::EDGetTokenT< CSCDCCFormatStatusDigiCollection > dc_token
Definition: DigiAnalyzer.h:44
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
Definition: DigiAnalyzer.h:38
edm::EDGetTokenT< CSCDDUStatusDigiCollection > dd_token
Definition: DigiAnalyzer.h:43
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: DigiAnalyzer.h:36
edm::EDGetTokenT< CSCRPCDigiCollection > rd_token
Definition: DigiAnalyzer.h:41
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
Definition: DigiAnalyzer.h:42
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
Definition: DigiAnalyzer.h:40
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: DigiAnalyzer.h:37
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
Definition: DigiAnalyzer.h:39

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 31 of file DigiAnalyzer.cc.

References al_token, cd_token, cl_token, co_token, gather_cfg::cout, dc_token, dd_token, eventNumber, edm::Event::getByToken(), RecoTauValidation_cfi::header, plotBeamSpotDB::last, CSCDDUHeader::lvl1num(), rd_token, sd_token, CSCDDUHeader::source_id(), RecoTauPiZeroBuilderPlugins_cfi::strips, wd_token, and muonCSCDigis_cfi::wires.

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

Member Data Documentation

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

Definition at line 39 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

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

Definition at line 38 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

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

Definition at line 40 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

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

Definition at line 42 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

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

Definition at line 44 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

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

Definition at line 43 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

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

Definition at line 41 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

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

Definition at line 37 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().

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

Definition at line 36 of file DigiAnalyzer.h.

Referenced by analyze(), and DigiAnalyzer().