SctData::ResponseCurveMap Class Reference

Map used within the virtual constructor idiom. More...

#include <ResponseCurve.h>


Public Member Functions

bool addToMap (const string &curvename, const int index, ResponseCurve &) throw ()
 used by derived classes to add themselves.
auto_ptr< ResponseCurveget (const string &curvename) const throw (LogicError)
auto_ptr< ResponseCurveget (const int index) const throw (LogicError)
auto_ptr< ResponseCurveget (const ChipConfiguration &chip) const throw (LogicError)
int getIndex (const string &curvename) const throw (LogicError)

Static Public Member Functions

static ResponseCurveMapgetMap () throw ()
 access function to the singleton

Private Attributes

map< int, ResponseCurve * > indexMap
map< string, int > nameMap


Detailed Description

Map used within the virtual constructor idiom.

Definition at line 69 of file SCTData/src/ResponseCurve.h.


Member Function Documentation

bool SctData::ResponseCurveMap::addToMap const string &  curvename,
const int  index,
ResponseCurve
throw ()
 

used by derived classes to add themselves.

Definition at line 44 of file SCTData/src/ResponseCurve.cpp.

auto_ptr< ResponseCurve > SctData::ResponseCurveMap::get const ChipConfiguration chip  )  const throw (LogicError)
 

Returns:
the response curve corresponding to a particular chip configuration.

Definition at line 91 of file SCTData/src/ResponseCurve.cpp.

References get(), and getMap().

Here is the call graph for this function:

auto_ptr< ResponseCurve > SctData::ResponseCurveMap::get const int  index  )  const throw (LogicError)
 

Returns:
a mode of the derived class.
Parameters:
the derrived class integer representation.
Exceptions:
LogicError if class index dosen't exist.

Definition at line 75 of file SCTData/src/ResponseCurve.cpp.

auto_ptr< ResponseCurve > SctData::ResponseCurveMap::get const string &  curvename  )  const throw (LogicError)
 

Returns:
a mode of the derived class.
Parameters:
the derrived class name
Exceptions:
LogicError if class dosen't exist.

Definition at line 71 of file SCTData/src/ResponseCurve.cpp.

Referenced by get(), and SctData::IO::ResponseCurveStreamer_v1::read().

int SctData::ResponseCurveMap::getIndex const string &  curvename  )  const throw (LogicError)
 

Returns:
the integer index representation of the response curve of name classname
Parameters:
the derrived class name
Exceptions:
LogicError if class dosen't exist

Definition at line 55 of file SCTData/src/ResponseCurve.cpp.

Referenced by SctData::ResponseCurve::getIndex(), and SctData::IO::ResponseCurveStreamer_v1::write().

ResponseCurveMap & SctData::ResponseCurveMap::getMap  )  throw () [static]
 

access function to the singleton

Definition at line 39 of file SCTData/src/ResponseCurve.cpp.

Referenced by get(), SctData::ResponseCurve::getIndex(), SctData::IO::ResponseCurveStreamer_v1::read(), and SctData::IO::ResponseCurveStreamer_v1::write().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:07:37 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6