CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Friends
cscdqm::HistoDef Class Reference

Abstract Base Histogram Definition. More...

#include <CSCDQM_HistoDef.h>

Inheritance diagram for cscdqm::HistoDef:
cscdqm::CSCHistoDef cscdqm::DDUHistoDef cscdqm::EMUHistoDef cscdqm::FEDHistoDef cscdqm::ParHistoDef

Public Member Functions

virtual const HwId getAddId () const
 Get CSC Additional ID (used to store Layer, CLCT, ALCT and other identifiers. More...
 
virtual const HwId getCrateId () const
 Get CSC Crate ID. More...
 
virtual const HwId getDDUId () const
 Get DDU ID. More...
 
virtual const HwId getDMBId () const
 Get CSC DMB ID. More...
 
virtual const HwId getFEDId () const
 Get FED ID. More...
 
const std::string getFullPath () const
 Get full path of the histogram. It is being constructed by appending path and histogam name. More...
 
const HistoNamegetHistoName () const
 Get raw histogram name. More...
 
const HistoId getId () const
 Get Histogram ID. More...
 
virtual const std::string getName () const
 Get processed histogram name. It can include additional parameter in formated name. This Name is being constructed from raw name and additional parameter. More...
 
virtual const std::string getPath () const
 Get path part of the histogram (used only for DDUs and CSCs) More...
 
 HistoDef (const HistoId p_id)
 Base constructor. More...
 
const bool operator< (const HistoDef &t) const
 Less (<) operator. More...
 
const HistoDefoperator= (const HistoDef &t)
 Assignment (=) operator. More...
 
const bool operator== (const HistoDef &t) const
 Comparison (==) operator. More...
 
virtual const std::string processTitle (const std::string &p_title) const
 Process Title by Adding appropriate ID. More...
 
virtual ~HistoDef ()
 Base virtual destructor. More...
 

Static Public Member Functions

static const bool getHistoIdByName (const std::string &p_name, HistoId &p_id)
 Get Histogram ID by name. More...
 
static const std::string getHistoKeyById (const HistoId &p_id)
 Get Histogram key name by id. More...
 
static const std::string processName (const HistoName &p_name, const HwId p_id)
 Process name by applying ID to d pattern (pattern is stored in REGEXP_ONDEMAND) More...
 

Private Attributes

HistoId id
 

Friends

std::ostream & operator<< (std::ostream &out, const HistoDef &t)
 Printing (<<) operator that prints hisotgram full path. More...
 

Detailed Description

Abstract Base Histogram Definition.

Definition at line 62 of file CSCDQM_HistoDef.h.

Constructor & Destructor Documentation

◆ HistoDef()

cscdqm::HistoDef::HistoDef ( const HistoId  p_id)
inline

Base constructor.

Parameters
p_hnameRaw histogram name by HistoName
Returns

Definition at line 73 of file CSCDQM_HistoDef.h.

73 : id(p_id) {}

◆ ~HistoDef()

virtual cscdqm::HistoDef::~HistoDef ( )
inlinevirtual

Base virtual destructor.

Definition at line 78 of file CSCDQM_HistoDef.h.

78 {}

Member Function Documentation

◆ getAddId()

virtual const HwId cscdqm::HistoDef::getAddId ( ) const
inlinevirtual

Get CSC Additional ID (used to store Layer, CLCT, ALCT and other identifiers.

Returns
CSC Additional ID

Reimplemented in cscdqm::CSCHistoDef.

Definition at line 196 of file CSCDQM_HistoDef.h.

196 { return 0; }

Referenced by cscdqm::Dispatcher::getHisto(), operator<(), and operator==().

◆ getCrateId()

virtual const HwId cscdqm::HistoDef::getCrateId ( ) const
inlinevirtual

Get CSC Crate ID.

Returns
CSC Crate ID

Reimplemented in cscdqm::CSCHistoDef.

Definition at line 183 of file CSCDQM_HistoDef.h.

183 { return 0; }

Referenced by cscdqm::Dispatcher::getHisto(), operator<(), and operator==().

◆ getDDUId()

virtual const HwId cscdqm::HistoDef::getDDUId ( ) const
inlinevirtual

Get DDU ID.

Returns
DDU ID

Reimplemented in cscdqm::DDUHistoDef.

Definition at line 208 of file CSCDQM_HistoDef.h.

208 { return 0; }

Referenced by cscdqm::Dispatcher::getHisto(), operator<(), and operator==().

◆ getDMBId()

virtual const HwId cscdqm::HistoDef::getDMBId ( ) const
inlinevirtual

Get CSC DMB ID.

Returns
CSC DMB ID

Reimplemented in cscdqm::CSCHistoDef.

Definition at line 189 of file CSCDQM_HistoDef.h.

189 { return 0; }

Referenced by cscdqm::Dispatcher::getHisto(), operator<(), and operator==().

◆ getFEDId()

virtual const HwId cscdqm::HistoDef::getFEDId ( ) const
inlinevirtual

Get FED ID.

Returns
FED ID

Reimplemented in cscdqm::FEDHistoDef.

Definition at line 202 of file CSCDQM_HistoDef.h.

202 { return 0; }

Referenced by cscdqm::Dispatcher::getHisto(), operator<(), and operator==().

◆ getFullPath()

const std::string cscdqm::HistoDef::getFullPath ( ) const
inline

Get full path of the histogram. It is being constructed by appending path and histogam name.

Returns
full path name of the histogram (processed)

Definition at line 105 of file CSCDQM_HistoDef.h.

105  {
107  if (!path.empty())
108  path.append("/");
109  path.append(getName());
110  return path;
111  }

References getName(), getPath(), castor_dqm_sourceclient_file_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ getHistoIdByName()

static const bool cscdqm::HistoDef::getHistoIdByName ( const std::string &  p_name,
HistoId p_id 
)
inlinestatic

Get Histogram ID by name.

Parameters
p_nameHistogram name
p_idId to be filled in (return value)
Returns
true if ID was found, false - otherwise

Definition at line 223 of file CSCDQM_HistoDef.h.

223  {
224  for (HistoId i = 0; i < h::namesSize; i++) {
225  if (p_name == h::names[i]) {
226  p_id = i;
227  return true;
228  }
229  }
230  return false;
231  }

References mps_fire::i, and names.

Referenced by cscdqm::Collection::bookCSCHistos(), cscdqm::Collection::bookDDUHistos(), cscdqm::Collection::bookEMUHistos(), cscdqm::Collection::bookFEDHistos(), and CSCOfflineClient::dqmEndJob().

◆ getHistoKeyById()

static const std::string cscdqm::HistoDef::getHistoKeyById ( const HistoId p_id)
inlinestatic

Get Histogram key name by id.

Parameters
p_idHistogram id
Returns
Histogram key name

Definition at line 238 of file CSCDQM_HistoDef.h.

238 { return h::keys[p_id]; }

References relativeConstraints::keys.

◆ getHistoName()

const HistoName& cscdqm::HistoDef::getHistoName ( ) const
inline

Get raw histogram name.

Returns
Raw histogram name

Definition at line 90 of file CSCDQM_HistoDef.h.

90 { return h::names[id]; }

References id, and names.

Referenced by cscdqm::Dispatcher::getHisto(), getName(), cscdqm::CSCHistoDef::getName(), cscdqm::HistoBookRequest::HistoBookRequest(), and cscdqm::ParHistoDef::ParHistoDef().

◆ getId()

const HistoId cscdqm::HistoDef::getId ( ) const
inline

Get Histogram ID.

Returns
Histogram ID

Definition at line 84 of file CSCDQM_HistoDef.h.

84 { return id; }

References id.

Referenced by CSCOfflineClient::bookMonitorObject(), CSCMonitorModule::bookMonitorObject(), cscdqm::Dispatcher::getHisto(), operator<(), and operator==().

◆ getName()

virtual const std::string cscdqm::HistoDef::getName ( ) const
inlinevirtual

Get processed histogram name. It can include additional parameter in formated name. This Name is being constructed from raw name and additional parameter.

Returns
processed full name of the histogram

Reimplemented in cscdqm::CSCHistoDef.

Definition at line 98 of file CSCDQM_HistoDef.h.

98 { return getHistoName(); }

References getHistoName().

Referenced by CSCOfflineClient::bookMonitorObject(), CSCMonitorModule::bookMonitorObject(), plotting.Plot::draw(), and getFullPath().

◆ getPath()

virtual const std::string cscdqm::HistoDef::getPath ( ) const
inlinevirtual

Get path part of the histogram (used only for DDUs and CSCs)

Returns
path part of the histogram

Reimplemented in cscdqm::CSCHistoDef, cscdqm::DDUHistoDef, and cscdqm::FEDHistoDef.

Definition at line 177 of file CSCDQM_HistoDef.h.

177 { return ""; }

Referenced by CSCOfflineClient::bookMonitorObject(), CSCMonitorModule::bookMonitorObject(), getFullPath(), and cscdqm::LookupKeyType::LookupKeyType().

◆ operator<()

const bool cscdqm::HistoDef::operator< ( const HistoDef t) const
inline

Less (<) operator.

Parameters
tHistogram to be compared to
Returns
true if t is "more" than this

Definition at line 149 of file CSCDQM_HistoDef.h.

149  {
150  if (getId() < t.getId())
151  return true;
152  if (getFEDId() < t.getFEDId())
153  return true;
154  if (getDDUId() < t.getDDUId())
155  return true;
156  if (getCrateId() < t.getCrateId())
157  return true;
158  if (getDMBId() < t.getDMBId())
159  return true;
160  if (getAddId() < t.getAddId())
161  return true;
162  return false;
163  }

References getAddId(), getCrateId(), getDDUId(), getDMBId(), getFEDId(), getId(), and OrderedSet::t.

◆ operator=()

const HistoDef& cscdqm::HistoDef::operator= ( const HistoDef t)
inline

Assignment (=) operator.

Parameters
tHistogram to be taken data from
Returns
resulting histogram (this)

Definition at line 139 of file CSCDQM_HistoDef.h.

139  {
140  id = t.getId();
141  return *this;
142  }

References OrderedSet::t.

◆ operator==()

const bool cscdqm::HistoDef::operator== ( const HistoDef t) const
inline

Comparison (==) operator.

Parameters
tHistogram to be compared to
Returns
true if HistoDefs match, false - otherwise

Definition at line 118 of file CSCDQM_HistoDef.h.

118  {
119  if (getId() != t.getId())
120  return false;
121  if (getFEDId() != t.getFEDId())
122  return false;
123  if (getDDUId() != t.getDDUId())
124  return false;
125  if (getCrateId() != t.getCrateId())
126  return false;
127  if (getDMBId() != t.getDMBId())
128  return false;
129  if (getAddId() != t.getAddId())
130  return false;
131  return true;
132  }

References getAddId(), getCrateId(), getDDUId(), getDMBId(), getFEDId(), getId(), and OrderedSet::t.

◆ processName()

static const std::string cscdqm::HistoDef::processName ( const HistoName p_name,
const HwId  p_id 
)
inlinestatic

Process name by applying ID to d pattern (pattern is stored in REGEXP_ONDEMAND)

Parameters
p_nameString value to process
p_idID to include
Returns
processed value

Definition at line 246 of file CSCDQM_HistoDef.h.

246  {
247  if (Utility::regexMatch(REGEXP_ONDEMAND, p_name)) {
248  return Form(p_name.c_str(), p_id);
249  }
250  return p_name;
251  }

References cscdqm::Utility::regexMatch(), and cscdqm::REGEXP_ONDEMAND().

Referenced by cscdqm::CSCHistoDef::getName(), cscdqm::FEDHistoDef::processTitle(), cscdqm::DDUHistoDef::processTitle(), and cscdqm::CSCHistoDef::processTitle().

◆ processTitle()

virtual const std::string cscdqm::HistoDef::processTitle ( const std::string &  p_title) const
inlinevirtual

Process Title by Adding appropriate ID.

Parameters
p_titleTitle to process
Returns
processed title

Reimplemented in cscdqm::CSCHistoDef, cscdqm::DDUHistoDef, and cscdqm::FEDHistoDef.

Definition at line 215 of file CSCDQM_HistoDef.h.

215 { return p_title; }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const HistoDef t 
)
friend

Printing (<<) operator that prints hisotgram full path.

Parameters
outoutput stream
tHistogram type to be printed
Returns
output stream

Definition at line 171 of file CSCDQM_HistoDef.h.

171 { return out << t.getFullPath(); }

Member Data Documentation

◆ id

HistoId cscdqm::HistoDef::id
private

Histogram Id

Definition at line 65 of file CSCDQM_HistoDef.h.

Referenced by getHistoName(), and getId().

mps_fire.i
i
Definition: mps_fire.py:355
cscdqm::HistoId
unsigned int HistoId
Definition: CSCDQM_HistoDef.h:35
cscdqm::Utility::regexMatch
static bool regexMatch(const std::string &expression, const std::string &message)
Match RegExp expression string against string message and return result.
Definition: CSCDQM_Utility.cc:166
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
cscdqm::HistoDef::getAddId
virtual const HwId getAddId() const
Get CSC Additional ID (used to store Layer, CLCT, ALCT and other identifiers.
Definition: CSCDQM_HistoDef.h:196
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:122
OrderedSet.t
t
Definition: OrderedSet.py:90
cscdqm::HistoDef::getCrateId
virtual const HwId getCrateId() const
Get CSC Crate ID.
Definition: CSCDQM_HistoDef.h:183
cscdqm::HistoDef::getDDUId
virtual const HwId getDDUId() const
Get DDU ID.
Definition: CSCDQM_HistoDef.h:208
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cscdqm::REGEXP_ONDEMAND
static const TPRegexp REGEXP_ONDEMAND("^.*%d.*$")
cscdqm::HistoDef::getId
const HistoId getId() const
Get Histogram ID.
Definition: CSCDQM_HistoDef.h:84
cscdqm::HistoDef::getName
virtual const std::string getName() const
Get processed histogram name. It can include additional parameter in formated name....
Definition: CSCDQM_HistoDef.h:98
cscdqm::HistoDef::getHistoName
const HistoName & getHistoName() const
Get raw histogram name.
Definition: CSCDQM_HistoDef.h:90
cscdqm::HistoDef::getPath
virtual const std::string getPath() const
Get path part of the histogram (used only for DDUs and CSCs)
Definition: CSCDQM_HistoDef.h:177
cscdqm::HistoDef::getFEDId
virtual const HwId getFEDId() const
Get FED ID.
Definition: CSCDQM_HistoDef.h:202
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
cscdqm::HistoDef::id
HistoId id
Definition: CSCDQM_HistoDef.h:65
cscdqm::HistoDef::getDMBId
virtual const HwId getDMBId() const
Get CSC DMB ID.
Definition: CSCDQM_HistoDef.h:189