CMS 3D CMS Logo

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

#include <L1TCSCTPG.h>

Inheritance diagram for L1TCSCTPG:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TCSCTPG (const edm::ParameterSet &ps)
 
 ~L1TCSCTPG () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) 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)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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)
 

Private Attributes

MonitorElementcsctpgbend
 
MonitorElementcsctpgbx
 
MonitorElementcsctpgpattern
 
MonitorElementcsctpgquality
 
edm::InputTag csctpgSource_
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectioncsctpgSource_token_
 
MonitorElementcsctpgstrip
 
MonitorElementcsctpgstriptype
 
MonitorElementcsctpgwg
 
std::ofstream logFile_
 
bool monitorDaemon_
 
int nev_
 
std::string outputFile_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 41 of file L1TCSCTPG.h.

Constructor & Destructor Documentation

L1TCSCTPG::L1TCSCTPG ( const edm::ParameterSet ps)

Definition at line 13 of file L1TCSCTPG.cc.

References gather_cfg::cout, edm::ParameterSet::getUntrackedParameter(), outputFile_, and verbose_.

14  : csctpgSource_(ps.getParameter<InputTag>("csctpgSource")),
15  csctpgSource_token_(consumes<CSCCorrelatedLCTDigiCollection>(ps.getParameter<InputTag>("csctpgSource"))) {
16  // verbosity switch
17  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
18 
19  if (verbose_)
20  cout << "L1TCSCTPG: constructor...." << endl;
21 
22  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
23  if (!outputFile_.empty()) {
24  cout << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
25  }
26 
27  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
28  if (disable) {
29  outputFile_ = "";
30  }
31 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag csctpgSource_
Definition: L1TCSCTPG.h:71
bool verbose_
Definition: L1TCSCTPG.h:68
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > csctpgSource_token_
Definition: L1TCSCTPG.h:72
std::string outputFile_
Definition: L1TCSCTPG.h:67
L1TCSCTPG::~L1TCSCTPG ( )
override

Definition at line 33 of file L1TCSCTPG.cc.

33 {}

Member Function Documentation

void L1TCSCTPG::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Definition at line 50 of file L1TCSCTPG.cc.

References gather_cfg::cout, csctpgbend, csctpgbx, csctpgpattern, csctpgquality, csctpgSource_, csctpgSource_token_, csctpgstrip, csctpgstriptype, csctpgwg, dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), edm::HandleBase::isValid(), edm::InputTag::label(), nev_, and verbose_.

50  {
51  nev_++;
52  if (verbose_)
53  cout << "L1TCSCTPG: analyze...." << endl;
54 
56  e.getByToken(csctpgSource_token_, pCSCTPGcorrlcts);
57 
58  if (!pCSCTPGcorrlcts.isValid()) {
59  edm::LogInfo("DataNotFound") << "can't find CSCCorrelatedLCTDigiCollection with label " << csctpgSource_.label();
60  return;
61  }
62 
63  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator cscItr1 = pCSCTPGcorrlcts->begin();
64  cscItr1 != pCSCTPGcorrlcts->end();
65  cscItr1++) {
66  CSCCorrelatedLCTDigiCollection::Range range1 = pCSCTPGcorrlcts->get((*cscItr1).first);
67  for (CSCCorrelatedLCTDigiCollection::const_iterator lctItr1 = range1.first; lctItr1 != range1.second; lctItr1++) {
68  csctpgpattern->Fill(lctItr1->getCLCTPattern());
69  if (verbose_) {
70  std::cout << "CSC TPG CLCT pattern " << lctItr1->getCLCTPattern() << std::endl;
71  }
72 
73  csctpgquality->Fill(lctItr1->getQuality());
74  if (verbose_) {
75  std::cout << "CSC LCT quality " << lctItr1->getQuality() << std::endl;
76  }
77 
78  csctpgwg->Fill(lctItr1->getKeyWG());
79  if (verbose_) {
80  std::cout << "CSC LCT wire group " << lctItr1->getKeyWG() << std::endl;
81  }
82 
83  csctpgstrip->Fill(lctItr1->getStrip());
84  if (verbose_) {
85  std::cout << "CSC LCT strip " << lctItr1->getStrip() << std::endl;
86  }
87 
88  csctpgstriptype->Fill(lctItr1->getStripType());
89  if (verbose_) {
90  std::cout << "CSC LCT strip type" << lctItr1->getStripType() << std::endl;
91  }
92 
93  csctpgbend->Fill(lctItr1->getBend());
94  if (verbose_) {
95  std::cout << "CSC LCT bend " << lctItr1->getBend() << std::endl;
96  }
97 
98  csctpgbx->Fill(lctItr1->getBX());
99  if (verbose_) {
100  std::cout << "CSC LCT bx " << lctItr1->getBX() << std::endl;
101  }
102  }
103  }
104 }
MonitorElement * csctpgwg
Definition: L1TCSCTPG.h:60
MonitorElement * csctpgstrip
Definition: L1TCSCTPG.h:61
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
void Fill(long long x)
edm::InputTag csctpgSource_
Definition: L1TCSCTPG.h:71
MonitorElement * csctpgbend
Definition: L1TCSCTPG.h:63
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * csctpgbx
Definition: L1TCSCTPG.h:64
int nev_
Definition: L1TCSCTPG.h:66
MonitorElement * csctpgquality
Definition: L1TCSCTPG.h:59
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator
std::string const & label() const
Definition: InputTag.h:36
bool verbose_
Definition: L1TCSCTPG.h:68
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > csctpgSource_token_
Definition: L1TCSCTPG.h:72
MonitorElement * csctpgstriptype
Definition: L1TCSCTPG.h:62
MonitorElement * csctpgpattern
Definition: L1TCSCTPG.h:58
void L1TCSCTPG::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 35 of file L1TCSCTPG.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), csctpgbend, csctpgbx, csctpgpattern, csctpgquality, csctpgstrip, csctpgstriptype, csctpgwg, nev_, and dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

35  {
36  nev_ = 0;
37  ibooker.setCurrentFolder("L1T/L1TCSCTPG");
38 
39  csctpgpattern = ibooker.book1D("CSC TPG hit pattern", "CSC TPG hit pattern", 8, -0.5, 7.5);
40  csctpgquality = ibooker.book1D("CSC TPG quality", "CSC TPG quality", 16, 0.5, 16.5);
41  csctpgwg = ibooker.book1D("CSC TPG wire group", "CSC TPG wire group", 116, -0.5, 115.5);
42  csctpgstrip = ibooker.book1D("CSC TPG strip", "CSC TPG strip", 160, -0.5, 159.5);
43  csctpgstriptype = ibooker.book1D("CSC TPG strip type", "CSC TPG strip type", 2, 0.5, 1.5);
44  csctpgbend = ibooker.book1D("CSC TPG bend", "CSC TPG bend", 3, 0.5, 2.5);
45  csctpgbx = ibooker.book1D("CSC TPG bx", "CSC TPG bx", 20, -0.5, 19.5);
46 }
MonitorElement * csctpgwg
Definition: L1TCSCTPG.h:60
MonitorElement * csctpgstrip
Definition: L1TCSCTPG.h:61
MonitorElement * csctpgbend
Definition: L1TCSCTPG.h:63
MonitorElement * csctpgbx
Definition: L1TCSCTPG.h:64
int nev_
Definition: L1TCSCTPG.h:66
MonitorElement * csctpgquality
Definition: L1TCSCTPG.h:59
MonitorElement * csctpgstriptype
Definition: L1TCSCTPG.h:62
MonitorElement * csctpgpattern
Definition: L1TCSCTPG.h:58
void L1TCSCTPG::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected

Definition at line 48 of file L1TCSCTPG.cc.

48 {}

Member Data Documentation

MonitorElement* L1TCSCTPG::csctpgbend
private

Definition at line 63 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgbx
private

Definition at line 64 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgpattern
private

Definition at line 58 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgquality
private

Definition at line 59 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag L1TCSCTPG::csctpgSource_
private

Definition at line 71 of file L1TCSCTPG.h.

Referenced by analyze().

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> L1TCSCTPG::csctpgSource_token_
private

Definition at line 72 of file L1TCSCTPG.h.

Referenced by analyze().

MonitorElement* L1TCSCTPG::csctpgstrip
private

Definition at line 61 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgstriptype
private

Definition at line 62 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTPG::csctpgwg
private

Definition at line 60 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

std::ofstream L1TCSCTPG::logFile_
private

Definition at line 70 of file L1TCSCTPG.h.

bool L1TCSCTPG::monitorDaemon_
private

Definition at line 69 of file L1TCSCTPG.h.

int L1TCSCTPG::nev_
private

Definition at line 66 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

std::string L1TCSCTPG::outputFile_
private

Definition at line 67 of file L1TCSCTPG.h.

Referenced by L1TCSCTPG().

bool L1TCSCTPG::verbose_
private

Definition at line 68 of file L1TCSCTPG.h.

Referenced by analyze(), and L1TCSCTPG().