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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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
 
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::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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::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:42
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionTagToken_
Definition: MonitorLTC.h:44
DQMStore * dqmStore_
Definition: MonitorLTC.h:37
edm::ParameterSet conf_
Definition: MonitorLTC.h:38
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::EDAnalyzer.

Definition at line 51 of file MonitorLTC.cc.

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

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

Reimplemented from edm::EDAnalyzer.

Definition at line 31 of file MonitorLTC.cc.

References DQMStore::book1D(), conf_, dqmStore_, edm::ParameterSet::getParameter(), HLTDirectory, LTCTriggerDecision_all, MonitorElement::setBinLabel(), DQMStore::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 = dqmStore_->book1D(ltctitle, ltctitle, 8, -0.5, 7.5);
49 }
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:872
MonitorElement * LTCTriggerDecision_all
Definition: MonitorLTC.h:40
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:42
DQMStore * dqmStore_
Definition: MonitorLTC.h:37
edm::ParameterSet conf_
Definition: MonitorLTC.h:38
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void MonitorLTC::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 94 of file MonitorLTC.cc.

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

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

Member Data Documentation

edm::ParameterSet MonitorLTC::conf_
private

Definition at line 38 of file MonitorLTC.h.

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

DQMStore* MonitorLTC::dqmStore_
private

Definition at line 37 of file MonitorLTC.h.

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

std::string MonitorLTC::HLTDirectory
private

Definition at line 42 of file MonitorLTC.h.

Referenced by beginJob(), and MonitorLTC().

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

Definition at line 44 of file MonitorLTC.h.

Referenced by analyze(), and MonitorLTC().

MonitorElement* MonitorLTC::LTCTriggerDecision_all
private

Definition at line 40 of file MonitorLTC.h.

Referenced by analyze(), and beginJob().