CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
MonitorLTC Class Reference

#include <MonitorLTC.h>

Inheritance diagram for MonitorLTC:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
virtual void endJob ()
 
 MonitorLTC (const edm::ParameterSet &)
 
 ~MonitorLTC ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::ParameterSet conf_
 
DQMStoredqmStore_
 
std::string HLTDirectory
 
edm::EDGetTokenT
< LTCDigiCollection
ltcDigiCollectionTagToken_
 
MonitorElementLTCTriggerDecision_all
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 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)
 

Detailed Description

Definition at line 29 of file MonitorLTC.h.

Constructor & Destructor Documentation

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

Definition at line 20 of file MonitorLTC.cc.

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

22 {
23  HLTDirectory="HLTResults";
25  conf_ = iConfig;
26 
27  ltcDigiCollectionTagToken_ = consumes<LTCDigiCollection>(conf_.getParameter<edm::InputTag>("ltcDigiCollectionTag") );
28 }
T getParameter(std::string const &) const
std::string HLTDirectory
Definition: MonitorLTC.h:43
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:45
DQMStore * dqmStore_
Definition: MonitorLTC.h:38
edm::ParameterSet conf_
Definition: MonitorLTC.h:39
MonitorLTC::~MonitorLTC ( )
inline

Definition at line 32 of file MonitorLTC.h.

32 {};

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 55 of file MonitorLTC.cc.

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

56 {
58 // unsigned int ltc_run;
59 // unsigned int ltc_event;
60 // unsigned int ltc_triggerNumber;
61 // unsigned int ltc_mask; // eight bits
62 // unsigned long long int ltc_gpstime;
63 // unsigned int ltc_orbit;
64 // unsigned int ltc_bunch;
65 // unsigned int ltc_inhibit;
66  for( LTCDigiCollection::const_iterator ltcdigiItr = ltcdigis->begin() ; ltcdigiItr != ltcdigis->end() ; ++ltcdigiItr ) {
67 // ltc_run = ltcdigiItr->runNumber();
68 // ltc_event = ltcdigiItr->eventNumber();
69 // ltc_triggerNumber = ltcdigiItr->eventID();
70 // ltc_bunch = ltcdigiItr->bunchNumber();
71 // ltc_orbit = ltcdigiItr->orbitNumber();
72 // ltc_inhibit = ltcdigiItr->triggerInhibitNumber();
73 // ltc_mask = (unsigned int)(ltcdigiItr->externTriggerMask());
74 // ltc_gpstime = ltcdigiItr->bstGpsTime();
75  for ( int ibit = 0; ibit < 7; ++ibit ) {
76  if ( ltcdigiItr->HasTriggered(ibit) ) {
77  LTCTriggerDecision_all->Fill(ibit,1.);
78  }
79  }
80  //
81 // std::cout << "XXX: "
82 // << ltcdigiItr->runNumber() << " "
83 // << ltcdigiItr->eventNumber() << " "
84 // << ltcdigiItr->bunchNumber() << " "
85 // << ltcdigiItr->orbitNumber() << " "
86 // << "0x" << std::hex
87 // << int(ltcdigiItr->externTriggerMask()) << " "
88 // << std::dec
89 // << ltcdigiItr->triggerInhibitNumber() << " "
90 // << ltcdigiItr->bstGpsTime() << " "
91 // << std::endl;
92 // std::cout << (*ltcdigiItr) << std::endl;
93  }
94 
95 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:41
void Fill(long long x)
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:45
void MonitorLTC::beginJob ( void  )
virtual

Definition at line 51 of file MonitorLTC.cc.

51  {
52 
53 }
void MonitorLTC::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 30 of file MonitorLTC.cc.

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

31 {
33  // 0 DT
34  // 1 CSC
35  // 2 RBC1 (RPC techn. cosmic trigger for wheel +1, sector 10)
36  // 3 RBC2 (RPC techn. cosmic trigger for wheel +2, sector 10)
37  // 4 RPCTB (RPC Trigger Board trigger, covering both sectors 10 of both wheels, but with different geometrical acceptance ("pointing"))
38  // 5 unused
39  // edm::CurrentProcessingContext const* current_processing_context = currentContext();
40  // std::string const* the_label = moduleLabel();
41  std::string the_label = conf_.getParameter<std::string>("@module_label");
42  std::string ltctitle = the_label + "_LTCTriggerDecision";
43  LTCTriggerDecision_all = ibooker.book1D(ltctitle, ltctitle, 8, -0.5, 7.5);
48  LTCTriggerDecision_all->setBinLabel(5, "RPCTB");
49 }
T getParameter(std::string const &) const
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:41
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(Args &&...args)
Definition: DQMStore.h:113
std::string HLTDirectory
Definition: MonitorLTC.h:43
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
edm::ParameterSet conf_
Definition: MonitorLTC.h:39
void MonitorLTC::endJob ( void  )
virtual

Definition at line 97 of file MonitorLTC.cc.

References conf_, dqmStore_, edm::ParameterSet::getParameter(), dumpDBToFile_GT_ttrig_cfg::outputFileName, DQMStore::save(), and AlCaHLTBitMon_QueryRunRegistry::string.

97  {
98  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
100  if(outputMEsInRootFile){
101  dqmStore_->save(outputFileName);
102  }
103 }
T getParameter(std::string const &) const
DQMStore * dqmStore_
Definition: MonitorLTC.h:38
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2540
edm::ParameterSet conf_
Definition: MonitorLTC.h:39

Member Data Documentation

edm::ParameterSet MonitorLTC::conf_
private

Definition at line 39 of file MonitorLTC.h.

Referenced by bookHistograms(), endJob(), and MonitorLTC().

DQMStore* MonitorLTC::dqmStore_
private

Definition at line 38 of file MonitorLTC.h.

Referenced by endJob(), and MonitorLTC().

std::string MonitorLTC::HLTDirectory
private

Definition at line 43 of file MonitorLTC.h.

Referenced by bookHistograms(), and MonitorLTC().

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

Definition at line 45 of file MonitorLTC.h.

Referenced by analyze(), and MonitorLTC().

MonitorElement* MonitorLTC::LTCTriggerDecision_all
private

Definition at line 41 of file MonitorLTC.h.

Referenced by analyze(), and bookHistograms().