CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCDigiAnalyzer Class Reference
Inheritance diagram for CSCDigiAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &iSetup) override
 
 CSCDigiAnalyzer (edm::ParameterSet const &conf)
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices 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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

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

Definition at line 33 of file CSCDigiAnalyzer.cc.

Constructor & Destructor Documentation

◆ CSCDigiAnalyzer()

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

Definition at line 52 of file CSCDigiAnalyzer.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.

52  {
53  eventNumber = 0;
54 
55  wd_token = consumes<CSCWireDigiCollection>(conf.getParameter<edm::InputTag>("wireDigiTag"));
56  sd_token = consumes<CSCStripDigiCollection>(conf.getParameter<edm::InputTag>("stripDigiTag"));
57  cd_token = consumes<CSCComparatorDigiCollection>(conf.getParameter<edm::InputTag>("compDigiTag"));
58  al_token = consumes<CSCALCTDigiCollection>(conf.getParameter<edm::InputTag>("alctDigiTag"));
59  cl_token = consumes<CSCCLCTDigiCollection>(conf.getParameter<edm::InputTag>("clctDigiTag"));
60  rd_token = consumes<CSCRPCDigiCollection>(conf.getParameter<edm::InputTag>("rpcDigiTag"));
61  co_token = consumes<CSCCorrelatedLCTDigiCollection>(conf.getParameter<edm::InputTag>("corrlctDigiTag"));
62  dd_token = consumes<CSCDDUStatusDigiCollection>(conf.getParameter<edm::InputTag>("ddusDigiTag"));
63  dc_token = consumes<CSCDCCFormatStatusDigiCollection>(conf.getParameter<edm::InputTag>("dccfDigiTag"));
64 }
edm::EDGetTokenT< CSCDDUStatusDigiCollection > dd_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
edm::EDGetTokenT< CSCRPCDigiCollection > rd_token
edm::EDGetTokenT< CSCDCCFormatStatusDigiCollection > dc_token

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 66 of file CSCDigiAnalyzer.cc.

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.

66  {
76 
77  e.getByToken(dd_token, dduStatusDigi);
78  e.getByToken(wd_token, wires);
79  e.getByToken(sd_token, strips);
80  e.getByToken(cd_token, comparators);
81  e.getByToken(al_token, alcts);
82  e.getByToken(cl_token, clcts);
83  e.getByToken(rd_token, rpcs);
84  e.getByToken(co_token, correlatedlcts);
85  e.getByToken(dc_token, formatStatusDigi);
86 
87  for (CSCDCCFormatStatusDigiCollection::DigiRangeIterator j = formatStatusDigi->begin(); j != formatStatusDigi->end();
88  j++) {
89  std::vector<CSCDCCFormatStatusDigi>::const_iterator digiItr = (*j).second.first;
90  std::vector<CSCDCCFormatStatusDigi>::const_iterator last = (*j).second.second;
91  for (; digiItr != last; ++digiItr) {
92  digiItr->print();
93  }
94  }
95 
96  for (CSCDDUStatusDigiCollection::DigiRangeIterator j = dduStatusDigi->begin(); j != dduStatusDigi->end(); j++) {
97  std::vector<CSCDDUStatusDigi>::const_iterator digiItr = (*j).second.first;
98  std::vector<CSCDDUStatusDigi>::const_iterator last = (*j).second.second;
99  for (; digiItr != last; ++digiItr) {
100  CSCDDUHeader header(*digiItr);
101  std::cout << "L1 number = " << header.lvl1num() << std::endl;
102  std::cout << "DDU number = " << header.source_id() << std::endl;
103  }
104  }
105 
106  for (CSCStripDigiCollection::DigiRangeIterator j = strips->begin(); j != strips->end(); j++) {
107  std::vector<CSCStripDigi>::const_iterator digiItr = (*j).second.first;
108  CSCDetId const cscDetId = (*j).first;
109  std::cout << cscDetId << std::endl;
110  std::vector<CSCStripDigi>::const_iterator last = (*j).second.second;
111  for (; digiItr != last; ++digiItr) {
112  digiItr->print();
113  }
114  }
115 
116  for (CSCWireDigiCollection::DigiRangeIterator j = wires->begin(); j != wires->end(); j++) {
117  CSCDetId const cscDetId = (*j).first;
118  std::cout << cscDetId << std::endl;
119  std::vector<CSCWireDigi>::const_iterator digiItr = (*j).second.first;
120  std::vector<CSCWireDigi>::const_iterator last = (*j).second.second;
121  for (; digiItr != last; ++digiItr) {
122  digiItr->print();
123  }
124  }
125 
126  for (CSCComparatorDigiCollection::DigiRangeIterator j = comparators->begin(); j != comparators->end(); j++) {
127  std::vector<CSCComparatorDigi>::const_iterator digiItr = (*j).second.first;
128  std::vector<CSCComparatorDigi>::const_iterator last = (*j).second.second;
129  for (; digiItr != last; ++digiItr) {
130  digiItr->print();
131  }
132  }
133 
134  for (CSCALCTDigiCollection::DigiRangeIterator j = alcts->begin(); j != alcts->end(); j++) {
135  std::vector<CSCALCTDigi>::const_iterator digiItr = (*j).second.first;
136  std::vector<CSCALCTDigi>::const_iterator last = (*j).second.second;
137  for (; digiItr != last; ++digiItr) {
138  digiItr->print();
139  }
140  }
141 
142  for (CSCCLCTDigiCollection::DigiRangeIterator j = clcts->begin(); j != clcts->end(); j++) {
143  std::vector<CSCCLCTDigi>::const_iterator digiItr = (*j).second.first;
144  std::vector<CSCCLCTDigi>::const_iterator last = (*j).second.second;
145  for (; digiItr != last; ++digiItr) {
146  digiItr->print();
147  }
148  }
149 
150  for (CSCRPCDigiCollection::DigiRangeIterator j = rpcs->begin(); j != rpcs->end(); j++) {
151  std::vector<CSCRPCDigi>::const_iterator digiItr = (*j).second.first;
152  std::vector<CSCRPCDigi>::const_iterator last = (*j).second.second;
153  for (; digiItr != last; ++digiItr) {
154  digiItr->print();
155  }
156  }
157 
158  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator j = correlatedlcts->begin(); j != correlatedlcts->end(); j++) {
159  std::vector<CSCCorrelatedLCTDigi>::const_iterator digiItr = (*j).second.first;
160  std::vector<CSCCorrelatedLCTDigi>::const_iterator last = (*j).second.second;
161  for (; digiItr != last; ++digiItr) {
162  digiItr->print();
163  }
164  }
165 
166  eventNumber++;
167  edm::LogInfo("CSCDigiAnalyzer") << "end of event number " << eventNumber;
168 }
edm::EDGetTokenT< CSCDDUStatusDigiCollection > dd_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Log< level::Info, false > LogInfo
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
Definition: DigiDM_cff.py:32
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
edm::EDGetTokenT< CSCRPCDigiCollection > rd_token
edm::EDGetTokenT< CSCDCCFormatStatusDigiCollection > dc_token

Member Data Documentation

◆ al_token

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

Definition at line 44 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().

◆ cd_token

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

Definition at line 43 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().

◆ cl_token

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

Definition at line 45 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().

◆ co_token

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

Definition at line 47 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().

◆ dc_token

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

Definition at line 49 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().

◆ dd_token

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

Definition at line 48 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().

◆ eventNumber

int CSCDigiAnalyzer::eventNumber
private

Definition at line 39 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().

◆ rd_token

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

Definition at line 46 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().

◆ sd_token

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

Definition at line 42 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().

◆ wd_token

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

Definition at line 41 of file CSCDigiAnalyzer.cc.

Referenced by analyze(), and CSCDigiAnalyzer().