CMS 3D CMS Logo

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

L1TRPCTFClient Class Reference

#include <L1TRPCTFClient.h>

Inheritance diagram for L1TRPCTFClient:
edm::EDAnalyzer

List of all members.

Public Member Functions

 L1TRPCTFClient (const edm::ParameterSet &ps)
 Constructor.
virtual ~L1TRPCTFClient ()
 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 ()
void processHistograms ()

Private Attributes

int counterEvt_
 counter
int counterLS_
DQMStoredbe_
std::string input_dir_
MonitorElementm_deadChannels
MonitorElementm_noisyChannels
MonitorElementm_phipackedbad
MonitorElementm_phipackeddead
bool m_runInEndJob
bool m_runInEndLumi
bool m_runInEndRun
bool m_runInEventLoop
std::string monitorName_
std::string output_dir_
edm::ParameterSet parameters_
int prescaleEvt_
 units of lumi sections
int prescaleLS_
 counter
bool verbose_
 prescale on number of events

Detailed Description

Definition at line 21 of file L1TRPCTFClient.h.


Constructor & Destructor Documentation

L1TRPCTFClient::L1TRPCTFClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 23 of file L1TRPCTFClient.cc.

L1TRPCTFClient::~L1TRPCTFClient ( ) [virtual]

Destructor.

Definition at line 29 of file L1TRPCTFClient.cc.

                               {
 LogInfo("TriggerDQM")<<"[TriggerDQM]: ending... ";
}

Member Function Documentation

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

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 110 of file L1TRPCTFClient.cc.

                                                                      {
    //   cout << "L1TRPCTFClient::analyze" << endl;
    counterEvt_++;
    if (prescaleEvt_ < 1)
        return;
    if (prescaleEvt_ > 0 && counterEvt_ % prescaleEvt_ != 0)
        return;

    // there is no loop on events in the offline harvesting step
    // code here will not be executed offline

    if (m_runInEventLoop) {

        processHistograms();
    }

}
void L1TRPCTFClient::beginJob ( void  ) [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 68 of file L1TRPCTFClient.cc.

References DQMStore::book2D(), dbe_, cppFunctionSkipper::operator, and DQMStore::setCurrentFolder().

                                 {

  LogInfo("TriggerDQM")<<"[TriggerDQM]: Begin Job";

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

  dbe_->setCurrentFolder(output_dir_);

  m_deadChannels = dbe_->book2D("RPCTF_deadchannels",
                                "RPCTF deadchannels",
                                33, -16.5, 16.5,
                                144,  -0.5, 143.5);
  m_noisyChannels =  dbe_->book2D("RPCTF_noisychannels",
                                "RPCTF noisy channels",
                                33, -16.5, 16.5,
                                144,  -0.5, 143.5);
}
void L1TRPCTFClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 91 of file L1TRPCTFClient.cc.

                                                                                                   {
   // optionally reset histograms here
   // clientHisto->Reset();
}
void L1TRPCTFClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 87 of file L1TRPCTFClient.cc.

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

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 139 of file L1TRPCTFClient.cc.

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

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file L1TRPCTFClient.cc.

References gather_cfg::cout.

{
   if (verbose_) std::cout <<  "L1TRPCTFClient::endLuminosityBlock" << std::endl;

   if (m_runInEndLumi) {

       processHistograms();
   }

}                         
void L1TRPCTFClient::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 129 of file L1TRPCTFClient.cc.

void L1TRPCTFClient::initialize ( ) [private]

Definition at line 34 of file L1TRPCTFClient.cc.

References dbe_, and cppFunctionSkipper::operator.

                               { 

  counterLS_=0; 
  counterEvt_=0; 
  
  // get back-end interface
  dbe_ = Service<DQMStore>().operator->();
  
  // base folder for the contents of this job
  monitorName_ = parameters_.getUntrackedParameter<string>("monitorName","");
//  cout << "Monitor name = " << monitorName_ << endl;
  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
//  cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< endl;
  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
//  cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< endl;
  output_dir_ = parameters_.getUntrackedParameter<string>("output_dir","");
//  cout << "DQM output dir = " << output_dir_ << endl;
  input_dir_ = parameters_.getUntrackedParameter<string>("input_dir","");
//  cout << "DQM input dir = " << input_dir_ << endl;
  
  verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
  
  m_runInEventLoop = parameters_.getUntrackedParameter<bool>("runInEventLoop", false);
  m_runInEndLumi = parameters_.getUntrackedParameter<bool>("runInEndLumi", false);
  m_runInEndRun = parameters_.getUntrackedParameter<bool>("runInEndRun", false);
  m_runInEndJob = parameters_.getUntrackedParameter<bool>("runInEndJob", false);


  LogInfo( "TriggerDQM");

      
}
void L1TRPCTFClient::processHistograms ( ) [private]

Definition at line 150 of file L1TRPCTFClient.cc.

References gather_cfg::cout, dbe_, DQMStore::get(), QReport::getBadChannels(), DQMStore::getMEs(), MonitorElement::getQReport(), MonitorElement::getQReports(), and DQMStore::setCurrentFolder().

                                       {

    dbe_->setCurrentFolder(input_dir_);

   {

     MonitorElement *me
         = dbe_->get( (input_dir_+"/RPCTF_muons_eta_phi_bx0").c_str() );

     if (me){
       const QReport *qreport;

       qreport = me->getQReport("DeadChannels_RPCTF_2D");
       if (qreport) {
         vector<dqm::me_util::Channel> badChannels = qreport->getBadChannels();
         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
              channel != badChannels.end();
              ++channel)
         {
           m_deadChannels->setBinContent((*channel).getBinX(),
                                         (*channel).getBinY(),
                                         100);
         } // for(badchannels)
       } //if (qreport)

       qreport = me->getQReport("HotChannels_RPCTF_2D");
       if (qreport) {
         vector<dqm::me_util::Channel> badChannels = qreport->getBadChannels();
         for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
              channel != badChannels.end();
              ++channel)
         {
           // (*channel).getBinY() == 0 for NoisyChannels QTEST
           m_noisyChannels->setBinContent((*channel).getBinX(), 100);
         } // for(badchannels)
       } //if (qreport)
 //      else std::cout << "dupa" << std::endl;
     } // if (me)


   }


   if (verbose_)
   {
     std::vector<string> meVec = dbe_->getMEs();
     for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {

         std::string full_path = input_dir_ + "/" + (*it);
         MonitorElement * me =dbe_->get(full_path);

         // for this MEs, get list of associated QTs
         std::vector<QReport *> Qtest_map = me->getQReports();

         if (Qtest_map.size() > 0) {
           std::cout << "Test: " << full_path << std::endl;
           for (std::vector<QReport *>::const_iterator it = Qtest_map.begin();
                 it != Qtest_map.end();
                 ++it)
           {
               std::cout
                   << " Name "<< (*it)->getQRName()
                   << " Status " <<  (*it)->getStatus()
                   <<std::endl;

               std::vector<dqm::me_util::Channel> badChannels=(*it)->getBadChannels();

               vector<dqm::me_util::Channel>::iterator badchsit = badChannels.begin();
               while(badchsit != badChannels.end())
               {
                 int ix = (*badchsit).getBinX();
                 int iy = (*badchsit).getBinY();
                 std::cout << "(" << ix <<","<< iy << ") ";
                 ++badchsit;
               }
               std::cout << std::endl;

           }
         }

     } //
   }


}

Member Data Documentation

counter

Definition at line 73 of file L1TRPCTFClient.h.

Definition at line 72 of file L1TRPCTFClient.h.

Definition at line 68 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::input_dir_ [private]

Definition at line 70 of file L1TRPCTFClient.h.

Definition at line 64 of file L1TRPCTFClient.h.

Definition at line 65 of file L1TRPCTFClient.h.

Definition at line 62 of file L1TRPCTFClient.h.

Definition at line 63 of file L1TRPCTFClient.h.

Definition at line 82 of file L1TRPCTFClient.h.

Definition at line 80 of file L1TRPCTFClient.h.

Definition at line 81 of file L1TRPCTFClient.h.

Definition at line 79 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::monitorName_ [private]

Definition at line 69 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::output_dir_ [private]

Definition at line 71 of file L1TRPCTFClient.h.

Definition at line 67 of file L1TRPCTFClient.h.

units of lumi sections

Definition at line 75 of file L1TRPCTFClient.h.

counter

Definition at line 74 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::verbose_ [private]

prescale on number of events

Definition at line 77 of file L1TRPCTFClient.h.