CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

L1TCSCTFClient Class Reference

#include <L1TCSCTFClient.h>

Inheritance diagram for L1TCSCTFClient:
edm::EDAnalyzer

List of all members.

Public Member Functions

 L1TCSCTFClient (const edm::ParameterSet &ps)
 Constructor.
virtual ~L1TCSCTFClient ()
 Destructor.

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze.
void beginJob (void)
 BeginJob.
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun.
void endJob ()
 Endjob.
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic.
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun.

Private Member Functions

void initialize ()

Private Attributes

int counterEvt
 counter
int counterLS
MonitorElementcsctferrors_
 prescale on number of events
DQMStoredbe
std::string input_dir
std::string output_dir
edm::ParameterSet parameters
int prescaleEvt
 units of lumi sections
int prescaleLS
 counter

Detailed Description

Definition at line 13 of file L1TCSCTFClient.h.


Constructor & Destructor Documentation

L1TCSCTFClient::L1TCSCTFClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 15 of file L1TCSCTFClient.cc.

References Parameters::parameters.

                                                       {
  parameters=ps;
  initialize();
}
L1TCSCTFClient::~L1TCSCTFClient ( ) [virtual]

Destructor.

Definition at line 20 of file L1TCSCTFClient.cc.

{}

Member Function Documentation

void L1TCSCTFClient::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 103 of file L1TCSCTFClient.cc.

References newFWLiteAna::bin, benchmark_cfg::errors, MonitorElement::getTH1F(), and reco_calib_source_client_cfg::prescaleEvt.

                                                                     {
   counterEvt++;
   if (prescaleEvt<1) return;
   if (prescaleEvt>0 && counterEvt%prescaleEvt!=0) return;
   
   dbe->setCurrentFolder(input_dir);

   // The code below duplicates one from endLuminosityBlock function
   vector<string> meVec = dbe->getMEs();
   for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){
     string full_path = input_dir + "/" + (*it);
     MonitorElement *me =dbe->get(full_path);
     if( !me ){
        LogError("TriggerDQM")<<full_path<<" NOT FOUND.";
        continue;
     }
     //  But for now we only do a simple workaround
     if( (*it) != "CSCTF_errors" ) continue;
     TH1F *errors = me->getTH1F();
     csctferrors_->getTH1F()->Reset();
     if(!errors) continue;
     for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++)
        csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin));
   }
}
void L1TCSCTFClient::beginJob ( void  ) [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 37 of file L1TCSCTFClient.cc.

References cmsCodeRules::cppFunctionSkipper::operator, and o2o::output_dir.

                                 {
  // get backendinterface
  dbe = Service<DQMStore>().operator->();

  // do your thing
  dbe->setCurrentFolder(output_dir);
  csctferrors_ = dbe->book1D("csctferrors_","CSCTF Errors",6,0,6);
  dbe->setCurrentFolder(input_dir);
}
void L1TCSCTFClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 51 of file L1TCSCTFClient.cc.

                                                                                                   {
   // optionally reset histograms here
}
void L1TCSCTFClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 48 of file L1TCSCTFClient.cc.

{}
void L1TCSCTFClient::endJob ( void  ) [protected, virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 133 of file L1TCSCTFClient.cc.

{}
void L1TCSCTFClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
) [protected, virtual]

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 55 of file L1TCSCTFClient.cc.

References newFWLiteAna::bin, benchmark_cfg::errors, and MonitorElement::getTH1F().

                                                                                                {
   dbe->setCurrentFolder(input_dir);

   vector<string> meVec = dbe->getMEs();
   for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){
     string full_path = input_dir + "/" + (*it);
     MonitorElement *me =dbe->get(full_path);
     if( !me ){
        LogInfo("TriggerDQM")<<full_path<<" NOT FOUND.";
        continue;
     }

     // The commented code below requires to be developed to support QT framework
/*     std::vector<QReport *> Qtest_map = me->getQReports();
     for(std::vector<QReport *>::const_iterator it=Qtest_map.begin(); it!=Qtest_map.end(); it++){
        string qt_name   = (*it)->getQRName();
        int    qt_status = (*it)->getStatus();

        switch(qt_status){
           case dqm::qstatus::WARNING:    break;
           case dqm::qstatus::ERROR:      break;
           case dqm::qstatus::DISABLED:   break;
           case dqm::qstatus::INVALID:    break;
           case dqm::qstatus::INSUF_STAT: break;
           default: break;
        }

//   get bad channel list
        std::vector<dqm::me_util::Channel> badChannels=(*it)->getBadChannels();
        for(vector<dqm::me_util::Channel>::iterator badchsit=badChannels.begin(); badchsit!=badChannels.end(); badchsit++){
           int ix = badchsit->getBinX();
           int iy = badchsit->getBinY();
           (*badchsit).getContents();
        }

     }
*/
     //  But for now we only do a simple workaround
     if( (*it) != "CSCTF_errors" ) continue;
     TH1F *errors = me->getTH1F();
     csctferrors_->getTH1F()->Reset();
     if(!errors) continue;
     for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++)
        csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin));
   }
}
void L1TCSCTFClient::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 130 of file L1TCSCTFClient.cc.

{}
void L1TCSCTFClient::initialize ( ) [private]

Member Data Documentation

counter

Definition at line 54 of file L1TCSCTFClient.h.

Definition at line 53 of file L1TCSCTFClient.h.

prescale on number of events

Definition at line 59 of file L1TCSCTFClient.h.

Definition at line 51 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::input_dir [private]

Definition at line 52 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::output_dir [private]

Definition at line 52 of file L1TCSCTFClient.h.

Definition at line 49 of file L1TCSCTFClient.h.

units of lumi sections

Definition at line 56 of file L1TCSCTFClient.h.

counter

Definition at line 55 of file L1TCSCTFClient.h.