CMS 3D CMS Logo

CommissioningHistograms.h
Go to the documentation of this file.
1 #ifndef DQM_SiStripCommissioningClients_CommissioningHistograms_H
2 #define DQM_SiStripCommissioningClients_CommissioningHistograms_H
3 
12 #include "TProfile.h"
13 #include "TH1.h"
14 #include <iostream>
15 #include <sstream>
16 #include <string>
17 #include <vector>
18 #include <map>
19 #include <cstdint>
20 
22 
24 public:
25  // not used here but some uses in derived classes
28  // ---------- con(de)structors ----------
29 
31 
32  // MAKE PRIVATE
33  CommissioningHistograms(); // private constructor
34 
35  virtual ~CommissioningHistograms();
36 
37  virtual void configure(const edm::ParameterSet&, const edm::EventSetup&) {}
38 
39  // ---------- histogram container class ----------
40 
41  class Histo {
42  public:
43  Histo(const std::string& title, MonitorElement* const me, MonitorElement* const cme)
44  : title_(title), me_(me), cme_(cme) {
45  ;
46  }
47  Histo() : title_(""), me_(nullptr), cme_(nullptr) { ; }
48  void print(std::stringstream&) const;
52  };
53 
54  // ---------- typedefs ----------
55 
56  typedef std::map<uint32_t, CommissioningAnalysis*> Analyses;
57 
58  typedef Analyses::iterator Analysis;
59 
61 
62  typedef std::vector<Histo*> Histos;
63 
64  typedef std::map<uint32_t, Histos> HistosMap;
65 
66  typedef std::map<uint32_t, uint32_t> FedToFecMap;
67 
68  // ---------- histogram "actions" ----------
69 
70  static uint32_t runNumber(DQMStore* const, const std::vector<std::string>&);
71 
72  static sistrip::RunType runType(DQMStore* const, const std::vector<std::string>&);
73 
75  static void copyCustomInformation(DQMStore* const, const std::vector<std::string>&);
76 
77  void extractHistograms(const std::vector<std::string>&);
78 
79  // DEPRECATE
80  void createCollations(const std::vector<std::string>&);
81 
82  virtual void histoAnalysis(bool debug);
83 
84  virtual void printAnalyses();
85 
86  virtual void printSummary();
87 
88  virtual void createSummaryHisto(const sistrip::Monitorable&,
89  const sistrip::Presentation&,
90  const std::string& top_level_dir,
91  const sistrip::Granularity&);
92 
93  void remove(std::string pattern = "");
94 
95  void save(std::string& filename, uint32_t run_number = 0, std::string partitionName = "");
96 
97  // ---------- protected methods ----------
98 
99 protected:
100  inline const sistrip::RunType& task() const;
101 
102  inline DQMStore* const bei() const;
103 
104  Analyses& data(bool getMaskedData = false);
105 
106  inline Factory* const factory();
107 
108  inline const HistosMap& histos() const;
109 
110  inline const FedToFecMap& mapping() const;
111 
112  inline const edm::ParameterSet& pset() const;
113 
114  TH1* histogram(const sistrip::Monitorable&,
115  const sistrip::Presentation&,
116  const sistrip::View&,
117  const std::string& directory,
118  const uint32_t& xbins,
119  const float& xlow = 1. * sistrip::invalid_,
120  const float& xhigh = 1. * sistrip::invalid_);
121 
122  void printHistosMap();
123 
124  void clearHistosMap();
125 
126  // ---------- private member data ----------
127 
128 protected:
129  std::unique_ptr<Factory> factory_;
130 
131 private:
133 
135 
137 
139 
141 
143 
144  bool mask_;
145  std::vector<uint32_t> fedMaskVector_;
146  std::vector<uint32_t> fecMaskVector_;
147  std::vector<uint32_t> ringVector_;
148  std::vector<uint32_t> ccuVector_;
149  std::vector<uint32_t> i2cChanVector_;
150  std::vector<uint32_t> lldChanVector_;
151 
154 };
155 
156 // ---------- inline methods ----------
157 
164 
165 #endif // DQM_SiStripCommissioningClients_CommissioningHistograms_H
sistrip::Granularity
Granularity
Definition: ConstantsForGranularity.h:60
CommissioningHistograms::task
const sistrip::RunType & task() const
Definition: CommissioningHistograms.h:158
CommissioningHistograms::Histo::Histo
Histo(const std::string &title, MonitorElement *const me, MonitorElement *const cme)
Definition: CommissioningHistograms.h:43
CommissioningHistograms::bei_
DQMStore * bei_
Definition: CommissioningHistograms.h:134
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
fw3dlego::xbins
const double xbins[]
Definition: fw3dlego_xbins.cc:16
CommissioningHistograms::createSummaryHisto
virtual void createSummaryHisto(const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &)
Definition: CommissioningHistograms.cc:559
CommissioningHistograms::Histo
Definition: CommissioningHistograms.h:41
sistrip::View
View
Definition: ConstantsForView.h:26
CommissioningHistograms::pset
const edm::ParameterSet & pset() const
Definition: CommissioningHistograms.h:163
CommissioningHistograms::bei
DQMStore *const bei() const
Definition: CommissioningHistograms.h:159
CommissioningHistograms::Histo::Histo
Histo()
Definition: CommissioningHistograms.h:47
CommissioningHistograms::remove
void remove(std::string pattern="")
Definition: CommissioningHistograms.cc:605
CommissioningHistograms::extractHistograms
void extractHistograms(const std::vector< std::string > &)
Definition: CommissioningHistograms.cc:297
CommissioningHistograms::ringVector_
std::vector< uint32_t > ringVector_
Definition: CommissioningHistograms.h:147
DQMStore.h
ExtractTObject.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
contentValuesCheck.run_number
run_number
Definition: contentValuesCheck.py:38
sistrip::RunType
RunType
Definition: ConstantsForRunType.h:70
CommissioningHistograms::printHistosMap
void printHistosMap()
Definition: CommissioningHistograms.cc:519
CommissioningHistograms::factory
Factory *const factory()
Definition: CommissioningHistograms.h:160
CommissioningHistograms::data
Analyses & data(bool getMaskedData=false)
Definition: CommissioningHistograms.cc:718
CommissioningHistograms::CommissioningHistograms
CommissioningHistograms()
Definition: CommissioningHistograms.cc:60
CommissioningHistograms::Histo::cme_
MonitorElement * cme_
Definition: CommissioningHistograms.h:51
sistrip::Monitorable
Monitorable
Definition: ConstantsForMonitorable.h:200
debug
#define debug
Definition: HDRShower.cc:19
CommissioningHistograms::HistosMap
std::map< uint32_t, Histos > HistosMap
Definition: CommissioningHistograms.h:64
dqm::legacy::DQMStore
Definition: DQMStore.h:727
CommissioningHistograms::runNumber
static uint32_t runNumber(DQMStore *const, const std::vector< std::string > &)
Definition: CommissioningHistograms.cc:94
CommissioningHistograms::FedToFecMap
std::map< uint32_t, uint32_t > FedToFecMap
Definition: CommissioningHistograms.h:66
sistrip::Presentation
Presentation
Definition: ConstantsForPresentation.h:28
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
CommissioningHistograms::factory_
std::unique_ptr< Factory > factory_
Definition: CommissioningHistograms.h:129
CommissioningHistograms::histogram
TH1 * histogram(const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &directory, const uint32_t &xbins, const float &xlow=1. *sistrip::invalid_, const float &xhigh=1. *sistrip::invalid_)
Definition: CommissioningHistograms.cc:656
CommissioningHistograms::ccuVector_
std::vector< uint32_t > ccuVector_
Definition: CommissioningHistograms.h:148
CommissioningHistograms::configure
virtual void configure(const edm::ParameterSet &, const edm::EventSetup &)
Definition: CommissioningHistograms.h:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CommissioningHistograms::Factory
SummaryPlotFactory< CommissioningAnalysis * > Factory
Definition: CommissioningHistograms.h:60
CommissioningHistograms::task_
sistrip::RunType task_
Definition: CommissioningHistograms.h:132
SiStripConstants.h
CommissioningHistograms::Histos
std::vector< Histo * > Histos
Definition: CommissioningHistograms.h:62
edm::ParameterSet
Definition: ParameterSet.h:47
CommissioningHistograms::Histo::me_
MonitorElement * me_
Definition: CommissioningHistograms.h:50
CommissioningHistograms::printSummary
virtual void printSummary()
Definition: CommissioningHistograms.cc:484
CommissioningHistograms::Histo::print
void print(std::stringstream &) const
Definition: CommissioningHistograms.cc:84
CommissioningHistograms::fedMaskVector_
std::vector< uint32_t > fedMaskVector_
Definition: CommissioningHistograms.h:145
FrameHeaderEvents_cfi.partitionName
partitionName
Definition: FrameHeaderEvents_cfi.py:5
CommissioningHistograms::mapping_
FedToFecMap mapping_
Definition: CommissioningHistograms.h:140
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
CommissioningHistograms::i2cChanVector_
std::vector< uint32_t > i2cChanVector_
Definition: CommissioningHistograms.h:149
edm::EventSetup
Definition: EventSetup.h:57
sistrip::invalid_
static const uint16_t invalid_
Definition: Constants.h:16
CommissioningHistograms
Definition: CommissioningHistograms.h:23
CommissioningHistograms::DQMStore
dqm::harvesting::DQMStore DQMStore
Definition: CommissioningHistograms.h:27
CommissioningHistograms::Histo::title_
std::string title_
Definition: CommissioningHistograms.h:49
SummaryPlotFactory< CommissioningAnalysis * >
Definition: CommissioningSummaryFactory.h:12
CommissioningAnalysis
Abstract base for derived classes that provide analysis of commissioning histograms.
Definition: CommissioningAnalysis.h:18
CommissioningHistograms::runType
static sistrip::RunType runType(DQMStore *const, const std::vector< std::string > &)
Definition: CommissioningHistograms.cc:161
CommissioningHistograms::mask_
bool mask_
Definition: CommissioningHistograms.h:144
CommissioningSummaryFactory.h
SiStripEnumsAndStrings.h
CommissioningHistograms::save
void save(std::string &filename, uint32_t run_number=0, std::string partitionName="")
Definition: CommissioningHistograms.cc:611
CommissioningHistograms::data_
Analyses data_
Definition: CommissioningHistograms.h:136
SiStripHistoTitle.h
createBeamHaloJobs.directory
string directory
Definition: createBeamHaloJobs.py:211
CommissioningHistograms::histos_
HistosMap histos_
Definition: CommissioningHistograms.h:138
CommissioningHistograms::pset_
edm::ParameterSet pset_
Definition: CommissioningHistograms.h:142
CommissioningHistograms::createCollations
void createCollations(const std::vector< std::string > &)
CommissioningHistograms::histos
const HistosMap & histos() const
Definition: CommissioningHistograms.h:161
CommissioningHistograms::lldChanVector_
std::vector< uint32_t > lldChanVector_
Definition: CommissioningHistograms.h:150
CommissioningHistograms::histoAnalysis
virtual void histoAnalysis(bool debug)
Definition: CommissioningHistograms.cc:459
EventSetup.h
CommissioningHistograms::~CommissioningHistograms
virtual ~CommissioningHistograms()
Definition: CommissioningHistograms.cc:75
CommissioningHistograms::dataWithMask_
Analyses dataWithMask_
Definition: CommissioningHistograms.h:152
CommissioningHistograms::MonitorElement
dqm::harvesting::MonitorElement MonitorElement
Definition: CommissioningHistograms.h:26
ParameterSet.h
CommissioningHistograms::mapping
const FedToFecMap & mapping() const
Definition: CommissioningHistograms.h:162
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
CommissioningHistograms::fecMaskVector_
std::vector< uint32_t > fecMaskVector_
Definition: CommissioningHistograms.h:146
CommissioningHistograms::Analysis
Analyses::iterator Analysis
Definition: CommissioningHistograms.h:58
CommissioningHistograms::clearHistosMap
void clearHistosMap()
Definition: CommissioningHistograms.cc:541
CommissioningHistograms::copyCustomInformation
static void copyCustomInformation(DQMStore *const, const std::vector< std::string > &)
Definition: CommissioningHistograms.cc:234
CommissioningHistograms::dataWithMaskCached_
bool dataWithMaskCached_
Definition: CommissioningHistograms.h:153
CommissioningHistograms::Analyses
std::map< uint32_t, CommissioningAnalysis * > Analyses
Definition: CommissioningHistograms.h:56
CommissioningHistograms::printAnalyses
virtual void printAnalyses()
Definition: CommissioningHistograms.cc:466