ATLAS Offline Software
Classes | Public Member Functions | Private Types | Private Attributes | List of all members
TrigMatchToolCore::TrigFeatureCache< trigType > Class Template Reference
Inheritance diagram for TrigMatchToolCore::TrigFeatureCache< trigType >:
Collaboration diagram for TrigMatchToolCore::TrigFeatureCache< trigType >:

Classes

struct  cacheData_t
 

Public Member Functions

 TrigFeatureCache ()
 
virtual void clear ()
 
bool get (size_t chainIndex, bool onlyPassedFeatures, std::vector< const trigType * > &objects)
 
void add (size_t chainIndex, bool onlyPassedFeatures, const std::vector< const trigType * > &data)
 

Private Types

typedef std::vector< cacheData_tcacheDatavec_t
 

Private Attributes

cacheDatavec_t m_data [2]
 
size_t m_size [2]
 

Detailed Description

template<typename trigType>
class TrigMatchToolCore::TrigFeatureCache< trigType >

Definition at line 557 of file TrigMatchToolCore.h.

Member Typedef Documentation

◆ cacheDatavec_t

template<typename trigType >
typedef std::vector<cacheData_t> TrigMatchToolCore::TrigFeatureCache< trigType >::cacheDatavec_t
private

Definition at line 610 of file TrigMatchToolCore.h.

Constructor & Destructor Documentation

◆ TrigFeatureCache()

template<typename trigType >
TrigMatchToolCore::TrigFeatureCache< trigType >::TrigFeatureCache ( )
inline

Definition at line 559 of file TrigMatchToolCore.h.

560  {
561  m_size[0] = m_size[1] = 0;
562  }

Member Function Documentation

◆ add()

template<typename trigType >
void TrigMatchToolCore::TrigFeatureCache< trigType >::add ( size_t  chainIndex,
bool  onlyPassedFeatures,
const std::vector< const trigType * > &  data 
)
inline

Definition at line 584 of file TrigMatchToolCore.h.

587  {
588  cacheDatavec_t& v = m_data[onlyPassedFeatures];
589  if (chainIndex >= v.size()) {
590  size_t& sz = m_size[onlyPassedFeatures];
591  if (chainIndex >= sz)
592  sz = chainIndex + 1;
593  v.resize (sz);
594  }
595  v[chainIndex].valid = true;
596  v[chainIndex].data = data;
597  }

◆ clear()

template<typename trigType >
virtual void TrigMatchToolCore::TrigFeatureCache< trigType >::clear ( )
inlinevirtual

Implements TrigMatchToolCore::TrigFeatureCacheBase.

Definition at line 564 of file TrigMatchToolCore.h.

565  {
566  for (int i = 0; i < 2; i++) {
567  cacheDatavec_t().swap (m_data[i]);
568  }
569  }

◆ get()

template<typename trigType >
bool TrigMatchToolCore::TrigFeatureCache< trigType >::get ( size_t  chainIndex,
bool  onlyPassedFeatures,
std::vector< const trigType * > &  objects 
)
inline

Definition at line 571 of file TrigMatchToolCore.h.

574  {
575  cacheDatavec_t& v = m_data[onlyPassedFeatures];
576  if (chainIndex < v.size() && v[chainIndex].valid) {
577  objects = v[chainIndex].data;
578  return true;
579  }
580  return false;
581 
582  }

Member Data Documentation

◆ m_data

template<typename trigType >
cacheDatavec_t TrigMatchToolCore::TrigFeatureCache< trigType >::m_data[2]
private

Definition at line 611 of file TrigMatchToolCore.h.

◆ m_size

template<typename trigType >
size_t TrigMatchToolCore::TrigFeatureCache< trigType >::m_size[2]
private

Definition at line 612 of file TrigMatchToolCore.h.


The documentation for this class was generated from the following file:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
fitman.sz
sz
Definition: fitman.py:527
TrigMatchToolCore::TrigFeatureCache::m_size
size_t m_size[2]
Definition: TrigMatchToolCore.h:612
LArConditions2Ntuple.objects
objects
Definition: LArConditions2Ntuple.py:59
TrigMatchToolCore::TrigFeatureCache::cacheDatavec_t
std::vector< cacheData_t > cacheDatavec_t
Definition: TrigMatchToolCore.h:610
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigMatchToolCore::TrigFeatureCache::m_data
cacheDatavec_t m_data[2]
Definition: TrigMatchToolCore.h:611
python.PyAthena.v
v
Definition: PyAthena.py:154