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:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 DQMDcsInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~DQMDcsInfo ()
 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
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) 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 bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

bool dcs [25]
 
MonitorElementDCSbyLS_
 
std::string dcsinfofolder_
 
edm::EDGetTokenT
< DcsStatusCollection
dcsStatusCollection_
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
gtCollection_
 
edm::ParameterSet parameters_
 
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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (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

Definition at line 26 of file DQMDcsInfo.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 18 of file DQMDcsInfo.cc.

References dcs, dcsinfofolder_, dcsStatusCollection_, edm::ParameterSet::getUntrackedParameter(), gtCollection_, i, parameters_, AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

19 {
20 
21  parameters_ = ps;
22 
23  subsystemname_ = parameters_.getUntrackedParameter<std::string>("subSystemFolder", "Info") ;
24  dcsinfofolder_ = parameters_.getUntrackedParameter<std::string>("dcsInfoFolder", "DcsInfo") ;
25  gtCollection_ = consumes<L1GlobalTriggerReadoutRecord>(parameters_.getUntrackedParameter<std::string>("gtCollection","gtDigis"));
26  dcsStatusCollection_ = consumes<DcsStatusCollection>(parameters_.getUntrackedParameter<std::string>("dcsStatusCollection","scalersRawToDigi"));
27 
28  // initialize
29  for (int i=0;i<25;i++) dcs[i]=true;
30 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtCollection_
Definition: DQMDcsInfo.h:51
edm::ParameterSet parameters_
Definition: DQMDcsInfo.h:48
bool dcs[25]
Definition: DQMDcsInfo.h:54
std::string dcsinfofolder_
Definition: DQMDcsInfo.h:50
std::string subsystemname_
Definition: DQMDcsInfo.h:49
edm::EDGetTokenT< DcsStatusCollection > dcsStatusCollection_
Definition: DQMDcsInfo.h:52
DQMDcsInfo::~DQMDcsInfo ( )
virtual

Destructor.

Definition at line 32 of file DQMDcsInfo.cc.

32  {
33 }

Member Function Documentation

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

Analyze.

Implements edm::stream::EDAnalyzerBase.

Definition at line 57 of file DQMDcsInfo.cc.

References makeDcsInfo(), and makeGtInfo().

57  {
58 
59  makeDcsInfo(e);
60  makeGtInfo(e);
61 
62  return;
63 }
void makeDcsInfo(const edm::Event &e)
Definition: DQMDcsInfo.cc:87
void makeGtInfo(const edm::Event &e)
Definition: DQMDcsInfo.cc:137
void DQMDcsInfo::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 35 of file DQMDcsInfo.cc.

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

37  {
38 
39  // Fetch GlobalTag information and fill the string/ME.
40  ibooker.cd();
41  ibooker.setCurrentFolder(subsystemname_ +"/CMSSWInfo/");
42  const edm::ParameterSet &globalTagPSet = edm::getProcessParameterSet()
43  .getParameterSet("PoolDBESSource@GlobalTag");
44 
45  ibooker.bookString("globalTag_Step1", globalTagPSet.getParameter<std::string>("globaltag"));
46 
47  ibooker.cd();
49 
50  DCSbyLS_ = ibooker.book1D("DCSbyLS","DCS",25,0.,25.);
52 
53  // initialize
54  for (int i=0;i<25;i++) dcs[i]=true;
55 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
void cd(void)
Definition: DQMStore.cc:258
MonitorElement * bookString(Args &&...args)
Definition: DQMStore.h:92
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:110
bool dcs[25]
Definition: DQMDcsInfo.h:54
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:266
ParameterSet const & getProcessParameterSet()
Definition: Registry.cc:82
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:56
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
void DQMDcsInfo::endLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 66 of file DQMDcsInfo.cc.

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

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

Definition at line 87 of file DQMDcsInfo.cc.

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

Referenced by analyze().

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

Definition at line 137 of file DQMDcsInfo.cc.

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

Referenced by analyze().

138 {
139 
141  if ( ! e.getByToken(gtCollection_, gtrr_handle) )
142  {
143  dcs[24]=false; // info not available: set to false
144  return;
145  }
146 
147  if ( ! gtrr_handle.isValid() )
148  {
149  edm::LogWarning("DQMDcsInfo") << " gtDigis not found" ;
150  dcs[24]=false; // info not available: set to false
151  return;
152  }
153 
154  L1GlobalTriggerReadoutRecord const* gtrr = gtrr_handle.product();
155  L1GtFdlWord fdlWord ;
156  if (gtrr)
157  fdlWord = gtrr->gtFdlWord();
158  else
159  {
160  edm::LogWarning ("DQMDcsInfo") << " phys decl. bit not accessible !!!";
161  dcs[24]=false; // info not available: set to false
162  return;
163  }
164 
165  if (fdlWord.physicsDeclared() !=1) dcs[24]=false;
166 
167  return;
168 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
bool isValid() const
Definition: HandleBase.h:76
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtCollection_
Definition: DQMDcsInfo.h:51
bool dcs[25]
Definition: DQMDcsInfo.h:54
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:227
T const * product() const
Definition: Handle.h:81

Member Data Documentation

bool DQMDcsInfo::dcs[25]
private

Definition at line 54 of file DQMDcsInfo.h.

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

MonitorElement* DQMDcsInfo::DCSbyLS_
private

Definition at line 56 of file DQMDcsInfo.h.

Referenced by bookHistograms(), and endLuminosityBlock().

std::string DQMDcsInfo::dcsinfofolder_
private

Definition at line 50 of file DQMDcsInfo.h.

Referenced by bookHistograms(), and DQMDcsInfo().

edm::EDGetTokenT<DcsStatusCollection> DQMDcsInfo::dcsStatusCollection_
private

Definition at line 52 of file DQMDcsInfo.h.

Referenced by DQMDcsInfo(), and makeDcsInfo().

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> DQMDcsInfo::gtCollection_
private

Definition at line 51 of file DQMDcsInfo.h.

Referenced by DQMDcsInfo(), and makeGtInfo().

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

Definition at line 49 of file DQMDcsInfo.h.

Referenced by bookHistograms(), and DQMDcsInfo().