ATLAS Offline Software
Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
TIDA::FeatureStore Class Reference

#include <TIDAFeatureStore.h>

Inheritance diagram for TIDA::FeatureStore:
Collaboration diagram for TIDA::FeatureStore:

Public Types

typedef std::map< std::string, FeatureBase * > map_type
 

Public Member Functions

 FeatureStore ()
 
 ~FeatureStore ()
 
template<typename T >
void insert (T *t, const std::string &key)
 
template<typename T >
int find (T *&t, const std::string &key)
 

Public Attributes

keys
 STL member. More...
 
elements
 STL member. More...
 

Private Member Functions

void _insert (TIDA::FeatureBase *f, const std::string &key)
 
TIDA::FeatureBase_find (const std::string &key)
 

Detailed Description

Definition at line 26 of file TIDAFeatureStore.h.

Member Typedef Documentation

◆ map_type

typedef std::map<std::string, FeatureBase*> TIDA::FeatureStore::map_type

Definition at line 30 of file TIDAFeatureStore.h.

Constructor & Destructor Documentation

◆ FeatureStore()

TIDA::FeatureStore::FeatureStore ( )
inline

Definition at line 34 of file TIDAFeatureStore.h.

34 { }

◆ ~FeatureStore()

TIDA::FeatureStore::~FeatureStore ( )
inline

Definition at line 36 of file TIDAFeatureStore.h.

36  {
37  const_iterator itr = begin();
38  const_iterator iend = end();
39  while( itr!=iend ) delete (itr++)->second;
40  }

Member Function Documentation

◆ _find()

TIDA::FeatureBase* TIDA::FeatureStore::_find ( const std::string &  key)
inlineprivate

Definition at line 70 of file TIDAFeatureStore.h.

70  {
72  if ( itr!=end() ) return itr->second;
73  else return 0;
74  }

◆ _insert()

void TIDA::FeatureStore::_insert ( TIDA::FeatureBase f,
const std::string &  key 
)
inlineprivate

Definition at line 66 of file TIDAFeatureStore.h.

66  {
67  map_type::insert( value_type( key, f ) );
68  }

◆ find()

template<typename T >
int TIDA::FeatureStore::find ( T *&  t,
const std::string &  key 
)
inline

Definition at line 51 of file TIDAFeatureStore.h.

51  {
53  if ( f ) {
54  TIDA::Feature<T>* fdptr = dynamic_cast<TIDA::Feature<T>*>(f);
55  if ( fdptr ) {
56  t = fdptr->cptr();
57  return 0;
58  }
59  else return -2;
60  }
61  return -1;
62  }

◆ insert()

template<typename T >
void TIDA::FeatureStore::insert ( T *  t,
const std::string &  key 
)
inline

Definition at line 44 of file TIDAFeatureStore.h.

44  {
46  _insert( tt, key );
47  }

Member Data Documentation

◆ elements

T std::map< K, T >::elements
inherited

STL member.

◆ keys

K std::map< K, T >::keys
inherited

STL member.


The documentation for this class was generated from the following file:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
TIDA::FeatureStore::_insert
void _insert(TIDA::FeatureBase *f, const std::string &key)
Definition: TIDAFeatureStore.h:66
hist_file_dump.f
f
Definition: hist_file_dump.py:135
TIDA::Feature
actual template of the Feature wrapper - stores a pointer to an object and inherits from FeatureBase
Definition: TIDAFeature.h:55
TIDA::FeatureStore::_find
TIDA::FeatureBase * _find(const std::string &key)
Definition: TIDAFeatureStore.h:70
TIDA::FeatureBase
very basic Feature base class just so that we can store derived classes onto the store
Definition: TIDAFeature.h:29
value_type
Definition: EDM_MasterSearch.h:11
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
TIDA::Feature::cptr
T * cptr()
Definition: TIDAFeature.h:67
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37