CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Base constructor.

Parameters
p_hnameRaw histogram name by HistoName
Returns

Definition at line 76 of file CSCDQM_HistoDef.h.

76 : id(p_id) { }
virtual cscdqm::HistoDef::~HistoDef ( )
inlinevirtual

Base virtual destructor.

Definition at line 81 of file CSCDQM_HistoDef.h.

81 { }

Member Function Documentation

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 188 of file CSCDQM_HistoDef.h.

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

188 { return 0; }
virtual const HwId cscdqm::HistoDef::getCrateId ( ) const
inlinevirtual

Get CSC Crate ID.

Returns
CSC Crate ID

Reimplemented in cscdqm::CSCHistoDef.

Definition at line 175 of file CSCDQM_HistoDef.h.

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

175 { return 0; }
virtual const HwId cscdqm::HistoDef::getDDUId ( ) const
inlinevirtual

Get DDU ID.

Returns
DDU ID

Reimplemented in cscdqm::DDUHistoDef.

Definition at line 200 of file CSCDQM_HistoDef.h.

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

200 { return 0; }
virtual const HwId cscdqm::HistoDef::getDMBId ( ) const
inlinevirtual

Get CSC DMB ID.

Returns
CSC DMB ID

Reimplemented in cscdqm::CSCHistoDef.

Definition at line 181 of file CSCDQM_HistoDef.h.

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

181 { return 0; }
virtual const HwId cscdqm::HistoDef::getFEDId ( ) const
inlinevirtual

Get FED ID.

Returns
FED ID

Reimplemented in cscdqm::FEDHistoDef.

Definition at line 194 of file CSCDQM_HistoDef.h.

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

194 { return 0; }
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 108 of file CSCDQM_HistoDef.h.

References getName(), getPath(), fed_dqm_sourceclient-live_cfg::path, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by cscdqm::Collection::book().

108  {
110  if (path.size() > 0) path.append("/");
111  path.append(getName());
112  return path;
113  }
virtual const std::string getPath() const
Get path part of the histogram (used only for DDUs and CSCs)
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.
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 217 of file CSCDQM_HistoDef.h.

References i, cscdqm::h::names, and cscdqm::h::namesSize.

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

217  {
218  for (HistoId i = 0; i < h::namesSize; i++) {
219  if (p_name.compare(h::names[i]) == 0) {
220  p_id = i;
221  return true;
222  }
223  }
224  return false;
225  }
int i
Definition: DBlmapReader.cc:9
static const HistoName names[]
static const unsigned int namesSize
unsigned int HistoId
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 232 of file CSCDQM_HistoDef.h.

References cscdqm::h::keys.

232  {
233  return h::keys[p_id];
234  }
static const HistoName keys[]
const HistoName& cscdqm::HistoDef::getHistoName ( ) const
inline

Get raw histogram name.

Returns
Raw histogram name

Definition at line 93 of file CSCDQM_HistoDef.h.

References id, and cscdqm::h::names.

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

93 { return h::names[id]; }
static const HistoName names[]
const HistoId cscdqm::HistoDef::getId ( ) const
inline
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 101 of file CSCDQM_HistoDef.h.

References getHistoName().

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

101 { return getHistoName(); }
const HistoName & getHistoName() const
Get raw histogram name.
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 169 of file CSCDQM_HistoDef.h.

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

169 { return ""; }
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 145 of file CSCDQM_HistoDef.h.

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

145  {
146  if (getId() < t.getId()) return true;
147  if (getFEDId() < t.getFEDId()) return true;
148  if (getDDUId() < t.getDDUId()) return true;
149  if (getCrateId() < t.getCrateId()) return true;
150  if (getDMBId() < t.getDMBId()) return true;
151  if (getAddId() < t.getAddId()) return true;
152  return false;
153  }
virtual const HwId getCrateId() const
Get CSC Crate ID.
virtual const HwId getDDUId() const
Get DDU ID.
const HistoId getId() const
Get Histogram ID.
virtual const HwId getDMBId() const
Get CSC DMB ID.
virtual const HwId getAddId() const
Get CSC Additional ID (used to store Layer, CLCT, ALCT and other identifiers.
virtual const HwId getFEDId() const
Get FED ID.
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 135 of file CSCDQM_HistoDef.h.

References getId().

135  {
136  id = t.getId();
137  return *this;
138  }
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 120 of file CSCDQM_HistoDef.h.

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

120  {
121  if (getId() != t.getId()) return false;
122  if (getFEDId() != t.getFEDId()) return false;
123  if (getDDUId() != t.getDDUId()) return false;
124  if (getCrateId() != t.getCrateId()) return false;
125  if (getDMBId() != t.getDMBId()) return false;
126  if (getAddId() != t.getAddId()) return false;
127  return true;
128  }
virtual const HwId getCrateId() const
Get CSC Crate ID.
virtual const HwId getDDUId() const
Get DDU ID.
const HistoId getId() const
Get Histogram ID.
virtual const HwId getDMBId() const
Get CSC DMB ID.
virtual const HwId getAddId() const
Get CSC Additional ID (used to store Layer, CLCT, ALCT and other identifiers.
virtual const HwId getFEDId() const
Get FED ID.
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 242 of file CSCDQM_HistoDef.h.

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

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

242  {
243  if (Utility::regexMatch(REGEXP_ONDEMAND, p_name)) {
244  return Form(p_name.c_str(), p_id);
245  }
246  return p_name;
247  }
static bool regexMatch(const std::string &expression, const std::string &message)
Match RegExp expression string against string message and return result.
static const TPRegexp REGEXP_ONDEMAND("^.*%d.*$")
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 207 of file CSCDQM_HistoDef.h.

Referenced by cscdqm::Collection::book().

207  {
208  return p_title;
209  }

Friends And Related Function Documentation

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 161 of file CSCDQM_HistoDef.h.

161  {
162  return out << t.getFullPath();
163  }
tuple out
Definition: dbtoconf.py:99

Member Data Documentation

HistoId cscdqm::HistoDef::id
private

Histogram Id

Definition at line 67 of file CSCDQM_HistoDef.h.

Referenced by getHistoName(), getId(), and NodeCut.MatchId::match().