CMS 3D CMS Logo

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

RPCDcsInfo Class Reference

#include <RPCDcsInfo.h>

Inheritance diagram for RPCDcsInfo:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze.
void beginRun (const edm::Run &r, const edm::EventSetup &c)
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)

Private Member Functions

void makeDcsInfo (const edm::Event &e)

Private Attributes

DQMStoredbe_
bool dcs
MonitorElementDCSbyLS_
std::string dcsinfofolder_
edm::ParameterSet parameters_
std::string scalersRawToDigiLabel_
std::string subsystemname_

Detailed Description

Definition at line 14 of file RPCDcsInfo.h.


Constructor & Destructor Documentation

RPCDcsInfo::RPCDcsInfo ( const edm::ParameterSet ps)

Constructor.

Definition at line 8 of file RPCDcsInfo.cc.

References dbe_, dcs, dcsinfofolder_, edm::ParameterSet::getUntrackedParameter(), cmsCodeRules::cppFunctionSkipper::operator, scalersRawToDigiLabel_, and subsystemname_.

                                               {
  
  dbe_ = edm::Service<DQMStore>().operator->();

  subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "RPC") ;
  dcsinfofolder_ = ps.getUntrackedParameter<std::string>("dcsInfoFolder", "DCSInfo") ;
  scalersRawToDigiLabel_ = ps.getUntrackedParameter<std::string>("ScalersRawToDigiLabel", "scalersRawToDigi");
  
  // initialize
  dcs = true;
}
RPCDcsInfo::~RPCDcsInfo ( ) [virtual]

Destructor.

Definition at line 20 of file RPCDcsInfo.cc.

{}

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 34 of file RPCDcsInfo.cc.

References makeDcsInfo().

                                                                 {
 
  makeDcsInfo(e);
  return;
}
void RPCDcsInfo::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]
void RPCDcsInfo::endLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 40 of file RPCDcsInfo.cc.

References dcs, DCSbyLS_, and MonitorElement::setBinContent().

                                                                                      {

  // int nlumi = l.id().luminosityBlock();

  // fill dcs vs lumi 
  /* set those bins 0 for which bits are ON 
     needed for merge off lumi histograms across files */
  if (dcs)  DCSbyLS_->setBinContent(1,0.);
  else  DCSbyLS_->setBinContent(1,1.);

  dcs = true;
  
  return;
}
void RPCDcsInfo::makeDcsInfo ( const edm::Event e) [private]

Definition at line 56 of file RPCDcsInfo.cc.

References dcs, edm::Event::getByLabel(), edm::HandleBase::isValid(), and DcsStatus::RPC.

Referenced by analyze().

                                               {

  edm::Handle<DcsStatusCollection> dcsStatus;

  if ( ! e.getByLabel("scalersRawToDigi", dcsStatus) ){
    dcs = false;
    return;
  }
  
  if ( ! dcsStatus.isValid() ) 
  {
    edm::LogWarning("RPCDcsInfo") << "scalersRawToDigi not found" ;
    dcs = false; // info not available: set to false
    return;
  }
    

  for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin(); 
                            dcsStatusItr != dcsStatus->end(); ++dcsStatusItr)   {

      if (!dcsStatusItr->ready(DcsStatus::RPC)) dcs=false;
      
  }
      
  return ;
}

Member Data Documentation

Definition at line 35 of file RPCDcsInfo.h.

Referenced by beginRun(), and RPCDcsInfo().

bool RPCDcsInfo::dcs [private]

Definition at line 41 of file RPCDcsInfo.h.

Referenced by beginRun(), endLuminosityBlock(), makeDcsInfo(), and RPCDcsInfo().

Definition at line 43 of file RPCDcsInfo.h.

Referenced by beginRun(), and endLuminosityBlock().

std::string RPCDcsInfo::dcsinfofolder_ [private]

Definition at line 39 of file RPCDcsInfo.h.

Referenced by beginRun(), and RPCDcsInfo().

Definition at line 37 of file RPCDcsInfo.h.

std::string RPCDcsInfo::scalersRawToDigiLabel_ [private]

Definition at line 36 of file RPCDcsInfo.h.

Referenced by RPCDcsInfo().

std::string RPCDcsInfo::subsystemname_ [private]

Definition at line 38 of file RPCDcsInfo.h.

Referenced by beginRun(), and RPCDcsInfo().