CMS 3D CMS Logo

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

#include <MonitorLTC.h>

Inheritance diagram for MonitorLTC:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 MonitorLTC (const edm::ParameterSet &)
 
 ~MonitorLTC () override=default
 
- 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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Attributes

edm::ParameterSet conf_
 
std::string HLTDirectory
 
edm::EDGetTokenT< LTCDigiCollectionltcDigiCollectionTagToken_
 
MonitorElementLTCTriggerDecision_all
 

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 >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 21 of file MonitorLTC.h.

Constructor & Destructor Documentation

◆ MonitorLTC()

MonitorLTC::MonitorLTC ( const edm::ParameterSet iConfig)
explicit

Definition at line 16 of file MonitorLTC.cc.

References conf_, edm::ParameterSet::getParameter(), HLTDirectory, and ltcDigiCollectionTagToken_.

18 {
19  HLTDirectory = "HLTResults";
20  conf_ = iConfig;
21 
22  ltcDigiCollectionTagToken_ = consumes<LTCDigiCollection>(conf_.getParameter<edm::InputTag>("ltcDigiCollectionTag"));
23 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::string HLTDirectory
Definition: MonitorLTC.h:33
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:35
edm::ParameterSet conf_
Definition: MonitorLTC.h:29

◆ ~MonitorLTC()

MonitorLTC::~MonitorLTC ( )
overridedefault

Member Function Documentation

◆ analyze()

void MonitorLTC::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 45 of file MonitorLTC.cc.

References dqm::impl::MonitorElement::Fill(), iEvent, ltcDigiCollectionTagToken_, and LTCTriggerDecision_all.

45  {
47  iEvent.getByToken(ltcDigiCollectionTagToken_, ltcdigis);
48  // unsigned int ltc_run;
49  // unsigned int ltc_event;
50  // unsigned int ltc_triggerNumber;
51  // unsigned int ltc_mask; // eight bits
52  // unsigned long long int ltc_gpstime;
53  // unsigned int ltc_orbit;
54  // unsigned int ltc_bunch;
55  // unsigned int ltc_inhibit;
56  for (LTCDigiCollection::const_iterator ltcdigiItr = ltcdigis->begin(); ltcdigiItr != ltcdigis->end(); ++ltcdigiItr) {
57  // ltc_run = ltcdigiItr->runNumber();
58  // ltc_event = ltcdigiItr->eventNumber();
59  // ltc_triggerNumber = ltcdigiItr->eventID();
60  // ltc_bunch = ltcdigiItr->bunchNumber();
61  // ltc_orbit = ltcdigiItr->orbitNumber();
62  // ltc_inhibit = ltcdigiItr->triggerInhibitNumber();
63  // ltc_mask = (unsigned int)(ltcdigiItr->externTriggerMask());
64  // ltc_gpstime = ltcdigiItr->bstGpsTime();
65  for (int ibit = 0; ibit < 7; ++ibit) {
66  if (ltcdigiItr->HasTriggered(ibit)) {
67  LTCTriggerDecision_all->Fill(ibit, 1.);
68  }
69  }
70  //
71  // std::cout << "XXX: "
72  // << ltcdigiItr->runNumber() << " "
73  // << ltcdigiItr->eventNumber() << " "
74  // << ltcdigiItr->bunchNumber() << " "
75  // << ltcdigiItr->orbitNumber() << " "
76  // << "0x" << std::hex
77  // << int(ltcdigiItr->externTriggerMask()) << " "
78  // << std::dec
79  // << ltcdigiItr->triggerInhibitNumber() << " "
80  // << ltcdigiItr->bstGpsTime() << " "
81  // << std::endl;
82  // std::cout << (*ltcdigiItr) << std::endl;
83  }
84 }
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:31
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:35

◆ bookHistograms()

void MonitorLTC::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 25 of file MonitorLTC.cc.

References dqm::implementation::IBooker::book1D(), conf_, edm::ParameterSet::getParameter(), HLTDirectory, LTCTriggerDecision_all, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

25  {
27  // 0 DT
28  // 1 CSC
29  // 2 RBC1 (RPC techn. cosmic trigger for wheel +1, sector 10)
30  // 3 RBC2 (RPC techn. cosmic trigger for wheel +2, sector 10)
31  // 4 RPCTB (RPC Trigger Board trigger, covering both sectors 10 of both
32  // wheels, but with different geometrical acceptance ("pointing")) 5 unused
33  // edm::CurrentProcessingContext const* current_processing_context =
34  // currentContext(); std::string const* the_label = moduleLabel();
35  std::string the_label = conf_.getParameter<std::string>("@module_label");
36  std::string ltctitle = the_label + "_LTCTriggerDecision";
37  LTCTriggerDecision_all = ibooker.book1D(ltctitle, ltctitle, 8, -0.5, 7.5);
43 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:31
std::string HLTDirectory
Definition: MonitorLTC.h:33
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::ParameterSet conf_
Definition: MonitorLTC.h:29

Member Data Documentation

◆ conf_

edm::ParameterSet MonitorLTC::conf_
private

Definition at line 29 of file MonitorLTC.h.

Referenced by bookHistograms(), and MonitorLTC().

◆ HLTDirectory

std::string MonitorLTC::HLTDirectory
private

Definition at line 33 of file MonitorLTC.h.

Referenced by bookHistograms(), and MonitorLTC().

◆ ltcDigiCollectionTagToken_

edm::EDGetTokenT<LTCDigiCollection> MonitorLTC::ltcDigiCollectionTagToken_
private

Definition at line 35 of file MonitorLTC.h.

Referenced by analyze(), and MonitorLTC().

◆ LTCTriggerDecision_all

MonitorElement* MonitorLTC::LTCTriggerDecision_all
private

Definition at line 31 of file MonitorLTC.h.

Referenced by analyze(), and bookHistograms().