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::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

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
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

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::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 41 of file L1TCSCTPG.h.

Constructor & Destructor Documentation

◆ L1TCSCTPG()

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

Definition at line 13 of file L1TCSCTPG.cc.

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 }

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

◆ ~L1TCSCTPG()

L1TCSCTPG::~L1TCSCTPG ( )
override

Definition at line 33 of file L1TCSCTPG.cc.

33 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 48 of file L1TCSCTPG.cc.

48  {
49  nev_++;
50  if (verbose_)
51  cout << "L1TCSCTPG: analyze...." << endl;
52 
54  e.getByToken(csctpgSource_token_, pCSCTPGcorrlcts);
55 
56  if (!pCSCTPGcorrlcts.isValid()) {
57  edm::LogInfo("DataNotFound") << "can't find CSCCorrelatedLCTDigiCollection with label " << csctpgSource_.label();
58  return;
59  }
60 
61  for (CSCCorrelatedLCTDigiCollection::DigiRangeIterator cscItr1 = pCSCTPGcorrlcts->begin();
62  cscItr1 != pCSCTPGcorrlcts->end();
63  cscItr1++) {
64  CSCCorrelatedLCTDigiCollection::Range range1 = pCSCTPGcorrlcts->get((*cscItr1).first);
65  for (CSCCorrelatedLCTDigiCollection::const_iterator lctItr1 = range1.first; lctItr1 != range1.second; lctItr1++) {
66  csctpgpattern->Fill(lctItr1->getCLCTPattern());
67  if (verbose_) {
68  std::cout << "CSC TPG CLCT pattern " << lctItr1->getCLCTPattern() << std::endl;
69  }
70 
71  csctpgquality->Fill(lctItr1->getQuality());
72  if (verbose_) {
73  std::cout << "CSC LCT quality " << lctItr1->getQuality() << std::endl;
74  }
75 
76  csctpgwg->Fill(lctItr1->getKeyWG());
77  if (verbose_) {
78  std::cout << "CSC LCT wire group " << lctItr1->getKeyWG() << std::endl;
79  }
80 
81  csctpgstrip->Fill(lctItr1->getStrip());
82  if (verbose_) {
83  std::cout << "CSC LCT strip " << lctItr1->getStrip() << std::endl;
84  }
85 
86  csctpgstriptype->Fill(lctItr1->getStripType());
87  if (verbose_) {
88  std::cout << "CSC LCT strip type" << lctItr1->getStripType() << std::endl;
89  }
90 
91  csctpgbend->Fill(lctItr1->getBend());
92  if (verbose_) {
93  std::cout << "CSC LCT bend " << lctItr1->getBend() << std::endl;
94  }
95 
96  csctpgbx->Fill(lctItr1->getBX());
97  if (verbose_) {
98  std::cout << "CSC LCT bx " << lctItr1->getBX() << std::endl;
99  }
100  }
101  }
102 }

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

◆ bookHistograms()

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.

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 }

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

Member Data Documentation

◆ csctpgbend

MonitorElement* L1TCSCTPG::csctpgbend
private

Definition at line 62 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

◆ csctpgbx

MonitorElement* L1TCSCTPG::csctpgbx
private

Definition at line 63 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

◆ csctpgpattern

MonitorElement* L1TCSCTPG::csctpgpattern
private

Definition at line 57 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

◆ csctpgquality

MonitorElement* L1TCSCTPG::csctpgquality
private

Definition at line 58 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

◆ csctpgSource_

edm::InputTag L1TCSCTPG::csctpgSource_
private

Definition at line 70 of file L1TCSCTPG.h.

Referenced by analyze().

◆ csctpgSource_token_

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

Definition at line 71 of file L1TCSCTPG.h.

Referenced by analyze().

◆ csctpgstrip

MonitorElement* L1TCSCTPG::csctpgstrip
private

Definition at line 60 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

◆ csctpgstriptype

MonitorElement* L1TCSCTPG::csctpgstriptype
private

Definition at line 61 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

◆ csctpgwg

MonitorElement* L1TCSCTPG::csctpgwg
private

Definition at line 59 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

◆ logFile_

std::ofstream L1TCSCTPG::logFile_
private

Definition at line 69 of file L1TCSCTPG.h.

◆ monitorDaemon_

bool L1TCSCTPG::monitorDaemon_
private

Definition at line 68 of file L1TCSCTPG.h.

◆ nev_

int L1TCSCTPG::nev_
private

Definition at line 65 of file L1TCSCTPG.h.

Referenced by analyze(), and bookHistograms().

◆ outputFile_

std::string L1TCSCTPG::outputFile_
private

Definition at line 66 of file L1TCSCTPG.h.

Referenced by L1TCSCTPG().

◆ verbose_

bool L1TCSCTPG::verbose_
private

Definition at line 67 of file L1TCSCTPG.h.

Referenced by analyze(), and L1TCSCTPG().

L1TCSCTPG::nev_
int nev_
Definition: L1TCSCTPG.h:65
L1TCSCTPG::csctpgbx
MonitorElement * csctpgbx
Definition: L1TCSCTPG.h:63
L1TCSCTPG::csctpgpattern
MonitorElement * csctpgpattern
Definition: L1TCSCTPG.h:57
L1TCSCTPG::verbose_
bool verbose_
Definition: L1TCSCTPG.h:67
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::LogInfo
Definition: MessageLogger.h:254
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle< CSCCorrelatedLCTDigiCollection >
L1TCSCTPG::csctpgstriptype
MonitorElement * csctpgstriptype
Definition: L1TCSCTPG.h:61
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
L1TCSCTPG::outputFile_
std::string outputFile_
Definition: L1TCSCTPG.h:66
L1TCSCTPG::csctpgSource_
edm::InputTag csctpgSource_
Definition: L1TCSCTPG.h:70
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
L1TCSCTPG::csctpgstrip
MonitorElement * csctpgstrip
Definition: L1TCSCTPG.h:60
L1TCSCTPG::csctpgquality
MonitorElement * csctpgquality
Definition: L1TCSCTPG.h:58
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
L1TCSCTPG::csctpgSource_token_
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > csctpgSource_token_
Definition: L1TCSCTPG.h:71
L1TCSCTPG::csctpgwg
MonitorElement * csctpgwg
Definition: L1TCSCTPG.h:59
MuonDigiCollection::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DigiContainerIterator
Definition: MuonDigiCollection.h:30
L1TCSCTPG::csctpgbend
MonitorElement * csctpgbend
Definition: L1TCSCTPG.h:62
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37