CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
RPCDcsInfo Class Reference

Data Format. More...

#include <RPCDcsInfo.h>

Inheritance diagram for RPCDcsInfo:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 RPCDcsInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~RPCDcsInfo ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 Analyze. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

void makeDcsInfo (const edm::Event &e)
 

Private Attributes

bool dcs
 
MonitorElementDCSbyLS_
 
std::string dcsinfofolder_
 
edm::ParameterSet parameters_
 
edm::EDGetTokenT< DcsStatusCollectionscalersRawToDigiLabel_
 
std::string subsystemname_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Data Format.

Definition at line 18 of file RPCDcsInfo.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 7 of file RPCDcsInfo.cc.

References dcsinfofolder_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), scalersRawToDigiLabel_, AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

7  {
8 
9 
10  subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "RPC") ;
11  dcsinfofolder_ = ps.getUntrackedParameter<std::string>("dcsInfoFolder", "DCSInfo") ;
12  scalersRawToDigiLabel_ = consumes<DcsStatusCollection>(ps.getParameter<edm::InputTag>("ScalersRawToDigiLabel"));
13 
14 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:44
std::string subsystemname_
Definition: RPCDcsInfo.h:43
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:49
RPCDcsInfo::~RPCDcsInfo ( )
virtual

Destructor.

Definition at line 16 of file RPCDcsInfo.cc.

16 {}

Member Function Documentation

void RPCDcsInfo::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Analyze.

Definition at line 35 of file RPCDcsInfo.cc.

References makeDcsInfo().

35  {
36 
37  makeDcsInfo(e);
38  return;
39 }
void makeDcsInfo(const edm::Event &e)
Definition: RPCDcsInfo.cc:57
void RPCDcsInfo::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 18 of file RPCDcsInfo.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::cd(), dcs, DCSbyLS_, dcsinfofolder_, DQMStore::IBooker::setCurrentFolder(), MonitorElement::setLumiFlag(), and subsystemname_.

20  {
21 
22  // Fetch GlobalTag information and fill the string/ME.
23  ibooker.cd();
25 
26  DCSbyLS_ = ibooker.book1D("DCSbyLS","DCS",1,0.5,1.5);
28 
29  // initialize
30  dcs=true;
31 
32 }
std::string dcsinfofolder_
Definition: RPCDcsInfo.h:44
void cd(void)
Definition: DQMStore.cc:269
std::string subsystemname_
Definition: RPCDcsInfo.h:43
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:48
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
bool dcs
Definition: RPCDcsInfo.h:46
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
void RPCDcsInfo::endLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
overrideprotected

Definition at line 41 of file RPCDcsInfo.cc.

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

41  {
42 
43  // int nlumi = l.id().luminosityBlock();
44 
45  // fill dcs vs lumi
46  /* set those bins 0 for which bits are ON
47  needed for merge off lumi histograms across files */
48  if (dcs) DCSbyLS_->setBinContent(1,0.);
49  else DCSbyLS_->setBinContent(1,1.);
50 
51  dcs = true;
52 
53  return;
54 }
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * DCSbyLS_
Definition: RPCDcsInfo.h:48
bool dcs
Definition: RPCDcsInfo.h:46
void RPCDcsInfo::makeDcsInfo ( const edm::Event e)
private

Definition at line 57 of file RPCDcsInfo.cc.

References dcs, edm::Event::getByToken(), edm::HandleBase::isValid(), reco::return(), DcsStatus::RPC, and scalersRawToDigiLabel_.

Referenced by analyze().

57  {
58 
60 
61  if ( ! e.getByToken(scalersRawToDigiLabel_, dcsStatus) ){
62  dcs = false;
63  return;
64  }
65 
66  if ( ! dcsStatus.isValid() )
67  {
68  edm::LogWarning("RPCDcsInfo") << "scalersRawToDigi not found" ;
69  dcs = false; // info not available: set to false
70  return;
71  }
72 
73 
74  for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin();
75  dcsStatusItr != dcsStatus->end(); ++dcsStatusItr) {
76 
77  if (!dcsStatusItr->ready(DcsStatus::RPC)) dcs=false;
78 
79  }
80 
81  return ;
82 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< DcsStatusCollection > scalersRawToDigiLabel_
Definition: RPCDcsInfo.h:49
bool dcs
Definition: RPCDcsInfo.h:46
return(e1-e2)*(e1-e2)+dp *dp

Member Data Documentation

bool RPCDcsInfo::dcs
private

Definition at line 46 of file RPCDcsInfo.h.

Referenced by bookHistograms(), endLuminosityBlock(), and makeDcsInfo().

MonitorElement* RPCDcsInfo::DCSbyLS_
private

Definition at line 48 of file RPCDcsInfo.h.

Referenced by bookHistograms(), and endLuminosityBlock().

std::string RPCDcsInfo::dcsinfofolder_
private

Definition at line 44 of file RPCDcsInfo.h.

Referenced by bookHistograms(), and RPCDcsInfo().

edm::ParameterSet RPCDcsInfo::parameters_
private
edm::EDGetTokenT<DcsStatusCollection> RPCDcsInfo::scalersRawToDigiLabel_
private

Definition at line 49 of file RPCDcsInfo.h.

Referenced by makeDcsInfo(), and RPCDcsInfo().

std::string RPCDcsInfo::subsystemname_
private

Definition at line 43 of file RPCDcsInfo.h.

Referenced by bookHistograms(), and RPCDcsInfo().