CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SummaryPlot Class Reference

Class holding info that defines a summary plot. More...

#include <SummaryPlot.h>

Public Member Functions

const sistrip::Granularitygranularity () const
 
const bool & isValid () const
 
const std::string & level () const
 
const sistrip::Monitorablemonitorable () const
 
const sistrip::Presentationpresentation () const
 
void print (std::stringstream &) const
 
void reset ()
 
 SummaryPlot ()
 
 SummaryPlot (const std::string &monitorable, const std::string &presentation, const std::string &granularity, const std::string &level)
 
 SummaryPlot (const SummaryPlot &)
 
const sistrip::Viewview () const
 
 ~SummaryPlot ()
 

Private Member Functions

void check ()
 

Private Attributes

sistrip::Granularity gran_
 
bool isValid_
 
std::string level_
 
sistrip::Monitorable mon_
 
sistrip::Presentation pres_
 
sistrip::View view_
 

Detailed Description

Class holding info that defines a summary plot.

Author
R.Bainbridge, P.Kalavase

Definition at line 19 of file SummaryPlot.h.

Constructor & Destructor Documentation

◆ SummaryPlot() [1/3]

SummaryPlot::SummaryPlot ( const std::string &  monitorable,
const std::string &  presentation,
const std::string &  granularity,
const std::string &  level 
)

Definition at line 9 of file SummaryPlot.cc.

17  level_(""),
18  isValid_(false) {
19  // Extract enums from strings
23  level_ = level;
24 
25  // Extract view and perform checks
26  check();
27  isValid_ = true;
28 
29  // Checks on member data
31  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlot::" << __func__ << "]"
32  << " Unexpected monitorable \"" << SiStripEnumsAndStrings::monitorable(mon_)
33  << "\" based on input string \"" << monitorable << "\"";
34  isValid_ = false;
35  }
36 
38  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlot::" << __func__ << "]"
39  << " Unexpected presentation \"" << SiStripEnumsAndStrings::presentation(pres_)
40  << "\" based on input string \"" << presentation << "\"";
41  isValid_ = false;
42  }
43 
45  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlot::" << __func__ << "]"
46  << " Unexpected view \"" << SiStripEnumsAndStrings::view(level_)
47  << "\" based on input string \"" << level << "\"";
48  isValid_ = false;
49  }
50 
51  if (level_.empty() || level_.find(sistrip::unknownView_) != std::string::npos ||
52  level_.find(sistrip::undefinedView_) != std::string::npos) {
53  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlot::" << __func__ << "]"
54  << " Unexpected top-level directory: \"" << level_ << "\"";
55  isValid_ = false;
56  }
57 
59  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlot::" << __func__ << "]"
60  << " Unexpected granularity: \"" << SiStripEnumsAndStrings::granularity(gran_)
61  << "\" based on input string \"" << granularity << "\"";
62  isValid_ = false;
63  }
64 }

References check(), gran_, SiStripEnumsAndStrings::granularity(), granularity(), sistrip::HISTO_1D, isValid_, level(), level_, sistrip::mlSummaryPlots_, mon_, SiStripEnumsAndStrings::monitorable(), monitorable(), pres_, SiStripEnumsAndStrings::presentation(), sistrip::UNDEFINED_GRAN, sistrip::UNDEFINED_MONITORABLE, sistrip::UNDEFINED_PRESENTATION, sistrip::UNDEFINED_VIEW, sistrip::undefinedView_, sistrip::UNKNOWN_GRAN, sistrip::UNKNOWN_MONITORABLE, sistrip::UNKNOWN_PRESENTATION, sistrip::UNKNOWN_VIEW, sistrip::unknownView_, SiStripEnumsAndStrings::view(), and view_.

◆ SummaryPlot() [2/3]

SummaryPlot::SummaryPlot ( const SummaryPlot input)

Definition at line 68 of file SummaryPlot.cc.

69  : mon_(input.monitorable()),
70  pres_(input.presentation()),
71  view_(input.view()),
72  gran_(input.granularity()),
73  level_(input.level()),
74  isValid_(input.isValid()) {
75  ;
76 }

◆ SummaryPlot() [3/3]

SummaryPlot::SummaryPlot ( )

Definition at line 80 of file SummaryPlot.cc.

◆ ~SummaryPlot()

SummaryPlot::~SummaryPlot ( )
inline

Definition at line 36 of file SummaryPlot.h.

36 { ; }

Member Function Documentation

◆ check()

void SummaryPlot::check ( )
private

Definition at line 103 of file SummaryPlot.cc.

103  {
104  // Remove end "/" from level_ if it exists
105  if (!level_.empty()) {
106  std::string slash = level_.substr(level_.size() - 1, 1);
107  if (slash == sistrip::dir_) {
108  level_ = level_.substr(0, level_.size() - 1);
109  }
110  }
111 
112  // Extract and check view
114  view_ = check;
116  edm::LogWarning(mlSummaryPlots_) << "[SummaryPlot::" << __func__ << "]"
117  << " Unexpected view \"" << SiStripEnumsAndStrings::view(check) << "\"";
118  }
119 
120  // Prepend sistrip::root_ to level_ if not found
121  if (level_.find(sistrip::root_) == std::string::npos) {
122  if (check == sistrip::UNKNOWN_VIEW) {
124  } else if (check == sistrip::UNDEFINED_VIEW) {
126  } else {
128  }
129  }
130 }

References sistrip::dir_, level_, sistrip::mlSummaryPlots_, sistrip::root_, pickleFileParser::slash, AlCaHLTBitMon_QueryRunRegistry::string, sistrip::UNDEFINED_VIEW, sistrip::undefinedView_, sistrip::UNKNOWN_VIEW, sistrip::unknownView_, SiStripEnumsAndStrings::view(), and view_.

Referenced by SummaryPlot().

◆ granularity()

const sistrip::Granularity & SummaryPlot::granularity ( ) const
inline

Definition at line 92 of file SummaryPlot.h.

92 { return gran_; }

References gran_.

Referenced by SummaryPlot().

◆ isValid()

const bool & SummaryPlot::isValid ( void  ) const
inline

Definition at line 94 of file SummaryPlot.h.

94 { return isValid_; }

References isValid_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

◆ level()

const std::string & SummaryPlot::level ( ) const
inline

Definition at line 93 of file SummaryPlot.h.

93 { return level_; }

References level_.

Referenced by SummaryPlot().

◆ monitorable()

const sistrip::Monitorable & SummaryPlot::monitorable ( ) const
inline

Definition at line 89 of file SummaryPlot.h.

89 { return mon_; }

References mon_.

Referenced by SummaryPlot().

◆ presentation()

const sistrip::Presentation & SummaryPlot::presentation ( ) const
inline

Definition at line 90 of file SummaryPlot.h.

90 { return pres_; }

References pres_.

◆ print()

void SummaryPlot::print ( std::stringstream &  ss) const

Definition at line 134 of file SummaryPlot.cc.

134  {
135  ss << "[SummaryPlot::" << __func__ << "]" << std::endl
136  << " Monitorable: " << SiStripEnumsAndStrings::monitorable(mon_) << std::endl
137  << " Presentation: " << SiStripEnumsAndStrings::presentation(pres_) << std::endl
138  << " View: " << SiStripEnumsAndStrings::view(view_) << std::endl
139  << " TopLevelDir: " << level_ << std::endl
140  << " Granularity: " << SiStripEnumsAndStrings::granularity(gran_) << std::endl;
141 }

References gran_, SiStripEnumsAndStrings::granularity(), level_, mon_, SiStripEnumsAndStrings::monitorable(), pres_, SiStripEnumsAndStrings::presentation(), contentValuesCheck::ss, SiStripEnumsAndStrings::view(), and view_.

◆ reset()

void SummaryPlot::reset ( void  )

◆ view()

const sistrip::View & SummaryPlot::view ( ) const
inline

Definition at line 91 of file SummaryPlot.h.

91 { return view_; }

References view_.

Member Data Documentation

◆ gran_

sistrip::Granularity SummaryPlot::gran_
private

Definition at line 80 of file SummaryPlot.h.

Referenced by granularity(), print(), reset(), and SummaryPlot().

◆ isValid_

bool SummaryPlot::isValid_
private

Definition at line 84 of file SummaryPlot.h.

Referenced by isValid(), reset(), and SummaryPlot().

◆ level_

std::string SummaryPlot::level_
private

Definition at line 82 of file SummaryPlot.h.

Referenced by check(), level(), print(), reset(), and SummaryPlot().

◆ mon_

sistrip::Monitorable SummaryPlot::mon_
private

Definition at line 74 of file SummaryPlot.h.

Referenced by monitorable(), print(), reset(), and SummaryPlot().

◆ pres_

sistrip::Presentation SummaryPlot::pres_
private

Definition at line 76 of file SummaryPlot.h.

Referenced by presentation(), print(), reset(), and SummaryPlot().

◆ view_

sistrip::View SummaryPlot::view_
private

Definition at line 78 of file SummaryPlot.h.

Referenced by check(), print(), reset(), SummaryPlot(), and view().

sistrip::UNKNOWN_MONITORABLE
Definition: ConstantsForMonitorable.h:201
SummaryPlot::monitorable
const sistrip::Monitorable & monitorable() const
Definition: SummaryPlot.h:89
input
static const std::string input
Definition: EdmProvDump.cc:48
sistrip::View
View
Definition: ConstantsForView.h:26
sistrip::UNDEFINED_VIEW
Definition: ConstantsForView.h:28
SummaryPlot::view_
sistrip::View view_
Definition: SummaryPlot.h:78
sistrip::unknownView_
static const char unknownView_[]
Definition: ConstantsForView.h:17
SummaryPlot::level_
std::string level_
Definition: SummaryPlot.h:82
sistrip::dir_
static const char dir_[]
Definition: ConstantsForDqm.h:17
sistrip::UNDEFINED_PRESENTATION
Definition: ConstantsForPresentation.h:30
sistrip::undefinedView_
static const char undefinedView_[]
Definition: ConstantsForView.h:18
SummaryPlot::mon_
sistrip::Monitorable mon_
Definition: SummaryPlot.h:74
sistrip::UNKNOWN_GRAN
Definition: ConstantsForGranularity.h:62
SummaryPlot::check
void check()
Definition: SummaryPlot.cc:103
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SummaryPlot::granularity
const sistrip::Granularity & granularity() const
Definition: SummaryPlot.h:92
SiStripEnumsAndStrings::presentation
static std::string presentation(const sistrip::Presentation &)
Definition: SiStripEnumsAndStrings.cc:1237
SiStripEnumsAndStrings::granularity
static std::string granularity(const sistrip::Granularity &)
Definition: SiStripEnumsAndStrings.cc:265
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
sistrip::HISTO_1D
Definition: ConstantsForPresentation.h:31
presentation
Definition: presentation.py:1
SiStripEnumsAndStrings::view
static std::string view(const sistrip::View &)
Definition: SiStripEnumsAndStrings.cc:5
sistrip::root_
static const char root_[]
Definition: ConstantsForDqm.h:30
SiStripEnumsAndStrings::monitorable
static std::string monitorable(const sistrip::Monitorable &)
Definition: SiStripEnumsAndStrings.cc:547
SummaryPlot::gran_
sistrip::Granularity gran_
Definition: SummaryPlot.h:80
sistrip::UNKNOWN_VIEW
Definition: ConstantsForView.h:27
SummaryPlot::isValid_
bool isValid_
Definition: SummaryPlot.h:84
sistrip::UNDEFINED_MONITORABLE
Definition: ConstantsForMonitorable.h:202
pickleFileParser.slash
slash
Definition: pickleFileParser.py:12
SummaryPlot::level
const std::string & level() const
Definition: SummaryPlot.h:93
sistrip::mlSummaryPlots_
static const char mlSummaryPlots_[]
Definition: ConstantsForLogger.h:26
sistrip::UNKNOWN_PRESENTATION
Definition: ConstantsForPresentation.h:29
sistrip::UNDEFINED_GRAN
Definition: ConstantsForGranularity.h:61
SummaryPlot::pres_
sistrip::Presentation pres_
Definition: SummaryPlot.h:76