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

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

Private Attributes

edm::ParameterSet conf_
 
DQMStoredqmStore_
 
std::string HLTDirectory
 
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)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 25 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 cmsCodeRules.cppFunctionSkipper::operator.

22 {
23  HLTDirectory="HLTResults";
25  conf_ = iConfig;
26 }
std::string HLTDirectory
Definition: MonitorLTC.h:38
DQMStore * dqmStore_
Definition: MonitorLTC.h:33
edm::ParameterSet conf_
Definition: MonitorLTC.h:34
MonitorLTC::~MonitorLTC ( )
inline

Definition at line 28 of file MonitorLTC.h.

28 {};

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 49 of file MonitorLTC.cc.

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

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

Reimplemented from edm::EDAnalyzer.

Definition at line 29 of file MonitorLTC.cc.

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

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

Reimplemented from edm::EDAnalyzer.

Definition at line 91 of file MonitorLTC.cc.

References conf_, dqmStore_, edm::ParameterSet::getParameter(), ExpressReco_HICollisions_FallBack::outputFileName, and DQMStore::save().

91  {
92  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
93  std::string outputFileName = conf_.getParameter<std::string>("OutputFileName");
94  if(outputMEsInRootFile){
95  dqmStore_->save(outputFileName);
96  }
97 }
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:1883
DQMStore * dqmStore_
Definition: MonitorLTC.h:33
edm::ParameterSet conf_
Definition: MonitorLTC.h:34

Member Data Documentation

edm::ParameterSet MonitorLTC::conf_
private

Definition at line 34 of file MonitorLTC.h.

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

DQMStore* MonitorLTC::dqmStore_
private

Definition at line 33 of file MonitorLTC.h.

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

std::string MonitorLTC::HLTDirectory
private

Definition at line 38 of file MonitorLTC.h.

Referenced by beginJob(), and MonitorLTC().

MonitorElement* MonitorLTC::LTCTriggerDecision_all
private

Definition at line 36 of file MonitorLTC.h.

Referenced by analyze(), and beginJob().