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

Private Attributes

int counterEvt_
 counter
int counterLS_
DQMStoredbe_
std::string input_dir_
MonitorElementm_deadChannels
MonitorElementm_noisyChannels
MonitorElementm_phipackedbad
MonitorElementm_phipackeddead
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 178 of file L1TRPCTFClient.cc.

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

   


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

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 62 of file L1TRPCTFClient.cc.

References DQMStore::book2D(), dbe_, cmsCodeRules::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 85 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 81 of file L1TRPCTFClient.cc.

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

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 194 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 91 of file L1TRPCTFClient.cc.

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

{
   if (verbose_) std::cout <<  "L1TRPCTFClient::endLuminosityBlock" << std::endl;
  
   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;
              
          }
        }
        
    } // 
  }
}                         
void L1TRPCTFClient::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 190 of file L1TRPCTFClient.cc.

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

Definition at line 34 of file L1TRPCTFClient.cc.

References dbe_, and cmsCodeRules::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);
  
  LogInfo( "TriggerDQM");

      
}

Member Data Documentation

counter

Definition at line 70 of file L1TRPCTFClient.h.

Definition at line 69 of file L1TRPCTFClient.h.

Definition at line 65 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::input_dir_ [private]

Definition at line 67 of file L1TRPCTFClient.h.

Definition at line 61 of file L1TRPCTFClient.h.

Definition at line 62 of file L1TRPCTFClient.h.

Definition at line 59 of file L1TRPCTFClient.h.

Definition at line 60 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::monitorName_ [private]

Definition at line 66 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::output_dir_ [private]

Definition at line 68 of file L1TRPCTFClient.h.

Definition at line 64 of file L1TRPCTFClient.h.

units of lumi sections

Definition at line 72 of file L1TRPCTFClient.h.

counter

Definition at line 71 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::verbose_ [private]

prescale on number of events

Definition at line 74 of file L1TRPCTFClient.h.