CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
cscdqm::Cache Class Reference

MonitorObject cache - list objects and routines to manage cache. More...

#include <CSCDQM_Cache.h>

Public Member Functions

 Cache ()
 
const bool get (const HistoDef &histo, MonitorObject *&mo)
 Get Monitoring Object on Histogram Definition. More...
 
const bool getCSC (const HistoId &id, const HwId &crateId, const HwId &dmbId, const HwId &addId, MonitorObject *&mo)
 Get CSC MO on Histogram Id and CSC Crate and DMB Ids. More...
 
const bool getDDU (const HistoId &id, const HwId &dduId, MonitorObject *&mo)
 Get DDU MO on Histogram Id and DDU Id. More...
 
const bool getEMU (const HistoId &id, MonitorObject *&mo)
 Get EMU MO on Histogram Id. More...
 
const bool getFED (const HistoId &id, const HwId &fedId, MonitorObject *&mo)
 Get FED MO on Histogram Id and FED Id. More...
 
const bool getPar (const HistoId &id, MonitorObject *&mo)
 Get Parameter MO on Histogram Id. More...
 
const bool isBookedCSC (const HwId &crateId, const HwId &dmbId) const
 Check if CSC was booked on given identifiers. More...
 
const bool isBookedDDU (const HwId &dduId) const
 Check if DDU was booked on given identifier. More...
 
const bool isBookedFED (const HwId &fedId) const
 Check if FED was booked on given identifier. More...
 
const bool nextBookedCSC (unsigned int &n, unsigned int &crateId, unsigned int &dmbId) const
 Iterator to get booked CSC identifiers on enumerator. More...
 
const bool nextBookedDDU (unsigned int &n, unsigned int &dduId) const
 Iterator to get booked DDU identifier on enumerator. More...
 
const bool nextBookedFED (unsigned int &n, unsigned int &fedId) const
 Iterator to get booked FED identifier on enumerator. More...
 
void put (const HistoDef &histo, MonitorObject *mo)
 Put Monitoring Object into cache. More...
 
 ~Cache ()
 

Private Attributes

CSCMapType cscData
 
CSCMapType::const_iterator cscPointer
 
MonitorObjectdata [h::namesSize]
 
DDUMapType dduData
 
DDUMapType::const_iterator dduPointer
 
HwId dduPointerValue
 
FEDMapType fedData
 
FEDMapType::const_iterator fedPointer
 
HwId fedPointerValue
 
LookupMapType lookupData
 

Detailed Description

MonitorObject cache - list objects and routines to manage cache.

Definition at line 112 of file CSCDQM_Cache.h.

Constructor & Destructor Documentation

cscdqm::Cache::Cache ( )
inline

Cache Constructor

Initialize EMU and PAR static array with zero's

Initialize FED cached pointers

Initialize DDU and CSC cached pointers

Definition at line 145 of file CSCDQM_Cache.h.

cscdqm::Cache::~Cache ( )
inline

Destructor

Clear FED MO static arrays

Clear DDU MO static arrays

Definition at line 161 of file CSCDQM_Cache.h.

Member Function Documentation

const bool cscdqm::Cache::get ( const HistoDef histo,
MonitorObject *&  mo 
)

Get Monitoring Object on Histogram Definition.

Native Cache methods

Parameters
histoHistogram definition
moMonitoring Object to return
Returns
true if MO was found in cache and false otherwise

Definition at line 29 of file CSCDQM_Cache.cc.

Referenced by Options.Options::__getitem__().

const bool cscdqm::Cache::getCSC ( const HistoId id,
const HwId crateId,
const HwId dmbId,
const HwId addId,
MonitorObject *&  mo 
)

Get CSC MO on Histogram Id and CSC Crate and DMB Ids.

Parameters
idHistogram identifier
crateIdCSC Crate identifier
dmbIdCSC DMB identifier
moMonitoring Object to return
Returns
true if MO was found in cache and false otherwise

If not cached (last CSC) - find CSC

Get Monitor object from multi_index List

Definition at line 129 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::getDDU ( const HistoId id,
const HwId dduId,
MonitorObject *&  mo 
)

Get DDU MO on Histogram Id and DDU Id.

Parameters
idHistogram identifier
dduIdDDU identifier
moMonitoring Object to return
Returns
true if MO was found in cache and false otherwise

If not cached (last DDU) - find DDU

Get MO from static array

Definition at line 100 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::getEMU ( const HistoId id,
MonitorObject *&  mo 
)

Get EMU MO on Histogram Id.

Parameters
idHistogram identifier
moMonitoring Object to return
Returns
true if MO was found in cache and false otherwise

Definition at line 56 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::getFED ( const HistoId id,
const HwId fedId,
MonitorObject *&  mo 
)

Get FED MO on Histogram Id and FED Id.

Parameters
idHistogram identifier
fedIdFED identifier
moMonitoring Object to return
Returns
true if MO was found in cache and false otherwise

If not cached (last FED) - find FED

Get MO from static array

Definition at line 71 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::getPar ( const HistoId id,
MonitorObject *&  mo 
)

Get Parameter MO on Histogram Id.

Parameters
idHistogram identifier
moMonitoring Object to return
Returns
true if MO was found in cache and false otherwise

Definition at line 153 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::isBookedCSC ( const HwId crateId,
const HwId dmbId 
) const

Check if CSC was booked on given identifiers.

Parameters
crateIdCSC Crate Id
dmbIdCSC DMB Id
Returns
true if CSC was booked, false - otherwise

Definition at line 311 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::isBookedDDU ( const HwId dduId) const

Check if DDU was booked on given identifier.

Parameters
dduIdDDU Id
Returns
true if DDU was booked, false - otherwise

Definition at line 334 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::isBookedFED ( const HwId fedId) const

Check if FED was booked on given identifier.

Parameters
fedIdFED Id
Returns
true if FED was booked, false - otherwise

Definition at line 324 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::nextBookedCSC ( unsigned int &  n,
unsigned int &  crateId,
unsigned int &  dmbId 
) const

Iterator to get booked CSC identifiers on enumerator.

Parameters
niterator (0 and up)
crateIdCSC Crate Id returned
dmbIdCSC DMB Id returned
Returns
true if CSC on n found, false - otherwise

Definition at line 258 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::nextBookedDDU ( unsigned int &  n,
unsigned int &  dduId 
) const

Iterator to get booked DDU identifier on enumerator.

Parameters
niterator (0 and up)
dduIdDDU Id returned
Returns
true if DDU on n found, false - otherwise

Definition at line 294 of file CSCDQM_Cache.cc.

const bool cscdqm::Cache::nextBookedFED ( unsigned int &  n,
unsigned int &  fedId 
) const

Iterator to get booked FED identifier on enumerator.

Utility methods

Parameters
niterator (0 and up)
fedIdFED Id returned
Returns
true if FED on n found, false - otherwise

Definition at line 276 of file CSCDQM_Cache.cc.

void cscdqm::Cache::put ( const HistoDef histo,
MonitorObject mo 
)

Put Monitoring Object into cache.

Parameters
histoHistogram Definition
moMonitoring Object to put
Returns

EMU MO

FED MO

DDU MO

CSC MO

Parameter MO

Add histo (if mo is not null!) into lookup list

Definition at line 167 of file CSCDQM_Cache.cc.

Member Data Documentation

CSCMapType cscdqm::Cache::cscData
private

Chamber MO List

Definition at line 135 of file CSCDQM_Cache.h.

CSCMapType::const_iterator cscdqm::Cache::cscPointer
private

Pointer to the Last Chamber object used (cached)

Definition at line 137 of file CSCDQM_Cache.h.

MonitorObject* cscdqm::Cache::data[h::namesSize]
private

EMU and PAR MO static List

Definition at line 117 of file CSCDQM_Cache.h.

DDUMapType cscdqm::Cache::dduData
private

DDU MO List

Definition at line 128 of file CSCDQM_Cache.h.

DDUMapType::const_iterator cscdqm::Cache::dduPointer
private

Pointer to the Last DDU object used (cached)

Definition at line 130 of file CSCDQM_Cache.h.

HwId cscdqm::Cache::dduPointerValue
private

Last DDU id used (cached)

Definition at line 132 of file CSCDQM_Cache.h.

FEDMapType cscdqm::Cache::fedData
private

FED MO List

Definition at line 120 of file CSCDQM_Cache.h.

FEDMapType::const_iterator cscdqm::Cache::fedPointer
private

Pointer to the Last FED object used (cached)

Definition at line 122 of file CSCDQM_Cache.h.

HwId cscdqm::Cache::fedPointerValue
private

Last FED id used (cached)

Definition at line 124 of file CSCDQM_Cache.h.

LookupMapType cscdqm::Cache::lookupData
private

MO Lookup List

Definition at line 140 of file CSCDQM_Cache.h.