CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes
FedCablingHistograms Class Reference

#include <FedCablingHistograms.h>

Inheritance diagram for FedCablingHistograms:
CommissioningHistograms

Public Types

typedef std::map< uint32_t, FedCablingAnalysis * > Analyses
 
typedef SummaryPlotFactory< FedCablingAnalysis * > Factory
 
- Public Types inherited from CommissioningHistograms
typedef std::map< uint32_t, CommissioningAnalysis * > Analyses
 
typedef Analyses::iterator Analysis
 
typedef dqm::harvesting::DQMStore DQMStore
 
typedef SummaryPlotFactory< CommissioningAnalysis * > Factory
 
typedef std::map< uint32_t, uint32_t > FedToFecMap
 
typedef std::vector< Histo * > Histos
 
typedef std::map< uint32_t, HistosHistosMap
 
typedef dqm::harvesting::MonitorElement MonitorElement
 

Public Member Functions

void createSummaryHisto (const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &) override
 
 FedCablingHistograms (const edm::ParameterSet &pset, DQMStore *)
 
void histoAnalysis (bool debug) override
 
void printAnalyses () override
 
 ~FedCablingHistograms () override
 
- Public Member Functions inherited from CommissioningHistograms
 CommissioningHistograms ()
 
 CommissioningHistograms (const edm::ParameterSet &pset, DQMStore *const, const sistrip::RunType &)
 
virtual void configure (const edm::ParameterSet &, const edm::EventSetup &)
 
void createCollations (const std::vector< std::string > &)
 
void extractHistograms (const std::vector< std::string > &)
 
virtual void printSummary ()
 
void remove (std::string pattern="")
 
void save (std::string &filename, uint32_t run_number=0, std::string partitionName="")
 
virtual ~CommissioningHistograms ()
 

Protected Attributes

Analyses data_
 
std::unique_ptr< Factoryfactory_
 
- Protected Attributes inherited from CommissioningHistograms
std::unique_ptr< Factoryfactory_
 

Additional Inherited Members

- Static Public Member Functions inherited from CommissioningHistograms
static void copyCustomInformation (DQMStore *const, const std::vector< std::string > &)
 
static uint32_t runNumber (DQMStore *const, const std::vector< std::string > &)
 
static sistrip::RunType runType (DQMStore *const, const std::vector< std::string > &)
 
- Protected Member Functions inherited from CommissioningHistograms
DQMStore *const bei () const
 
void clearHistosMap ()
 
Analysesdata (bool getMaskedData=false)
 
Factory *const factory ()
 
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_)
 
const HistosMaphistos () const
 
const FedToFecMapmapping () const
 
void printHistosMap ()
 
const edm::ParameterSetpset () const
 
const sistrip::RunTypetask () const
 

Detailed Description

Definition at line 9 of file FedCablingHistograms.h.

Member Typedef Documentation

◆ Analyses

typedef std::map<uint32_t, FedCablingAnalysis*> FedCablingHistograms::Analyses

Definition at line 15 of file FedCablingHistograms.h.

◆ Factory

Definition at line 14 of file FedCablingHistograms.h.

Constructor & Destructor Documentation

◆ FedCablingHistograms()

FedCablingHistograms::FedCablingHistograms ( const edm::ParameterSet pset,
DQMStore bei 
)

Definition at line 19 of file FedCablingHistograms.cc.

21  factory_(new Factory) {
22  LogTrace(mlDqmClient_) << "[FedCablingHistograms::" << __func__ << "]"
23  << " Constructing object...";
24 }

References LogTrace, and sistrip::mlDqmClient_.

◆ ~FedCablingHistograms()

FedCablingHistograms::~FedCablingHistograms ( )
override

Definition at line 28 of file FedCablingHistograms.cc.

28  {
29  LogTrace(mlDqmClient_) << "[FedCablingHistograms::" << __func__ << "]"
30  << " Destructing object...";
31 }

References LogTrace, and sistrip::mlDqmClient_.

Member Function Documentation

◆ createSummaryHisto()

void FedCablingHistograms::createSummaryHisto ( const sistrip::Monitorable histo,
const sistrip::Presentation type,
const std::string &  top_level_dir,
const sistrip::Granularity gran 
)
overridevirtual

Reimplemented from CommissioningHistograms.

Definition at line 109 of file FedCablingHistograms.cc.

112  {
113  LogTrace(mlDqmClient_) << "[FedCablingHistograms::" << __func__ << "]";
114 
115  // Check view
117  if (view == sistrip::UNKNOWN_VIEW) {
118  return;
119  }
120 
121  // Analyze histograms if not done already
122  if (data_.empty()) {
123  histoAnalysis(false);
124  }
125 
126  // Extract data to be histogrammed
127  uint32_t xbins = factory_->init(histo, type, view, dir, gran, data_);
128 
129  // Create summary histogram (if it doesn't already exist)
130  TH1* summary = histogram(histo, type, view, dir, xbins);
131 
132  // Fill histogram with data
133  factory_->fill(*summary);
134 }

References data_, DeadROC_duringRun::dir, factory_, timingPdfMaker::histo, histoAnalysis(), CommissioningHistograms::histogram(), LogTrace, sistrip::mlDqmClient_, edmLumisInFiles::summary, sistrip::UNKNOWN_VIEW, SiStripEnumsAndStrings::view(), and fw3dlego::xbins.

◆ histoAnalysis()

void FedCablingHistograms::histoAnalysis ( bool  debug)
overridevirtual

Reimplemented from CommissioningHistograms.

Definition at line 35 of file FedCablingHistograms.cc.

35  {
36  LogTrace(mlDqmClient_) << "[FedCablingHistograms::" << __func__ << "]";
37 
38  uint16_t valid = 0;
39  HistosMap::const_iterator iter;
40  Analyses::iterator ianal;
41 
42  // Clear map holding analysis objects
43  for (ianal = data_.begin(); ianal != data_.end(); ianal++) {
44  if (ianal->second) {
45  delete ianal->second;
46  }
47  }
48  data_.clear();
49 
50  // Iterate through map containing histograms
51  for (iter = histos().begin(); iter != histos().end(); iter++) {
52  // Check vector of histos is not empty
53  if (iter->second.empty()) {
54  edm::LogWarning(mlDqmClient_) << "[FedCablingHistograms::" << __func__ << "]"
55  << " Zero histograms found!";
56  continue;
57  }
58 
59  // Retrieve pointers to histos
60  std::vector<TH1*> profs;
61  Histos::const_iterator ihis = iter->second.begin();
62  for (; ihis != iter->second.end(); ihis++) {
63  TProfile* prof = ExtractTObject<TProfile>().extract((*ihis)->me_);
64  if (prof) {
65  profs.push_back(prof);
66  }
67  }
68 
69  // Perform histo analysis
70  FedCablingAnalysis* anal = new FedCablingAnalysis(iter->first);
71  FedCablingAlgorithm algo(this->pset(), anal);
72  algo.analysis(profs);
73  data_[iter->first] = anal;
74  if (anal->isValid()) {
75  valid++;
76  }
77  }
78 
79  if (!histos().empty()) {
80  edm::LogVerbatim(mlDqmClient_) << "[FedCablingHistograms::" << __func__ << "]"
81  << " Analyzed histograms for " << histos().size() << " FED channels, of which "
82  << valid << " (" << 100 * valid / histos().size() << "%) are valid.";
83  } else {
84  edm::LogWarning(mlDqmClient_) << "[FedCablingHistograms::" << __func__ << "]"
85  << " No histograms to analyze!";
86  }
87 }

References conversion_template_cfg::anal, data_, ExtractTObject< T >::extract(), CommissioningHistograms::histos(), LogTrace, sistrip::mlDqmClient_, CommissioningHistograms::pset(), and RunInfoPI::valid.

Referenced by createSummaryHisto().

◆ printAnalyses()

void FedCablingHistograms::printAnalyses ( )
overridevirtual

Reimplemented from CommissioningHistograms.

Definition at line 91 of file FedCablingHistograms.cc.

91  {
92  Analyses::iterator ianal = data_.begin();
93  Analyses::iterator janal = data_.end();
94  for (; ianal != janal; ++ianal) {
95  if (ianal->second) {
96  std::stringstream ss;
97  ianal->second->print(ss);
98  if (ianal->second->isValid()) {
99  LogTrace(mlDqmClient_) << ss.str();
100  } else {
101  edm::LogWarning(mlDqmClient_) << ss.str();
102  }
103  }
104  }
105 }

References data_, LogTrace, sistrip::mlDqmClient_, and contentValuesCheck::ss.

Member Data Documentation

◆ data_

Analyses FedCablingHistograms::data_
protected

Definition at line 30 of file FedCablingHistograms.h.

Referenced by createSummaryHisto(), histoAnalysis(), and printAnalyses().

◆ factory_

std::unique_ptr<Factory> FedCablingHistograms::factory_
protected

Definition at line 32 of file FedCablingHistograms.h.

Referenced by createSummaryHisto().

FedCablingAlgorithm
Histogram-based analysis for connection loop.
Definition: FedCablingAlgorithm.h:16
fw3dlego::xbins
const double xbins[]
Definition: fw3dlego_xbins.cc:16
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
FedCablingHistograms::factory_
std::unique_ptr< Factory > factory_
Definition: FedCablingHistograms.h:32
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
ExtractTObject
Definition: ExtractTObject.h:9
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
sistrip::mlDqmClient_
static const char mlDqmClient_[]
Definition: ConstantsForLogger.h:19
CommissioningHistograms::CommissioningHistograms
CommissioningHistograms()
Definition: CommissioningHistograms.cc:60
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
cmsdt::algo
algo
Definition: constants.h:164
sistrip::FED_CABLING
Definition: ConstantsForRunType.h:81
FedCablingHistograms::Factory
SummaryPlotFactory< FedCablingAnalysis * > Factory
Definition: FedCablingHistograms.h:14
FedCablingHistograms::histoAnalysis
void histoAnalysis(bool debug) override
Definition: FedCablingHistograms.cc:35
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
edm::ParameterSet
Definition: ParameterSet.h:47
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
SiStripEnumsAndStrings::view
static std::string view(const sistrip::View &)
Definition: SiStripEnumsAndStrings.cc:5
ExtractTObject::extract
static T * extract(MonitorElement *me)
Definition: ExtractTObject.cc:21
sistrip::UNKNOWN_VIEW
Definition: ConstantsForView.h:27
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
FedCablingHistograms::data_
Analyses data_
Definition: FedCablingHistograms.h:30
CommissioningHistograms::histos
const HistosMap & histos() const
Definition: CommissioningHistograms.h:161
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
conversion_template_cfg.anal
anal
Definition: conversion_template_cfg.py:16
FedCablingAnalysis
Histogram-based analysis for connection loop.
Definition: FedCablingAnalysis.h:16
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23