CMS 3D CMS Logo

cscdqm::HistoDef Class Reference

Abstract Base Histogram Definition. More...

#include <DQM/CSCMonitorModule/interface/CSCDQM_HistoDef.h>

Inheritance diagram for cscdqm::HistoDef:

cscdqm::CSCHistoDef cscdqm::DDUHistoDef cscdqm::EMUHistoDef cscdqm::ParHistoDef

List of all members.

Public Member Functions

virtual const HwId getAddId () const
 Get CSC Additional ID (used to store Layer, CLCT, ALCT and other identifiers.
virtual const HwId getCrateId () const
 Get CSC Crate ID.
virtual const HwId getDDUId () const
 Get DDU ID.
virtual const HwId getDMBId () const
 Get CSC DMB ID.
const std::string getFullPath () const
 Get full path of the histogram.
const HistoNamegetHistoName () const
 Get raw histogram name.
const HistoId getId () const
 Get Histogram ID.
virtual const std::string getName () const
 Get processed histogram name.
virtual const std::string getPath () const
 Get path part of the histogram (used only for DDUs and CSCs).
 HistoDef (const HistoId p_id)
 Base constructor.
const bool operator< (const HistoDef &t) const
 Less (<) operator.
const HistoDefoperator= (const HistoDef &t)
 Assignment (=) operator.
const bool operator== (const HistoDef &t) const
 Comparison (==) operator.
virtual const std::string processTitle (const std::string &p_title) const
 Process Title by Adding appropriate ID.

Static Public Member Functions

static const bool getHistoIdByName (const std::string &p_name, HistoId &p_id)
 Get Histogram ID by name.
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).

Private Attributes

HistoId id
 Histogram Id.

Friends

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


Detailed Description

Abstract Base Histogram Definition.

Definition at line 59 of file CSCDQM_HistoDef.h.


Constructor & Destructor Documentation

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

Base constructor.

Parameters:
p_hname Raw histogram name by HistoName
Returns:

Definition at line 73 of file CSCDQM_HistoDef.h.

00073 : id(p_id) { }


Member Function Documentation

virtual const HwId cscdqm::HistoDef::getAddId (  )  const [inline, virtual]

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

Returns:
CSC Additional ID

Reimplemented in cscdqm::CSCHistoDef.

Definition at line 178 of file CSCDQM_HistoDef.h.

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

00178 { return  0; }

virtual const HwId cscdqm::HistoDef::getCrateId (  )  const [inline, virtual]

Get CSC Crate ID.

Returns:
CSC Crate ID

Reimplemented in cscdqm::CSCHistoDef.

Definition at line 165 of file CSCDQM_HistoDef.h.

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

00165 { return  0; }

virtual const HwId cscdqm::HistoDef::getDDUId (  )  const [inline, virtual]

Get DDU ID.

Returns:
DDU ID

Reimplemented in cscdqm::DDUHistoDef.

Definition at line 184 of file CSCDQM_HistoDef.h.

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

00184 { return  0; }

virtual const HwId cscdqm::HistoDef::getDMBId (  )  const [inline, virtual]

Get CSC DMB ID.

Returns:
CSC DMB ID

Reimplemented in cscdqm::CSCHistoDef.

Definition at line 171 of file CSCDQM_HistoDef.h.

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

00171 { 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 100 of file CSCDQM_HistoDef.h.

References getName(), getPath(), and path().

00100                                           {
00101         std::string path(getPath());
00102         path.append("/");
00103         path.append(getName());
00104         return path;
00105       }

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

Get Histogram ID by name.

Parameters:
p_name Histogram name
p_id Id to be filled in (return value)
Returns:
true if ID was found, false - otherwise

Definition at line 201 of file CSCDQM_HistoDef.h.

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

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

00201                                                                                  {
00202         for (HistoId i = 0; i < h::namesSize; i++) {
00203           if (p_name.compare(h::names[i]) == 0) {
00204             p_id = i;
00205             return true;
00206           }
00207         }
00208         return false;
00209       }

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

Get raw histogram name.

Returns:
Raw histogram name

Reimplemented in cscdqm::ParHistoDef.

Definition at line 85 of file CSCDQM_HistoDef.h.

References id, and h::names.

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

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

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

Get Histogram ID.

Returns:
Histogram ID

Definition at line 79 of file CSCDQM_HistoDef.h.

References id.

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

00079 { return id; }

virtual const std::string cscdqm::HistoDef::getName (  )  const [inline, virtual]

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

References getHistoName().

Referenced by cscdqm::Collection::book(), and getFullPath().

00093 { return getHistoName(); }

virtual const std::string cscdqm::HistoDef::getPath (  )  const [inline, virtual]

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

Returns:
path part of the histogram

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

Definition at line 159 of file CSCDQM_HistoDef.h.

Referenced by getFullPath().

00159 { return ""; }

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

Less (<) operator.

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

Definition at line 136 of file CSCDQM_HistoDef.h.

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

00136                                                      {
00137         if (getId()      < t.getId())       return true; 
00138         if (getDDUId()   < t.getDDUId())    return true;
00139         if (getCrateId() < t.getCrateId())  return true;
00140         if (getDMBId()   < t.getDMBId())    return true;
00141         if (getAddId()   < t.getAddId())    return true;
00142         return false;
00143       }

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

Assignment (=) operator.

Parameters:
t Histogram to be taken data from
Returns:
resulting histogram (this)

Definition at line 126 of file CSCDQM_HistoDef.h.

References getId().

00126                                                     {
00127         id  = t.getId();
00128         return *this;
00129       }

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

Comparison (==) operator.

Parameters:
t Histogram to be compared to
Returns:
true if HistoDefs match, false - otherwise

Definition at line 112 of file CSCDQM_HistoDef.h.

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

00112                                                       {
00113         if (getId()      != t.getId())      return false;
00114         if (getDDUId()   != t.getDDUId())   return false;
00115         if (getCrateId() != t.getCrateId()) return false;
00116         if (getDMBId()   != t.getDMBId())   return false;
00117         if (getAddId()   != t.getAddId())   return false;
00118         return true;
00119       }

static const std::string cscdqm::HistoDef::processName ( const HistoName p_name,
const HwId  p_id 
) [inline, static]

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

Parameters:
p_name String value to process
p_id ID to include
Returns:
processed value

Definition at line 217 of file CSCDQM_HistoDef.h.

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

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

00217                                                                                    {
00218         if (Utility::regexMatch(REGEXP_ONDEMAND, p_name)) {
00219           return Form(p_name, p_id);
00220         }
00221         return p_name;
00222       }

virtual const std::string cscdqm::HistoDef::processTitle ( const std::string &  p_title  )  const [inline, virtual]

Process Title by Adding appropriate ID.

Parameters:
p_title Title to process
Returns:
processed title

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

Definition at line 191 of file CSCDQM_HistoDef.h.

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

00191                                                                            {
00192         return p_title;
00193       }


Friends And Related Function Documentation

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

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

Parameters:
out output stream
t Histogram type to be printed
Returns:
output stream

Definition at line 151 of file CSCDQM_HistoDef.h.

00151                                                                         {
00152         return out << t.getFullPath();
00153       }


Member Data Documentation

HistoId cscdqm::HistoDef::id [private]

Histogram Id.

Definition at line 64 of file CSCDQM_HistoDef.h.

Referenced by getHistoName(), and getId().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:36:57 2009 for CMSSW by  doxygen 1.5.4