CMS 3D CMS Logo

MonitorLTC Class Reference

#include <DQM/SiStripMonitorCluster/interface/MonitorLTC.h>

Inheritance diagram for MonitorLTC:

edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob (edm::EventSetup const &)
virtual void endJob ()
 MonitorLTC (const edm::ParameterSet &)
 ~MonitorLTC ()

Private Attributes

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


Detailed Description

Definition at line 25 of file MonitorLTC.h.


Constructor & Destructor Documentation

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

Definition at line 24 of file MonitorLTC.cc.

References conf_, dqmStore_, and HLTDirectory.

00025 {
00026   HLTDirectory="HLTResults";
00027   dqmStore_  = edm::Service<DQMStore>().operator->();
00028   conf_ = iConfig;
00029 }

MonitorLTC::~MonitorLTC (  )  [inline]

Definition at line 28 of file MonitorLTC.h.

00028 {};


Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 53 of file MonitorLTC.cc.

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

00054 {
00055   edm::Handle<LTCDigiCollection> ltcdigis; iEvent.getByType(ltcdigis);
00056 //  unsigned int ltc_run;
00057 //  unsigned int ltc_event;
00058 //  unsigned int ltc_triggerNumber;
00059 //  unsigned int ltc_mask; // eight bits
00060 //  unsigned long long int ltc_gpstime;
00061 //  unsigned int ltc_orbit;
00062 //  unsigned int ltc_bunch;
00063 //  unsigned int ltc_inhibit;
00064   for( LTCDigiCollection::const_iterator ltcdigiItr = ltcdigis->begin() ; ltcdigiItr != ltcdigis->end() ; ++ltcdigiItr ) {
00065 //    ltc_run = ltcdigiItr->runNumber();
00066 //    ltc_event = ltcdigiItr->eventNumber();
00067 //    ltc_triggerNumber = ltcdigiItr->eventID();
00068 //    ltc_bunch = ltcdigiItr->bunchNumber();
00069 //    ltc_orbit = ltcdigiItr->orbitNumber();
00070 //    ltc_inhibit = ltcdigiItr->triggerInhibitNumber();
00071 //    ltc_mask = (unsigned int)(ltcdigiItr->externTriggerMask());
00072 //    ltc_gpstime = ltcdigiItr->bstGpsTime();
00073     for ( int ibit = 0; ibit < 7; ++ibit ) {
00074       if ( ltcdigiItr->HasTriggered(ibit) ) {
00075        LTCTriggerDecision_all->Fill(ibit,1.);
00076       }
00077     }
00078     //
00079 //    std::cout << "XXX: "
00080 //              << ltcdigiItr->runNumber() << " "
00081 //              << ltcdigiItr->eventNumber() << " "
00082 //              << ltcdigiItr->bunchNumber() << " "
00083 //              << ltcdigiItr->orbitNumber() << " "
00084 //              << "0x" << std::hex
00085 //              << int(ltcdigiItr->externTriggerMask()) << " "
00086 //              << std::dec
00087 //              << ltcdigiItr->triggerInhibitNumber() << " "
00088 //              << ltcdigiItr->bstGpsTime() << " "
00089 //              << std::endl;
00090 //    std::cout << (*ltcdigiItr) << std::endl;
00091   }
00092 
00093 }

void MonitorLTC::beginJob ( edm::EventSetup const &  es  )  [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 32 of file MonitorLTC.cc.

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

00032                                                 {
00033   using namespace edm;
00034   dqmStore_->setCurrentFolder(HLTDirectory);
00035   // 0 DT
00036   // 1 CSC
00037   // 2 RBC1 (RPC techn. cosmic trigger for wheel +1, sector 10)
00038   // 3 RBC2 (RPC techn. cosmic trigger for wheel +2, sector 10)
00039   // 4 RPCTB (RPC Trigger Board trigger, covering both sectors 10 of both wheels, but with different geometrical acceptance ("pointing"))
00040   // 5 unused 
00041 //  edm::CurrentProcessingContext const* current_processing_context = currentContext();
00042 //  std::string const* the_label = moduleLabel();
00043   std::string the_label = conf_.getParameter<std::string>("@module_label");
00044   std::string ltctitle = the_label + "_LTCTriggerDecision";
00045   LTCTriggerDecision_all = dqmStore_->book1D(ltctitle, ltctitle, 8, -0.5, 7.5);
00046   LTCTriggerDecision_all->setBinLabel(1, "DT");
00047   LTCTriggerDecision_all->setBinLabel(2, "CSC");
00048   LTCTriggerDecision_all->setBinLabel(3, "RBC1");
00049   LTCTriggerDecision_all->setBinLabel(4, "RBC2");
00050   LTCTriggerDecision_all->setBinLabel(5, "RPCTB");
00051 }

void MonitorLTC::endJob ( void   )  [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 95 of file MonitorLTC.cc.

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

00095                            {
00096   bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
00097   string outputFileName = conf_.getParameter<string>("OutputFileName");
00098   if(outputMEsInRootFile){
00099     dqmStore_->save(outputFileName);
00100   }
00101 }


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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:23 2009 for CMSSW by  doxygen 1.5.4