![]() |
![]() |
#include <DQM/RPCMonitorClient/interface/RPCMonitorRaw.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
get data, convert to digis attach againe to Event | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
get data, convert to digis attach againe to Event | |
virtual void | beginJob (const edm::EventSetup &) |
virtual void | beginJob (const edm::EventSetup &) |
virtual void | endJob () |
virtual void | endJob () |
RPCMonitorRaw (const edm::ParameterSet &cfg) | |
RPCMonitorRaw (const edm::ParameterSet &cfg) | |
virtual | ~RPCMonitorRaw () |
virtual | ~RPCMonitorRaw () |
Private Attributes | |
MonitorElement * | me_e |
MonitorElement * | me_e |
MonitorElement * | me_h [3] |
MonitorElement * | me_h [3] |
edm::ParameterSet | theConfig |
RPCRawDataCounts | theCounts |
bool | theWriteHistos |
Definition at line 20 of file RPCMonitorRaw.h.
RPCMonitorRaw::RPCMonitorRaw | ( | const edm::ParameterSet & | cfg | ) | [inline, explicit] |
RPCMonitorRaw::~RPCMonitorRaw | ( | ) | [virtual] |
Definition at line 30 of file RPCMonitorRaw.cc.
References LogTrace.
00030 { LogTrace("") << "RPCMonitorRaw destructor"; }
RPCMonitorRaw::RPCMonitorRaw | ( | const edm::ParameterSet & | cfg | ) | [inline, explicit] |
virtual RPCMonitorRaw::~RPCMonitorRaw | ( | ) | [virtual] |
virtual void RPCMonitorRaw::analyze | ( | const edm::Event & | , | |
const edm::EventSetup & | ||||
) | [virtual] |
void RPCMonitorRaw::analyze | ( | const edm::Event & | ev, | |
const edm::EventSetup & | es | |||
) | [virtual] |
get data, convert to digis attach againe to Event
Implements edm::EDAnalyzer.
Definition at line 64 of file RPCMonitorRaw.cc.
References edm::Event::getByType(), MonitorElement::getTH1F(), i, me_e, me_h, edm::Handle< T >::product(), RPCRawDataCounts::readoutErrorVector(), RPCRawDataCounts::recordTypeVector(), MonitorElement::Reset(), theCounts, MonitorElement::update(), and v1.
00065 { 00066 edm::Handle<RPCRawDataCounts> rawCounts; 00067 ev.getByType( rawCounts); 00068 00069 const RPCRawDataCounts * aCounts = rawCounts.product(); 00070 theCounts += *aCounts; 00071 00072 me_e->Reset(); 00073 me_h[0]->Reset(); 00074 me_h[1]->Reset(); 00075 me_h[2]->Reset(); 00076 00077 vector<double> v1; 00078 00079 theCounts.readoutErrorVector(v1); 00080 me_e->getTH1F()->FillN(v1.size()/2,&v1[0],&v1[1],2); 00081 00082 for (int i=0;i<3;i++) { 00083 theCounts.recordTypeVector(790+i,v1); 00084 me_h[i]->getTH1F()->FillN(v1.size()/2,&v1[0],&v1[1],2); 00085 } 00086 00087 me_h[0]->update(); 00088 me_h[1]->update(); 00089 me_h[2]->update(); 00090 me_e->update(); 00091 }
virtual void RPCMonitorRaw::beginJob | ( | const edm::EventSetup & | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
void RPCMonitorRaw::beginJob | ( | const edm::EventSetup & | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 32 of file RPCMonitorRaw.cc.
References DQMStore::book1D(), edm::ParameterSet::getUntrackedParameter(), me_e, me_h, RPCRawDataCounts::readoutErrorHisto(), RPCRawDataCounts::recordTypeHisto(), DQMStore::setCurrentFolder(), theConfig, and theCounts.
00033 { 00034 00035 // Get DQM interface 00036 DQMStore* theDMBE = edm::Service<DQMStore>().operator->(); 00037 00038 theDMBE->setCurrentFolder(theConfig.getUntrackedParameter<std::string>("PrefixDir","RPC" )+"/FEDIntegrity" ); 00039 00040 me_h[0]=theDMBE->book1D("recordType_790",theCounts.recordTypeHisto(790)); 00041 me_h[1]=theDMBE->book1D("recordType_791",theCounts.recordTypeHisto(791)); 00042 me_h[2]=theDMBE->book1D("recordType_792",theCounts.recordTypeHisto(792)); 00043 00044 me_e =theDMBE->book1D("readoutErrors",theCounts.readoutErrorHisto()); 00045 }
virtual void RPCMonitorRaw::endJob | ( | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Reimplemented from edm::EDAnalyzer.
Definition at line 47 of file RPCMonitorRaw.cc.
References f, MonitorElement::getTH1F(), edm::ParameterSet::getUntrackedParameter(), me_e, me_h, and theConfig.
00048 { 00049 00050 bool writeHistos = theConfig.getUntrackedParameter<bool>("writeHistograms"); 00051 if (writeHistos) { 00052 std::string histoFile = theConfig.getUntrackedParameter<std::string>("histoFileName"); 00053 TFile f(histoFile.c_str(),"RECREATE"); 00054 me_h[0]->getTH1F()->Write(); 00055 me_h[1]->getTH1F()->Write(); 00056 me_h[2]->getTH1F()->Write(); 00057 me_e->getTH1F()->Write(); 00058 edm::LogInfo(" END JOB, histos saved!"); 00059 f.Close(); 00060 } 00061 }
MonitorElement* RPCMonitorRaw::me_e [private] |
Definition at line 40 of file RPCMonitorRaw.h.
MonitorElement* RPCMonitorRaw::me_e [private] |
MonitorElement* RPCMonitorRaw::me_h[3] [private] |
Definition at line 39 of file RPCMonitorRaw.h.
MonitorElement* RPCMonitorRaw::me_h[3] [private] |
edm::ParameterSet RPCMonitorRaw::theConfig [private] |
RPCRawDataCounts RPCMonitorRaw::theCounts [private] |
bool RPCMonitorRaw::theWriteHistos [private] |
Definition at line 37 of file RPCMonitorRaw.h.