CMS 3D CMS Logo

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

#include <HcalLSbyLSMonitor.h>

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

Public Member Functions

void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void bookHistograms (DQMStore::IBooker &ib, const edm::Run &run, const edm::EventSetup &c)
 
void done ()
 
void endJob ()
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 
 HcalLSbyLSMonitor (const edm::ParameterSet &ps)
 
void periodicReset ()
 
void reset ()
 
void setup (DQMStore::IBooker &)
 
 ~HcalLSbyLSMonitor ()
 
- Public Member Functions inherited from HcalBaseDQMonitor
 HcalBaseDQMonitor (const edm::ParameterSet &ps)
 
 HcalBaseDQMonitor ()
 
virtual ~HcalBaseDQMonitor ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

int minEvents_
 
std::vector< std::string > TaskList_
 

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)
 
- Protected Member Functions inherited from HcalBaseDQMonitor
virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
 
virtual void cleanup (void)
 
virtual void dqmBeginRun (const edm::Run &run, const edm::EventSetup &c)
 
void getLogicalMap (const edm::EventSetup &c)
 
bool IsAllowedCalibType ()
 
bool LumiInOrder (int lumisec)
 
void SetupEtaPhiHists (DQMStore::IBooker &ib, EtaPhiHists &hh, std::string Name, std::string Units)
 
- 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)
 
- Protected Attributes inherited from HcalBaseDQMonitor
std::vector< int > AllowedCalibTypes_
 
int badChannelStatusMask_
 
int currentLS
 
int currenttype_
 
int debug_
 
bool enableCleanup_
 
bool eventAllowed_
 
bool HBpresent_
 
bool HEpresent_
 
bool HFpresent_
 
bool HOpresent_
 
int ievt_
 
std::map< unsigned int, int > KnownBadCells_
 
int levt_
 
HcalLogicalMaplogicalMap_
 
bool makeDiagnostics_
 
MonitorElementmeIevt_
 
MonitorElementmeLevt_
 
bool mergeRuns_
 
MonitorElementmeTevt_
 
MonitorElementmeTevtHist_
 
bool needLogicalMap_
 
int NLumiBlocks_
 
bool Online_
 
std::string prefixME_
 
MonitorElementProblemsCurrentLB
 
MonitorElementProblemsVsLB
 
MonitorElementProblemsVsLB_HB
 
MonitorElementProblemsVsLB_HBHEHF
 
MonitorElementProblemsVsLB_HE
 
MonitorElementProblemsVsLB_HF
 
MonitorElementProblemsVsLB_HO
 
bool skipOutOfOrderLS_
 
std::string subdir_
 
int tevt_
 

Detailed Description

Author
J. Temple - Univ. of Maryland

Definition at line 23 of file HcalLSbyLSMonitor.h.

Constructor & Destructor Documentation

HcalLSbyLSMonitor::HcalLSbyLSMonitor ( const edm::ParameterSet ps)

Definition at line 10 of file HcalLSbyLSMonitor.cc.

References HcalBaseDQMonitor::AllowedCalibTypes_, HcalBaseDQMonitor::debug_, HcalBaseDQMonitor::enableCleanup_, edm::ParameterSet::getUntrackedParameter(), HcalBaseDQMonitor::makeDiagnostics_, HcalBaseDQMonitor::mergeRuns_, minEvents_, HcalBaseDQMonitor::NLumiBlocks_, HcalBaseDQMonitor::Online_, HcalBaseDQMonitor::prefixME_, HcalBaseDQMonitor::skipOutOfOrderLS_, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, and TaskList_.

11 {
12  Online_ = ps.getUntrackedParameter<bool>("online",false);
13  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns",false);
14  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
15  debug_ = ps.getUntrackedParameter<int>("debug",0);
16  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
17  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
18  prefixME_.append("/");
19  subdir_ = ps.getUntrackedParameter<std::string>("TaskFolder","LSbyLSMonitor_Hcal");
20  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
21  subdir_.append("/");
22  subdir_=prefixME_+subdir_;
23  AllowedCalibTypes_ = ps.getUntrackedParameter<std::vector<int> > ("AllowedCalibTypes");
24  skipOutOfOrderLS_ = ps.getUntrackedParameter<bool>("skipOutOfOrderLS",true);
25  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",4000);
26  makeDiagnostics_ = ps.getUntrackedParameter<bool>("makeDiagnostics",false);
27 
28  // Specify the directories where the tasks to be check reside
29  TaskList_ = ps.getUntrackedParameter<std::vector<std::string> >("TaskDirectories");
30  // Minimum number of events per lumi section that must be present for checks to be made. *ALL* tasks must contain at least this many events
31  minEvents_ = ps.getUntrackedParameter<int>("minEvents",500);
32 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > TaskList_
std::vector< int > AllowedCalibTypes_
HcalLSbyLSMonitor::~HcalLSbyLSMonitor ( )

Definition at line 34 of file HcalLSbyLSMonitor.cc.

35 {
36 } //destructor

Member Function Documentation

void HcalLSbyLSMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 71 of file HcalLSbyLSMonitor.cc.

References HcalBaseDQMonitor::beginLuminosityBlock(), HcalBaseDQMonitor::LumiInOrder(), edm::LuminosityBlockBase::luminosityBlock(), HcalBaseDQMonitor::ProblemsCurrentLB, and MonitorElement::Reset().

73 {
74  if (LumiInOrder(lumiSeg.luminosityBlock())==false) return;
77  return;
78 } // beginLuminosityBlock(...)
bool LumiInOrder(int lumisec)
MonitorElement * ProblemsCurrentLB
LuminosityBlockNumber_t luminosityBlock() const
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void Reset(void)
reset ME (ie. contents, errors, etc)
void HcalLSbyLSMonitor::bookHistograms ( DQMStore::IBooker ib,
const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 52 of file HcalLSbyLSMonitor.cc.

References HcalBaseDQMonitor::bookHistograms(), gather_cfg::cout, HcalBaseDQMonitor::debug_, HcalBaseDQMonitor::mergeRuns_, reset(), setup(), and HcalBaseDQMonitor::tevt_.

53 {
54  if (debug_>1) std::cout <<"HcalLSbyLSMonitor::bookHistograms"<<std::endl;
56 
57  if (tevt_==0) this->setup(ib); // set up histograms if they have not been created before
58  if (mergeRuns_==false)
59  this->reset();
60 
61  return;
62 } //void HcalLSbyLSMonitor::bookHistograms(...)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
void setup(DQMStore::IBooker &)
tuple cout
Definition: gather_cfg.py:121
void HcalLSbyLSMonitor::done ( )

Definition at line 143 of file HcalLSbyLSMonitor.cc.

144 {
145  // moved database dumps to client; we want to be able to sum over results in offline
146  return;
147 
148 } // void HcalLSbyLSMonitor::done()
void HcalLSbyLSMonitor::endJob ( void  )

Definition at line 151 of file HcalLSbyLSMonitor.cc.

References HcalBaseDQMonitor::cleanup(), gather_cfg::cout, HcalBaseDQMonitor::debug_, and HcalBaseDQMonitor::enableCleanup_.

152 {
153  if (debug_>0) std::cout <<"HcalLSbyLSMonitor::endJob()"<<std::endl;
154  if (enableCleanup_) cleanup(); // when do we force cleanup?
155 }
virtual void cleanup(void)
tuple cout
Definition: gather_cfg.py:121
void HcalLSbyLSMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 80 of file HcalLSbyLSMonitor.cc.

82 {
83  /*// Processing should go here
84  bool enoughEvents=true;
85  int Nevents=0;
86  int TotalEvents=0;
87  int badHB=0;
88  int badHE=0;
89  int badHO=0;
90  int badHF=0;
91  int badHO0=0;
92  int badHO12=0;
93  int badHFLUMI=0;
94 
95  for (unsigned int i=0;i<TaskList_.size();++i)
96  {
97  std::string name=prefixME_+TaskList_[i]+"LSvalues/";
98  dbe_->setCurrentFolder(name.c_str());
99  // Do we need the 'name' prefix here?
100  MonitorElement *me=dbe_->get(name+"ProblemsThisLS");
101  if (me==0)
102  {
103  if (debug_>0) std::cout <<"<HcalLSbyLSMonitor> Error! Could not get histogram "<<name.c_str()<<std::endl;
104  enoughEvents=false;
105  break;
106  }
107 
108  Nevents=(int)me->getBinContent(-1);
109  if (Nevents<minEvents_)
110  {
111  if (debug_>0)
112  std::cout <<"<HcalLSbyLSMonitor> Error! Number of events "<<Nevents<<" for histogram "<<name.c_str()<<" is less than the required minimum of "<<minEvents_<<std::endl;
113  enoughEvents=false;
114  break;
115  }
116  // Total events is the number of events processed in this LS
117  TotalEvents=std::max(TotalEvents,Nevents);
118  // errors are sum over all tests. This WILL lead to double counting in some subdetectors!
119  badHB+=(int)me->getBinContent(1,1);
120  badHE+=(int)me->getBinContent(2,1);
121  badHO+=(int)me->getBinContent(3,1);
122  badHF+=(int)me->getBinContent(4,1);
123  badHO0+=(int)me->getBinContent(5,1);
124  badHO12+=(int)me->getBinContent(6,1);
125  badHFLUMI+=(int)me->getBinContent(7,1);
126  }
127  if (enoughEvents==false) // not enough events to make a decision
128  {
129  return;
130  }
131  ProblemsCurrentLB->setBinContent(-1,-1,TotalEvents);
132  ProblemsCurrentLB->setBinContent(1,1,badHB);
133  ProblemsCurrentLB->setBinContent(2,1,badHE);
134  ProblemsCurrentLB->setBinContent(3,1,badHO);
135  ProblemsCurrentLB->setBinContent(4,1,badHF);
136  ProblemsCurrentLB->setBinContent(5,1,badHO0);
137  ProblemsCurrentLB->setBinContent(6,1,badHO12);
138  ProblemsCurrentLB->setBinContent(7,1,badHFLUMI); */
139  return;
140 }
void HcalLSbyLSMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
)
inlinevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 32 of file HcalLSbyLSMonitor.h.

32 {};
void HcalLSbyLSMonitor::periodicReset ( )
inline

Definition at line 49 of file HcalLSbyLSMonitor.h.

49 {};
void HcalLSbyLSMonitor::reset ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 65 of file HcalLSbyLSMonitor.cc.

References HcalBaseDQMonitor::ProblemsCurrentLB, HcalBaseDQMonitor::reset(), and MonitorElement::Reset().

Referenced by bookHistograms(), and setup().

66 {
69 } // reset function is empty for now
MonitorElement * ProblemsCurrentLB
virtual void reset(void)
void Reset(void)
reset ME (ie. contents, errors, etc)
void HcalLSbyLSMonitor::setup ( DQMStore::IBooker ib)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 38 of file HcalLSbyLSMonitor.cc.

References gather_cfg::cout, HcalBaseDQMonitor::debug_, HcalBaseDQMonitor::ProblemsCurrentLB, reset(), DQMStore::IBooker::setCurrentFolder(), MonitorElement::setLumiFlag(), HcalBaseDQMonitor::setup(), and HcalBaseDQMonitor::subdir_.

Referenced by bookHistograms().

39 {
40  // Call base class setup
42 
43  if (debug_>1)
44  std::cout <<"<HcalLSbyLSMonitor::setup> Setting up histograms"<<std::endl;
45 
47  // This will cause this information to be kept for every lumi block
50  this->reset();
51 }
MonitorElement * ProblemsCurrentLB
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
tuple cout
Definition: gather_cfg.py:121
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
virtual void setup(DQMStore::IBooker &)

Member Data Documentation

int HcalLSbyLSMonitor::minEvents_
private

Definition at line 49 of file HcalLSbyLSMonitor.h.

Referenced by HcalLSbyLSMonitor().

std::vector<std::string> HcalLSbyLSMonitor::TaskList_
private

Definition at line 54 of file HcalLSbyLSMonitor.h.

Referenced by HcalLSbyLSMonitor().