CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
DigiAnalyzer Class Reference

#include <DigiAnalyzer.h>

Inheritance diagram for DigiAnalyzer:
edm::EDAnalyzer

Public Member Functions

virtual void analyze (edm::Event const &e, edm::EventSetup const &iSetup)
 
 DigiAnalyzer (edm::ParameterSet const &conf)
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

int eventNumber
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Demo analyzer for reading digis author A.Tumanov 2/22/06

Definition at line 16 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 ripped from Jeremy's and Rick's analyzers

Definition at line 22 of file DigiAnalyzer.cc.

References eventNumber.

22  {
23 
24  // If your module takes parameters, here is where you would define
25  // their names and types, and access them to initialize internal
26  // variables. Example as follows:
27  //
28  eventNumber = 0;
29 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 31 of file DigiAnalyzer.cc.

References eventNumber, edm::Event::getByLabel(), j, prof2calltree::last, and RecoTauPiZeroBuilderPlugins_cfi::strips.

31  {
32 
33  // These declarations create handles to the types of records that you want
34  // to retrieve from event "e".
35  //
45 
46  // Pass the handle to the method "getByType", which is used to retrieve
47  // one and only one instance of the type in question out of event "e". If
48  // zero or more than one instance exists in the event an exception is thrown.
49  //
50 
51  // e.getByLabel("muonCSCDigis","MuonCSCDDUStatusDigi", dduStatusDigi);
52  // e.getByLabel("muonCSCDigis","MuonCSCWireDigi",wires);
53  // e.getByLabel("muonCSCDigis","MuonCSCStripDigi",strips);
54  // e.getByLabel("muonCSCDigis","MuonCSCComparatorDigi",comparators);
55  //e.getByLabel("muonCSCDigis","MuonCSCALCTDigi",alcts);
56  // e.getByLabel("muonCSCDigis","MuonCSCCLCTDigi",clcts);
57  // e.getByLabel("muonCSCDigis","MuonCSCRPCDigi",rpcs);
58  //e.getByLabel("muonCSCDigis","MuonCSCCorrelatedLCTDigi",correlatedlcts);
59  e.getByLabel("muonCSCDigis","MuonCSCDCCFormatStatusDigi",formatStatusDigi);
60 
61 
62  // read digi collections and print digis
63  //
64 
65  for (CSCDCCFormatStatusDigiCollection::DigiRangeIterator j=formatStatusDigi->begin(); j!=formatStatusDigi->end(); j++) {
66  std::vector<CSCDCCFormatStatusDigi>::const_iterator digiItr = (*j).second.first;
67  std::vector<CSCDCCFormatStatusDigi>::const_iterator last = (*j).second.second;
68  for( ; digiItr != last; ++digiItr) {
69  digiItr->print();
70  }
71  }
72 
73 
74  /*for (CSCDDUStatusDigiCollection::DigiRangeIterator j=dduStatusDigi->begin(); j!=dduStatusDigi->end(); j++) {
75  std::vector<CSCDDUStatusDigi>::const_iterator digiItr = (*j).second.first;
76  std::vector<CSCDDUStatusDigi>::const_iterator last = (*j).second.second;
77  for( ; digiItr != last; ++digiItr) {
78  CSCDDUHeader header(*digiItr);
79  std::cout <<"L1 number = " << header.lvl1num() << std::endl;
80  std::cout <<"DDU number = " << header.source_id() << std::endl;
81  }
82  }
83  */
84  /*
85  for (CSCStripDigiCollection::DigiRangeIterator j=strips->begin(); j!=strips->end(); j++) {
86  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
87  CSCDetId const cscDetId=(*j).first;
88  std::cout<<cscDetId<<std::endl;
89  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
90  for( ; digiItr != last; ++digiItr) {
91  digiItr->print();
92  }
93  }
94 
95 
96  for (CSCWireDigiCollection::DigiRangeIterator j=wires->begin(); j!=wires->end(); j++) {
97  CSCDetId const cscDetId=(*j).first;
98  std::cout<<cscDetId<<std::endl;
99  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
100  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
101  for( ; digiItr != last; ++digiItr) {
102  digiItr->print();
103  }
104  }
105 */
106 
107 
108  /*
109  for (CSCComparatorDigiCollection::DigiRangeIterator j=comparators->begin(); j!=comparators->end(); j++) {
110 
111  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
112  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
113  for( ; digiItr != last; ++digiItr) {
114  digiItr->print();
115  }
116  }
117 
118 
119 
120  for (CSCALCTDigiCollection::DigiRangeIterator j=alcts->begin(); j!=alcts->end(); j++) {
121 
122  std::vector<CSCALCTDigi>::const_iterator digiItr = (*j).second.first;
123  std::vector<CSCALCTDigi>::const_iterator last = (*j).second.second;
124  for( ; digiItr != last; ++digiItr) {
125  digiItr->print();
126  }
127  }
128 
129 
130  for (CSCCLCTDigiCollection::DigiRangeIterator j=clcts->begin(); j!=clcts->end(); j++) {
131 
132  std::vector<CSCCLCTDigi>::const_iterator digiItr = (*j).second.first;
133  std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
134  for( ; digiItr != last; ++digiItr) {
135  digiItr->print();
136  }
137  }
138 
139 
140 
141  for (CSCRPCDigiCollection::DigiRangeIterator j=rpcs->begin(); j!=rpcs->end(); j++) {
142 
143  std::vector<CSCRPCDigi>::const_iterator digiItr = (*j).second.first;
144  std::vector<CSCRPCDigi>::const_iterator last = (*j).second.second;
145  for( ; digiItr != last; ++digiItr) {
146  digiItr->print();
147  }
148  }
149 
150 
151  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j=correlatedlcts->begin(); j!=correlatedlcts->end(); j++) {
152 
153  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiItr = (*j).second.first;
154  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
155  for( ; digiItr != last; ++digiItr) {
156  digiItr->print();
157  }
158  }
159 
160  */
161 
162  eventNumber++;
163  edm::LogInfo ("DigiAnalyzer") << "end of event number " << eventNumber;
164 
165 
166 
167 }
int j
Definition: DBlmapReader.cc:9

Member Data Documentation

int DigiAnalyzer::eventNumber
private