CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
RPCDcsInfoClient Class Reference

#include <RPCDcsInfoClient.h>

Inheritance diagram for RPCDcsInfoClient:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 RPCDcsInfoClient (const edm::ParameterSet &ps)
 
 ~RPCDcsInfoClient ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::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
 
 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 & 
itemsToGetFromEvent () 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 beginJob () override
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) 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 Attributes

std::vector< int > DCS
 
std::string dcsinfofolder_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 9 of file RPCDcsInfoClient.h.

Constructor & Destructor Documentation

RPCDcsInfoClient::RPCDcsInfoClient ( const edm::ParameterSet ps)

Definition at line 4 of file RPCDcsInfoClient.cc.

References DCS, dcsinfofolder_, edm::ParameterSet::getUntrackedParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

4  {
5 
6  dcsinfofolder_ = ps.getUntrackedParameter<std::string>("dcsInfoFolder", "RPC/DCSInfo") ;
7 
8  DCS.clear();
9  DCS.resize(10); // start with 10 LS, resize later
10 
11 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > DCS
std::string dcsinfofolder_
RPCDcsInfoClient::~RPCDcsInfoClient ( )

Definition at line 14 of file RPCDcsInfoClient.cc.

14 {}

Member Function Documentation

void RPCDcsInfoClient::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 16 of file RPCDcsInfoClient.cc.

16 {}
void RPCDcsInfoClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 45 of file RPCDcsInfoClient.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::bookInt(), DQMStore::IBooker::cd(), DCS, dcsinfofolder_, MonitorElement::Fill(), i, MonitorElement::setAxisTitle(), MonitorElement::setBinContent(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

45  {
46 
47  // book
48  ibooker.cd();
50 
51  unsigned int nlsmax = DCS.size();
52  if (nlsmax > 900 ) nlsmax = 900;
53 
54  std::string meName = dcsinfofolder_ + "/rpcHVStatus";
55  MonitorElement* rpcHVStatus = ibooker.book2D("rpcHVStatus","RPC HV Status", nlsmax, 1., nlsmax+1, 1, 0.5, 1.5);
56  rpcHVStatus->setAxisTitle("Luminosity Section", 1);
57  rpcHVStatus->setBinLabel(1,"",2);
58 
59  int lsCounter = 0;
60  // fill
61  for (unsigned int i = 0 ; i < nlsmax ; i++ ) {
62  rpcHVStatus->setBinContent(i+1,1,DCS[i]);
63  lsCounter +=DCS[i];
64  }
65 
66  meName = dcsinfofolder_ + "/rpcHV";
67  MonitorElement* rpcHV = ibooker.bookInt("rpcHV");
68 
69  rpcHV ->Fill(lsCounter);
70 
71  return;
72 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
void cd(void)
Definition: DQMStore.cc:269
MonitorElement * bookInt(Args &&...args)
Definition: DQMStore.h:103
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::vector< int > DCS
void Fill(long long x)
std::string dcsinfofolder_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void RPCDcsInfoClient::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  l,
edm::EventSetup const &  c 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 18 of file RPCDcsInfoClient.cc.

References DCS, dcsinfofolder_, DQMStore::IGetter::get(), MonitorElement::getTH1F(), edm::LuminosityBlockBase::id(), and edm::LuminosityBlockID::luminosityBlock().

18  {
19 
20  unsigned int nlumi = l.id().luminosityBlock() ;
21 
22  if (nlumi+1 > DCS.size()) DCS.resize(nlumi+1);
23 
24 
25  MonitorElement* DCSbyLS_ = igetter.get(dcsinfofolder_ + "/DCSbyLS" );
26 
27  if ( !DCSbyLS_ ) return;
28 
29  if ( TH1F * h1 = DCSbyLS_->getTH1F()) {
30  int hvStatus = 0;
31 
32  if ( h1->GetBinContent(1) != 0 ) {
33  hvStatus = 0; // set to 0 because HV was off (!)
34  } else {
35  hvStatus = 1; // set to 1 because HV was on (!)
36  }
37 
38  DCS[nlumi] = hvStatus;
39  }
40 
41  return;
42 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
std::vector< int > DCS
std::string dcsinfofolder_
TH1F * getTH1F(void) const

Member Data Documentation

std::vector<int> RPCDcsInfoClient::DCS
private

Definition at line 26 of file RPCDcsInfoClient.h.

Referenced by dqmEndJob(), dqmEndLuminosityBlock(), and RPCDcsInfoClient().

std::string RPCDcsInfoClient::dcsinfofolder_
private

Definition at line 24 of file RPCDcsInfoClient.h.

Referenced by dqmEndJob(), dqmEndLuminosityBlock(), and RPCDcsInfoClient().