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 Member Functions | Private Attributes
DQMDcsInfo Class Reference

#include <DQMDcsInfo.h>

Inheritance diagram for DQMDcsInfo:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 DQMDcsInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~DQMDcsInfo ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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)
 
void makeGtInfo (const edm::Event &e)
 

Private Attributes

DQMStoredbe_
 
bool dcs [25]
 
MonitorElementDCSbyLS_
 
std::string dcsinfofolder_
 
edm::ParameterSet parameters_
 
std::string subsystemname_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 24 of file DQMDcsInfo.h.

Constructor & Destructor Documentation

DQMDcsInfo::DQMDcsInfo ( const edm::ParameterSet ps)

Constructor.

Definition at line 21 of file DQMDcsInfo.cc.

References dbe_, dcs, dcsinfofolder_, edm::ParameterSet::getUntrackedParameter(), i, cppFunctionSkipper::operator, parameters_, AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

22 {
23 
24  parameters_ = ps;
25 
27 
28  subsystemname_ = parameters_.getUntrackedParameter<std::string>("subSystemFolder", "Info") ;
29  dcsinfofolder_ = parameters_.getUntrackedParameter<std::string>("dcsInfoFolder", "DcsInfo") ;
30 
31  // initialize
32  for (int i=0;i<25;i++) dcs[i]=true;
33 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
edm::ParameterSet parameters_
Definition: DQMDcsInfo.h:48
bool dcs[25]
Definition: DQMDcsInfo.h:52
std::string dcsinfofolder_
Definition: DQMDcsInfo.h:50
std::string subsystemname_
Definition: DQMDcsInfo.h:49
DQMStore * dbe_
Definition: DQMDcsInfo.h:46
DQMDcsInfo::~DQMDcsInfo ( )
virtual

Destructor.

Definition at line 35 of file DQMDcsInfo.cc.

35  {
36 }

Member Function Documentation

void DQMDcsInfo::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 59 of file DQMDcsInfo.cc.

References makeDcsInfo(), and makeGtInfo().

59  {
60 
61  makeDcsInfo(e);
62  makeGtInfo(e);
63 
64  return;
65 }
void makeDcsInfo(const edm::Event &e)
Definition: DQMDcsInfo.cc:89
void makeGtInfo(const edm::Event &e)
Definition: DQMDcsInfo.cc:139
void DQMDcsInfo::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 39 of file DQMDcsInfo.cc.

References DQMStore::book1D(), DQMStore::bookString(), DQMStore::cd(), dbe_, dcs, DCSbyLS_, dcsinfofolder_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), edm::getProcessParameterSet(), i, DQMStore::setCurrentFolder(), MonitorElement::setLumiFlag(), AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

39  {
40 
41  // Fetch GlobalTag information and fill the string/ME.
42  dbe_->cd();
43  dbe_->setCurrentFolder(subsystemname_ +"/CMSSWInfo/");
44  const edm::ParameterSet &globalTagPSet = edm::getProcessParameterSet()
45  .getParameterSet("PoolDBESSource@GlobalTag");
46 
47  dbe_->bookString("globalTag_Step1", globalTagPSet.getParameter<std::string>("globaltag"));
48 
49  dbe_->cd();
51 
52  DCSbyLS_=dbe_->book1D("DCSbyLS","DCS",25,0.,25.);
54 
55  // initialize
56  for (int i=0;i<25;i++) dcs[i]=true;
57 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:688
bool dcs[25]
Definition: DQMDcsInfo.h:52
ParameterSet const & getProcessParameterSet()
Definition: Registry.cc:34
ParameterSet const & getParameterSet(std::string const &) const
std::string dcsinfofolder_
Definition: DQMDcsInfo.h:50
std::string subsystemname_
Definition: DQMDcsInfo.h:49
MonitorElement * DCSbyLS_
Definition: DQMDcsInfo.h:54
DQMStore * dbe_
Definition: DQMDcsInfo.h:46
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void DQMDcsInfo::endLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 68 of file DQMDcsInfo.cc.

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

69 {
70  // int nlumi = l.id().luminosityBlock();
71 
72  // fill dcs vs lumi
73  /* set those bins 0 for which bits are ON
74  needed for merge off lumi histograms across files */
75  for (int i=0;i<25;i++)
76  {
77  if (dcs[i])
78  DCSbyLS_->setBinContent(i+1,0.);
79  else
80  DCSbyLS_->setBinContent(i+1,1.);
81 
82  dcs[i]=true;
83  }
84 
85  return;
86 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
bool dcs[25]
Definition: DQMDcsInfo.h:52
MonitorElement * DCSbyLS_
Definition: DQMDcsInfo.h:54
void DQMDcsInfo::makeDcsInfo ( const edm::Event e)
private

Definition at line 89 of file DQMDcsInfo.cc.

References DcsStatus::BPIX, DcsStatus::CASTOR, DcsStatus::CSCm, DcsStatus::CSCp, dcs, DcsStatus::DT0, DcsStatus::DTm, DcsStatus::DTp, DcsStatus::EBm, DcsStatus::EBp, DcsStatus::EEm, DcsStatus::EEp, DcsStatus::ESm, DcsStatus::ESp, DcsStatus::FPIX, edm::Event::getByLabel(), DcsStatus::HBHEa, DcsStatus::HBHEb, DcsStatus::HBHEc, DcsStatus::HF, DcsStatus::HO, i, edm::HandleBase::isValid(), hitfit::return, DcsStatus::RPC, DcsStatus::TECm, DcsStatus::TECp, DcsStatus::TIBTID, and DcsStatus::TOB.

Referenced by analyze().

90 {
91 
93  if ( ! e.getByLabel("scalersRawToDigi", dcsStatus) )
94  {
95  for (int i=0;i<24;i++) dcs[i]=false;
96  return;
97  }
98 
99  if ( ! dcsStatus.isValid() )
100  {
101  edm::LogWarning("DQMDcsInfo") << "scalersRawToDigi not found" ;
102  for (int i=0;i<24;i++) dcs[i]=false; // info not available: set to false
103  return;
104  }
105 
106  for (DcsStatusCollection::const_iterator dcsStatusItr = dcsStatus->begin();
107  dcsStatusItr != dcsStatus->end(); ++dcsStatusItr)
108  {
109  if (!dcsStatusItr->ready(DcsStatus::CSCp)) dcs[0]=false;
110  if (!dcsStatusItr->ready(DcsStatus::CSCm)) dcs[1]=false;
111  if (!dcsStatusItr->ready(DcsStatus::DT0)) dcs[2]=false;
112  if (!dcsStatusItr->ready(DcsStatus::DTp)) dcs[3]=false;
113  if (!dcsStatusItr->ready(DcsStatus::DTm)) dcs[4]=false;
114  if (!dcsStatusItr->ready(DcsStatus::EBp)) dcs[5]=false;
115  if (!dcsStatusItr->ready(DcsStatus::EBm)) dcs[6]=false;
116  if (!dcsStatusItr->ready(DcsStatus::EEp)) dcs[7]=false;
117  if (!dcsStatusItr->ready(DcsStatus::EEm)) dcs[8]=false;
118  if (!dcsStatusItr->ready(DcsStatus::ESp)) dcs[9]=false;
119  if (!dcsStatusItr->ready(DcsStatus::ESm)) dcs[10]=false;
120  if (!dcsStatusItr->ready(DcsStatus::HBHEa)) dcs[11]=false;
121  if (!dcsStatusItr->ready(DcsStatus::HBHEb)) dcs[12]=false;
122  if (!dcsStatusItr->ready(DcsStatus::HBHEc)) dcs[13]=false;
123  if (!dcsStatusItr->ready(DcsStatus::HF)) dcs[14]=false;
124  if (!dcsStatusItr->ready(DcsStatus::HO)) dcs[15]=false;
125  if (!dcsStatusItr->ready(DcsStatus::BPIX)) dcs[16]=false;
126  if (!dcsStatusItr->ready(DcsStatus::FPIX)) dcs[17]=false;
127  if (!dcsStatusItr->ready(DcsStatus::RPC)) dcs[18]=false;
128  if (!dcsStatusItr->ready(DcsStatus::TIBTID)) dcs[19]=false;
129  if (!dcsStatusItr->ready(DcsStatus::TOB)) dcs[20]=false;
130  if (!dcsStatusItr->ready(DcsStatus::TECp)) dcs[21]=false;
131  if (!dcsStatusItr->ready(DcsStatus::TECm)) dcs[22]=false;
132  if (!dcsStatusItr->ready(DcsStatus::CASTOR)) dcs[23]=false;
133  }
134 
135  return ;
136 }
int i
Definition: DBlmapReader.cc:9
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
bool dcs[25]
Definition: DQMDcsInfo.h:52
struct DcsStatusRaw_v4 dcsStatus
Definition: ScalersRaw.h:227
void DQMDcsInfo::makeGtInfo ( const edm::Event e)
private

Definition at line 139 of file DQMDcsInfo.cc.

References dcs, edm::Event::getByLabel(), L1GlobalTriggerReadoutRecord::gtFdlWord(), edm::HandleBase::isValid(), L1GtFdlWord::physicsDeclared(), and edm::Handle< T >::product().

Referenced by analyze().

140 {
141 
143  if ( ! e.getByLabel("gtDigis", gtrr_handle) )
144  {
145  dcs[24]=false; // info not available: set to false
146  return;
147  }
148 
149  if ( ! gtrr_handle.isValid() )
150  {
151  edm::LogWarning("DQMDcsInfo") << " gtDigis not found" ;
152  dcs[24]=false; // info not available: set to false
153  return;
154  }
155 
156  L1GlobalTriggerReadoutRecord const* gtrr = gtrr_handle.product();
157  L1GtFdlWord fdlWord ;
158  if (gtrr)
159  fdlWord = gtrr->gtFdlWord();
160  else
161  {
162  edm::LogWarning ("DQMDcsInfo") << " phys decl. bit not accessible !!!";
163  dcs[24]=false; // info not available: set to false
164  return;
165  }
166 
167  if (fdlWord.physicsDeclared() !=1) dcs[24]=false;
168 
169  return;
170 }
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
bool dcs[25]
Definition: DQMDcsInfo.h:52
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
const cms_uint16_t physicsDeclared() const
get/set &quot;physics declared&quot; bit
Definition: L1GtFdlWord.h:229
T const * product() const
Definition: Handle.h:74

Member Data Documentation

DQMStore* DQMDcsInfo::dbe_
private

Definition at line 46 of file DQMDcsInfo.h.

Referenced by beginRun(), and DQMDcsInfo().

bool DQMDcsInfo::dcs[25]
private

Definition at line 52 of file DQMDcsInfo.h.

Referenced by beginRun(), DQMDcsInfo(), endLuminosityBlock(), makeDcsInfo(), and makeGtInfo().

MonitorElement* DQMDcsInfo::DCSbyLS_
private

Definition at line 54 of file DQMDcsInfo.h.

Referenced by beginRun(), and endLuminosityBlock().

std::string DQMDcsInfo::dcsinfofolder_
private

Definition at line 50 of file DQMDcsInfo.h.

Referenced by beginRun(), and DQMDcsInfo().

edm::ParameterSet DQMDcsInfo::parameters_
private
std::string DQMDcsInfo::subsystemname_
private

Definition at line 49 of file DQMDcsInfo.h.

Referenced by beginRun(), and DQMDcsInfo().