CMS 3D CMS Logo

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

#include <HcalOnlineHarvesting.h>

Inheritance diagram for HcalOnlineHarvesting:
hcaldqm::DQHarvester DQMEDHarvester hcaldqm::DQModule edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 HcalOnlineHarvesting (edm::ParameterSet const &)
 
virtual ~HcalOnlineHarvesting ()
 
- Public Member Functions inherited from hcaldqm::DQHarvester
 DQHarvester (edm::ParameterSet const &)
 
virtual void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual ~DQHarvester ()
 
- 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
 
 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 ()
 
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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &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 ()
 
- Public Member Functions inherited from hcaldqm::DQModule
 DQModule (edm::ParameterSet const &)
 
virtual ~DQModule ()
 

Public Attributes

tuple hcalOnlineHarvesting
 

Protected Types

enum  Summary {
  fRaw =0, fDigi =1, fReco =2, fTP =3,
  fPedestal =4, nSummary =5
}
 

Protected Member Functions

virtual void _dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)
 
virtual void _dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup 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)
 

Protected Attributes

MonitorElement_me
 
MonitorElement_reportSummaryMap
 
std::vector< ContainerSingle2D_vcSummaryvsLS
 
std::vector< bool > _vmarks
 
std::vector< std::string > _vnames
 
std::vector< DQClient * > _vsumgen
 
- Protected Attributes inherited from hcaldqm::DQHarvester
HcalElectronicsMap const * _emap
 
int _totalLS
 
std::vector< uint32_t > _vcdaqEids
 
std::vector< int > _vFEDs
 
std::vector< uint32_t > _vhashFEDs
 
ContainerXXX< uint32_t > _xQuality
 
- Protected Attributes inherited from hcaldqm::DQModule
int _currentLS
 
int _debug
 
int _evsPerLS
 
int _evsTotal
 
Logger _logger
 
int _maxLS
 
ModuleType _mtype
 
std::string _name
 
ProcessingType _ptype
 
std::string _runkeyName
 
int _runkeyVal
 
std::string _subsystem
 

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 49 of file HcalOnlineHarvesting.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

HcalOnlineHarvesting::HcalOnlineHarvesting ( edm::ParameterSet const &  ps)

Definition at line 3 of file HcalOnlineHarvesting.cc.

References _vmarks, _vnames, _vsumgen, fDigi, fPedestal, fRaw, fReco, fTP, i, and nSummary.

3  :
5 {
6 
7  // NOTE: I will leave Run Summary Generators in place
8  // just not triggering on endJob!
9  _vsumgen.resize(nSummary);
10  _vnames.resize(nSummary);
11  _vmarks.resize(nSummary);
12  for (uint32_t i=0; i<_vmarks.size(); i++)
13  _vmarks[i]=false;
14  _vnames[fRaw]="RawTask";
15  _vnames[fDigi]="DigiTask";
16  _vnames[fReco]="RecHitTask";
17  _vnames[fTP]="TPTask";
18  _vnames[fPedestal]="PedestalTask";
19 
20  _vsumgen[fRaw] = new RawRunSummary("RawRunHarvesting",
21  _vnames[fRaw], ps);
22  _vsumgen[fDigi] = new DigiRunSummary("DigiRunHarvesting",
23  _vnames[fDigi],ps);
24  _vsumgen[fReco] = new RecoRunSummary("RecoRunHarvesting",
25  _vnames[fReco], ps);
26  _vsumgen[fTP] = new TPRunSummary("TPRunHarvesting",
27  _vnames[fTP], ps);
28  _vsumgen[fPedestal] = new PedestalRunSummary("PedestalRunHarvesting",
29  _vnames[fPedestal], ps);
30 }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > _vmarks
#define NULL
Definition: scimark2.h:8
std::vector< std::string > _vnames
MonitorElement * _reportSummaryMap
DQHarvester(edm::ParameterSet const &)
Definition: DQHarvester.cc:5
std::vector< DQClient * > _vsumgen
virtual HcalOnlineHarvesting::~HcalOnlineHarvesting ( )
inlinevirtual

Definition at line 53 of file HcalOnlineHarvesting.h.

53 {}

Member Function Documentation

void HcalOnlineHarvesting::_dqmEndJob ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
protectedvirtual

Implements hcaldqm::DQHarvester.

Definition at line 111 of file HcalOnlineHarvesting.cc.

113 {}
void HcalOnlineHarvesting::_dqmEndLuminosityBlock ( DQMStore::IBooker ib,
DQMStore::IGetter ig,
edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
protectedvirtual

Implements hcaldqm::DQHarvester.

Definition at line 41 of file HcalOnlineHarvesting.cc.

References hcaldqm::DQModule::_currentLS, hcaldqm::DQModule::_maxLS, _reportSummaryMap, hcaldqm::flag::Flag::_state, hcaldqm::DQModule::_subsystem, _vcSummaryvsLS, hcaldqm::DQHarvester::_vFEDs, hcaldqm::DQHarvester::_vhashFEDs, _vmarks, _vnames, hcaldqm::constants::BIT_AXIS_LS, hcaldqm::constants::BIT_OFFSET, DQMStore::IBooker::book2D(), fDigi, hcaldqm::flag::fNCDAQ, fPedestal, fRaw, fReco, hcaldqm::quantity::fState, fTP, DQMStore::IGetter::get(), MonitorElement::getTH1(), i, mergeVDriftHistosByStation::name, NULL, MonitorElement::setBinContent(), MonitorElement::setBinLabel(), DQMStore::IGetter::setCurrentFolder(), and x().

45 {
46  // DETERMINE WHICH MODULES ARE PRESENT IN DATA
47  if (ig.get(_subsystem+"/"+_vnames[fRaw]+"/EventsTotal")!=NULL)
48  _vmarks[fRaw]=true;
49  if (ig.get(_subsystem+"/"+_vnames[fDigi]+"/EventsTotal")!=NULL)
50  _vmarks[fDigi]=true;
51  if (ig.get(_subsystem+"/"+_vnames[fTP]+"/EventsTotal")!=NULL)
52  _vmarks[fTP]=true;
53  if (ig.get(_subsystem+"/"+_vnames[fReco]+"/EventsTotal")!=NULL)
54  _vmarks[fReco]=true;
55  if (ig.get(_subsystem+"/"+_vnames[fPedestal]+"/EventsTotal")!=NULL)
56  _vmarks[fPedestal]=true;
57 
58  // CREATE SUMMARY REPORT MAP FED vs LS and LOAD MODULE'S SUMMARIES
59  // NOTE: THIS STATEMENTS WILL BE EXECUTED ONLY ONCE!
60  if (!_reportSummaryMap)
61  {
62  ig.setCurrentFolder(_subsystem+"/EventInfo");
63  _reportSummaryMap = ib.book2D("reportSummaryMap", "reportSummaryMap",
64  _maxLS, 1, _maxLS+1, _vFEDs.size(), 0, _vFEDs.size());
65  for (uint32_t i=0; i<_vFEDs.size(); i++)
66  {
67  char name[5];
68  sprintf(name, "%d", _vFEDs[i]);
69  _reportSummaryMap->setBinLabel(i+1, name, 2);
70  }
71  // set LS bit to mark Xaxis as LS axis
73 
74  // INITIALIZE ALL THE MODULES
75  for (uint32_t i=0; i<_vnames.size(); i++)
77  "SummaryvsLS",
81 
82  // LOAD ONLY THOSE MODULES THAT ARE PRESENT IN DATA
83  for (uint32_t i=0; i<_vmarks.size(); i++)
84  {
85  if (_vmarks[i])
86  _vcSummaryvsLS[i].load(ig, _subsystem);
87  }
88  }
89 
90  int ifed=0;
91  for (std::vector<uint32_t>::const_iterator it=_vhashFEDs.begin();
92  it!=_vhashFEDs.end(); ++it)
93  {
94  HcalElectronicsId eid(*it);
95  flag::Flag fSum("Status", flag::fNCDAQ);
96  for (uint32_t im=0; im<_vmarks.size(); im++)
97  if (_vmarks[im])
98  {
99  int x = _vcSummaryvsLS[im].getBinContent(eid, _currentLS);
100  flag::Flag flag("Status", (flag::State)x);
101  fSum+=flag;
102  }
103  _reportSummaryMap->setBinContent(_currentLS, ifed+1, int(fSum._state));
104  ifed++;
105  }
106 }
std::vector< uint32_t > _vhashFEDs
Definition: DQHarvester.h:39
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< bool > _vmarks
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:304
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)
#define NULL
Definition: scimark2.h:8
std::vector< std::string > _vnames
MonitorElement * _reportSummaryMap
std::vector< ContainerSingle2D > _vcSummaryvsLS
TH1 * getTH1(void) const
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:346
std::string _subsystem
Definition: DQModule.h:64
int const BIT_OFFSET
Definition: Constants.h:224
int const BIT_AXIS_LS
Definition: Constants.h:228
std::vector< int > _vFEDs
Definition: DQHarvester.h:38
Readout chain identification for Hcal.
void HcalOnlineHarvesting::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
virtual

Reimplemented from hcaldqm::DQHarvester.

Definition at line 32 of file HcalOnlineHarvesting.cc.

References _vsumgen.

34 {
35  DQHarvester::beginRun(r,es);
36  for (std::vector<DQClient*>::const_iterator it=_vsumgen.begin();
37  it!=_vsumgen.end(); ++it)
38  (*it)->beginRun(r,es);
39 }
std::vector< DQClient * > _vsumgen

Member Data Documentation

MonitorElement* HcalOnlineHarvesting::_me
protected

Definition at line 81 of file HcalOnlineHarvesting.h.

MonitorElement* HcalOnlineHarvesting::_reportSummaryMap
protected

Definition at line 84 of file HcalOnlineHarvesting.h.

Referenced by _dqmEndLuminosityBlock().

std::vector<ContainerSingle2D> HcalOnlineHarvesting::_vcSummaryvsLS
protected

Definition at line 79 of file HcalOnlineHarvesting.h.

Referenced by _dqmEndLuminosityBlock().

std::vector<bool> HcalOnlineHarvesting::_vmarks
protected

Definition at line 74 of file HcalOnlineHarvesting.h.

Referenced by _dqmEndLuminosityBlock(), and HcalOnlineHarvesting().

std::vector<std::string> HcalOnlineHarvesting::_vnames
protected

Definition at line 76 of file HcalOnlineHarvesting.h.

Referenced by _dqmEndLuminosityBlock(), and HcalOnlineHarvesting().

std::vector<DQClient*> HcalOnlineHarvesting::_vsumgen
protected

Definition at line 75 of file HcalOnlineHarvesting.h.

Referenced by beginRun(), and HcalOnlineHarvesting().

tuple HcalOnlineHarvesting.hcalOnlineHarvesting
Initial value:
1 = cms.EDAnalyzer(
2  "HcalOnlineHarvesting",
3 
4  name = cms.untracked.string("HcalOnlineHarvesting"),
5  debug = cms.untracked.int32(0),
6  runkeyVal = cms.untracked.int32(0),
7  runkeyName = cms.untracked.string('pp_run'),
8  ptype = cms.untracked.int32(0),
9  mtype = cms.untracked.bool(True),
10  subsystem = cms.untracked.string("Hcal"),
11 )

Definition at line 3 of file HcalOnlineHarvesting.py.