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:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void endJob ()
 
 MonitorLTC (const edm::ParameterSet &)
 
 ~MonitorLTC ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::ParameterSet conf_
 
DQMStoredqmStore_
 
std::string HLTDirectory
 
edm::InputTag ltcDigiCollectionTag_
 
MonitorElementLTCTriggerDecision_all
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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 26 of file MonitorLTC.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file MonitorLTC.cc.

References conf_, dqmStore_, HLTDirectory, and cppFunctionSkipper::operator.

21  :
22  ltcDigiCollectionTag_(iConfig.getParameter<edm::InputTag>("ltcDigiCollectionTag"))
23 {
24  HLTDirectory="HLTResults";
26  conf_ = iConfig;
27 }
T getParameter(std::string const &) const
edm::InputTag ltcDigiCollectionTag_
Definition: MonitorLTC.h:40
std::string HLTDirectory
Definition: MonitorLTC.h:39
DQMStore * dqmStore_
Definition: MonitorLTC.h:34
edm::ParameterSet conf_
Definition: MonitorLTC.h:35
MonitorLTC::~MonitorLTC ( )
inline

Definition at line 29 of file MonitorLTC.h.

29 {};

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 50 of file MonitorLTC.cc.

References MonitorElement::Fill(), edm::Event::getByLabel(), ltcDigiCollectionTag_, and LTCTriggerDecision_all.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 30 of file MonitorLTC.cc.

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

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

Reimplemented from edm::EDAnalyzer.

Definition at line 92 of file MonitorLTC.cc.

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

92  {
93  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
95  if(outputMEsInRootFile){
96  dqmStore_->save(outputFileName);
97  }
98 }
T getParameter(std::string const &) const
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2118
DQMStore * dqmStore_
Definition: MonitorLTC.h:34
edm::ParameterSet conf_
Definition: MonitorLTC.h:35

Member Data Documentation

edm::ParameterSet MonitorLTC::conf_
private

Definition at line 35 of file MonitorLTC.h.

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

DQMStore* MonitorLTC::dqmStore_
private

Definition at line 34 of file MonitorLTC.h.

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

std::string MonitorLTC::HLTDirectory
private

Definition at line 39 of file MonitorLTC.h.

Referenced by beginJob(), and MonitorLTC().

edm::InputTag MonitorLTC::ltcDigiCollectionTag_
private

Definition at line 40 of file MonitorLTC.h.

Referenced by analyze().

MonitorElement* MonitorLTC::LTCTriggerDecision_all
private

Definition at line 37 of file MonitorLTC.h.

Referenced by analyze(), and beginJob().