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::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

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
 
- 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)
 

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::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 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)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 24 of file MonitorLTC.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file MonitorLTC.cc.

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

19 {
20  HLTDirectory = "HLTResults";
21  conf_ = iConfig;
22 
23  ltcDigiCollectionTagToken_ = consumes<LTCDigiCollection>(conf_.getParameter<edm::InputTag>("ltcDigiCollectionTag"));
24 }
T getParameter(std::string const &) const
std::string HLTDirectory
Definition: MonitorLTC.h:36
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:38
edm::ParameterSet conf_
Definition: MonitorLTC.h:32
MonitorLTC::~MonitorLTC ( )
inlineoverride

Definition at line 27 of file MonitorLTC.h.

References analyze(), and bookHistograms().

27 {};

Member Function Documentation

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

Definition at line 46 of file MonitorLTC.cc.

References dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), ltcDigiCollectionTagToken_, and LTCTriggerDecision_all.

Referenced by ~MonitorLTC().

46  {
48  iEvent.getByToken(ltcDigiCollectionTagToken_, ltcdigis);
49  // unsigned int ltc_run;
50  // unsigned int ltc_event;
51  // unsigned int ltc_triggerNumber;
52  // unsigned int ltc_mask; // eight bits
53  // unsigned long long int ltc_gpstime;
54  // unsigned int ltc_orbit;
55  // unsigned int ltc_bunch;
56  // unsigned int ltc_inhibit;
57  for (LTCDigiCollection::const_iterator ltcdigiItr = ltcdigis->begin(); ltcdigiItr != ltcdigis->end(); ++ltcdigiItr) {
58  // ltc_run = ltcdigiItr->runNumber();
59  // ltc_event = ltcdigiItr->eventNumber();
60  // ltc_triggerNumber = ltcdigiItr->eventID();
61  // ltc_bunch = ltcdigiItr->bunchNumber();
62  // ltc_orbit = ltcdigiItr->orbitNumber();
63  // ltc_inhibit = ltcdigiItr->triggerInhibitNumber();
64  // ltc_mask = (unsigned int)(ltcdigiItr->externTriggerMask());
65  // ltc_gpstime = ltcdigiItr->bstGpsTime();
66  for (int ibit = 0; ibit < 7; ++ibit) {
67  if (ltcdigiItr->HasTriggered(ibit)) {
68  LTCTriggerDecision_all->Fill(ibit, 1.);
69  }
70  }
71  //
72  // std::cout << "XXX: "
73  // << ltcdigiItr->runNumber() << " "
74  // << ltcdigiItr->eventNumber() << " "
75  // << ltcdigiItr->bunchNumber() << " "
76  // << ltcdigiItr->orbitNumber() << " "
77  // << "0x" << std::hex
78  // << int(ltcdigiItr->externTriggerMask()) << " "
79  // << std::dec
80  // << ltcdigiItr->triggerInhibitNumber() << " "
81  // << ltcdigiItr->bstGpsTime() << " "
82  // << std::endl;
83  // std::cout << (*ltcdigiItr) << std::endl;
84  }
85 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:34
void Fill(long long x)
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:38
void MonitorLTC::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 26 of file MonitorLTC.cc.

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

Referenced by ~MonitorLTC().

26  {
27  ibooker.setCurrentFolder(HLTDirectory);
28  // 0 DT
29  // 1 CSC
30  // 2 RBC1 (RPC techn. cosmic trigger for wheel +1, sector 10)
31  // 3 RBC2 (RPC techn. cosmic trigger for wheel +2, sector 10)
32  // 4 RPCTB (RPC Trigger Board trigger, covering both sectors 10 of both
33  // wheels, but with different geometrical acceptance ("pointing")) 5 unused
34  // edm::CurrentProcessingContext const* current_processing_context =
35  // currentContext(); std::string const* the_label = moduleLabel();
36  std::string the_label = conf_.getParameter<std::string>("@module_label");
37  std::string ltctitle = the_label + "_LTCTriggerDecision";
38  LTCTriggerDecision_all = ibooker.book1D(ltctitle, ltctitle, 8, -0.5, 7.5);
44 }
T getParameter(std::string const &) const
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:34
std::string HLTDirectory
Definition: MonitorLTC.h:36
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)
edm::ParameterSet conf_
Definition: MonitorLTC.h:32

Member Data Documentation

edm::ParameterSet MonitorLTC::conf_
private

Definition at line 32 of file MonitorLTC.h.

Referenced by bookHistograms(), and MonitorLTC().

std::string MonitorLTC::HLTDirectory
private

Definition at line 36 of file MonitorLTC.h.

Referenced by bookHistograms(), and MonitorLTC().

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

Definition at line 38 of file MonitorLTC.h.

Referenced by analyze(), and MonitorLTC().

MonitorElement* MonitorLTC::LTCTriggerDecision_all
private

Definition at line 34 of file MonitorLTC.h.

Referenced by analyze(), and bookHistograms().