TrkFitTypeKey Class Reference

#include <TrkFitTypeKey.h>

List of all members.

Public Member Functions

 TrkFitTypeKey (const char *name=0, const PdtPid::PidType pid=PdtPid::null)
 TrkFitTypeKey (const TrkFitTypeKey &)
 TrkFitTypeKey (const int &)
virtual ~TrkFitTypeKey ()
bool operator== (const TrkFitTypeKey &rhs) const
bool operator< (const TrkFitTypeKey &rhs) const
TrkFitTypeKeyoperator= (const TrkFitTypeKey &rhs)
const int & value () const
const IfdKeyifdKey () const
PdtPid::PidType pidType () const
void printAll (std::ostream &os=std::cout) const

Static Public Member Functions

static int currentKey ()
static void killFitType (const TrkFitTypeKey key)

Static Protected Member Functions

static int newFitType (const char *name=0)

Private Attributes

int _value

Static Private Attributes

static std::vector< IfdKey * > _keys
static std::vector< PdtPid::PidType_pidTypes
static const int _defaultValue


Detailed Description

Definition at line 31 of file TrkFitTypeKey.h.


Constructor & Destructor Documentation

TrkFitTypeKey::TrkFitTypeKey ( const char *  name = 0,
const PdtPid::PidType  pid = PdtPid::null 
)

Definition at line 86 of file TrkFitTypeKey.cxx.

References _pidTypes, and _value.

00088   :_value(newFitType(name))
00089 {
00090     if ( _value >= 0 ) _pidTypes.push_back(pid);
00091 }

TrkFitTypeKey::TrkFitTypeKey ( const TrkFitTypeKey  ) 

Definition at line 93 of file TrkFitTypeKey.cxx.

00094   :_value(rhs.value())
00095 {
00096 }

TrkFitTypeKey::TrkFitTypeKey ( const int &   ) 

Definition at line 98 of file TrkFitTypeKey.cxx.

00099   :_value(val)
00100 {
00101 }

TrkFitTypeKey::~TrkFitTypeKey (  )  [virtual]

Definition at line 107 of file TrkFitTypeKey.cxx.

00108 {
00109 }


Member Function Documentation

static int TrkFitTypeKey::currentKey (  )  [inline, static]

Definition at line 39 of file TrkFitTypeKey.h.

References _keys.

Referenced by ifdKey(), killFitType(), newFitType(), and pidType().

00039 { return _keys.size(); }

const IfdKey* TrkFitTypeKey::ifdKey (  )  const [inline]

Definition at line 85 of file TrkFitTypeKey.h.

References _keys, _value, and currentKey().

00085                                {
00086     if ( _value < 0 || _value >= currentKey() ) return 0;
00087     return _keys[_value];
00088   }

void TrkFitTypeKey::killFitType ( const TrkFitTypeKey  key  )  [static]

Definition at line 72 of file TrkFitTypeKey.cxx.

References _keys, currentKey(), genRecEmupikp::i, and key.

00073 {
00074   const int i = key.value();
00075   if ( i < 0 || i >= currentKey() ) return;
00076   IfdKey* theKey = _keys[i];
00077   assert(theKey != 0 );
00078   delete theKey;
00079   theKey = 0;
00080 }

int TrkFitTypeKey::newFitType ( const char *  name = 0  )  [static, protected]

Definition at line 64 of file TrkFitTypeKey.cxx.

References _defaultValue, _keys, and currentKey().

00065 {
00066   if ( name == 0 ) return _defaultValue;
00067   _keys.push_back( new IfdStrKey(name) );
00068   return (currentKey()-1);
00069 }

bool TrkFitTypeKey::operator< ( const TrkFitTypeKey rhs  )  const [inline]

Definition at line 74 of file TrkFitTypeKey.h.

References _value, and value().

00074                                                    {
00075     return _value < rhs.value();
00076   }

TrkFitTypeKey& TrkFitTypeKey::operator= ( const TrkFitTypeKey rhs  )  [inline]

Definition at line 77 of file TrkFitTypeKey.h.

References _value, and value().

00077                                                         {
00078     _value = rhs.value();
00079     return *this;
00080   }

bool TrkFitTypeKey::operator== ( const TrkFitTypeKey rhs  )  const [inline]

Definition at line 71 of file TrkFitTypeKey.h.

References _value, and value().

00071                                                    {
00072     return _value == rhs.value();
00073   }

PdtPid::PidType TrkFitTypeKey::pidType (  )  const [inline]

Definition at line 90 of file TrkFitTypeKey.h.

References _pidTypes, _value, currentKey(), and PdtPid::null.

00090                                 {
00091     if ( _value < 0 || _value >= currentKey() ) return PdtPid::null;
00092     return _pidTypes[_value];
00093   }

void TrkFitTypeKey::printAll ( std::ostream os = std::cout  )  const

const int& TrkFitTypeKey::value (  )  const [inline]

Definition at line 83 of file TrkFitTypeKey.h.

References _value.

Referenced by operator<(), operator=(), and operator==().

00083 { return _value; }


Member Data Documentation

const int TrkFitTypeKey::_defaultValue [static, private]

Definition at line 51 of file TrkFitTypeKey.h.

Referenced by newFitType().

std::vector< IfdKey * > TrkFitTypeKey::_keys [static, private]

Definition at line 49 of file TrkFitTypeKey.h.

Referenced by currentKey(), ifdKey(), killFitType(), and newFitType().

std::vector< PdtPid::PidType > TrkFitTypeKey::_pidTypes [static, private]

Definition at line 50 of file TrkFitTypeKey.h.

Referenced by pidType(), and TrkFitTypeKey().

int TrkFitTypeKey::_value [private]

Definition at line 100 of file TrkFitTypeKey.h.

Referenced by ifdKey(), operator<(), operator=(), operator==(), pidType(), TrkFitTypeKey(), and value().


Generated on Tue Nov 29 23:36:14 2016 for BOSS_7.0.2 by  doxygen 1.4.7