ATLAS Offline Software
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | List of all members
IRegSelLUT Class Referenceabstract

#include <IRegSelLUT.h>

Inheritance diagram for IRegSelLUT:
Collaboration diagram for IRegSelLUT:

Public Member Functions

virtual void HashIDList (const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const =0
 IdentifierHash methods. More...
 
virtual void HashIDList (long layer, const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const =0
 HashIDList interface declaration. return list of non-repeated IdentifierHash. More...
 
virtual void ROBIDList (const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const =0
 Rob identifier methods methods. More...
 
virtual void ROBIDList (long layer, const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const =0
 ROBIDList interface declaration. This interface can be used by the ID subdetectors. A list of non-repeated ROBIDs (uint_32_t) is returned by a reference. More...
 
virtual ~IRegSelLUT ()
 

Protected Types

template<typename C , typename T >
using handler = void(C::*)(const IRoiDescriptor &, std::vector< T > &) const
 
template<typename C , typename T >
using handler_layer = void(C::*)(long layer, const IRoiDescriptor &, std::vector< T > &) const
 

Protected Member Functions

template<typename C , typename T >
void IDList (const IRoiDescriptor &roi, std::vector< T > &idlist, handler< C, T > lister) const
 
template<typename C , typename T >
void IDList_layer (long layer, const IRoiDescriptor &roi, std::vector< T > &idlist, handler_layer< C, T > lister) const
 

Static Protected Member Functions

template<typename T >
static void removeDuplicates (std::vector< T > &vec)
 useful for removing duplicates if required ... More...
 

Detailed Description

Definition at line 26 of file IRegSelLUT.h.

Member Typedef Documentation

◆ handler

template<typename C , typename T >
using IRegSelLUT::handler = void (C::*)(const IRoiDescriptor& , std::vector<T>& ) const
protected

Definition at line 85 of file IRegSelLUT.h.

◆ handler_layer

template<typename C , typename T >
using IRegSelLUT::handler_layer = void (C::*)(long layer, const IRoiDescriptor& , std::vector<T>& ) const
protected

Definition at line 103 of file IRegSelLUT.h.

Constructor & Destructor Documentation

◆ ~IRegSelLUT()

virtual IRegSelLUT::~IRegSelLUT ( )
inlinevirtual

Definition at line 71 of file IRegSelLUT.h.

71 {};

Member Function Documentation

◆ HashIDList() [1/2]

virtual void IRegSelLUT::HashIDList ( const IRoiDescriptor roi,
std::vector< IdentifierHash > &  idlist 
) const
pure virtual

IdentifierHash methods.

HashIDList interface declaration. return list of unique IdentifierHash

Parameters
IRoiDescriptorroi, the IRoiDescriptor for the roi, all enabled elements in the roi are found.
Returns
std::vector<IdentifierHash> which is a list of non-repeated Identifier Hash numbers.

Implemented in RegSelSiLUT, RegSelectorHashMap, and RegSelectorMap.

◆ HashIDList() [2/2]

virtual void IRegSelLUT::HashIDList ( long  layer,
const IRoiDescriptor roi,
std::vector< IdentifierHash > &  idlist 
) const
pure virtual

HashIDList interface declaration. return list of non-repeated IdentifierHash.

Parameters
longlayer, long int to decide which layer within the detector.
IRoiDescriptorroi, the IRoiDescriptor for the roi, all enabled elements in the roi are found.
Returns
std::vector<IdentifierHash> which is a list of non-repeated Offline Identifier Hash numbers.

Implemented in RegSelSiLUT, RegSelectorHashMap, and RegSelectorMap.

◆ IDList()

template<typename C , typename T >
void IRegSelLUT::IDList ( const IRoiDescriptor roi,
std::vector< T > &  idlist,
handler< C, T >  lister 
) const
inlineprotected

Definition at line 88 of file IRegSelLUT.h.

88  {
89 
90  if ( roi.composite() ) {
91  idlist.clear();
92  for ( unsigned iroi=roi.size() ; iroi-- ; ) IDList<C>( *(roi.at(iroi)), idlist, lister );
93  if ( roi.size()>1 ) IRegSelLUT::removeDuplicates( idlist );
94  return;
95  }
96 
97  (dynamic_cast<const C*>(this)->*lister)( roi, idlist );
98 
99  }

◆ IDList_layer()

template<typename C , typename T >
void IRegSelLUT::IDList_layer ( long  layer,
const IRoiDescriptor roi,
std::vector< T > &  idlist,
handler_layer< C, T >  lister 
) const
inlineprotected

Definition at line 106 of file IRegSelLUT.h.

106  {
107 
108  if ( roi.composite() ) {
109  idlist.clear();
110  for ( unsigned iroi=roi.size() ; iroi-- ; ) IDList_layer<C>( layer, *(roi.at(iroi)), idlist, lister );
111  if ( roi.size()>1 ) IRegSelLUT::removeDuplicates( idlist );
112  return;
113  }
114 
115  (dynamic_cast<const C*>(this)->*lister)( layer, roi, idlist );
116 
117  }

◆ removeDuplicates()

template<typename T >
static void IRegSelLUT::removeDuplicates ( std::vector< T > &  vec)
inlinestaticprotected

useful for removing duplicates if required ...

Definition at line 78 of file IRegSelLUT.h.

78  {
79  std::sort(vec.begin(), vec.end());
80  vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
81  }

◆ ROBIDList() [1/2]

virtual void IRegSelLUT::ROBIDList ( const IRoiDescriptor roi,
std::vector< uint32_t > &  roblist 
) const
pure virtual

Rob identifier methods methods.

ROBIDList interface declaration. This interface can be used by the ID subdetectors. A list of non-repeated ROBIDs (uint_32_t) is returned by a reference.

Parameters
IRoiDescriptorthe IRoiDescriptor for the roi, all enabled elements in the roi are found.
Returns
std::vector<uint32_t> which is a list of non-repeated ROBID numbers.

Implemented in RegSelSiLUT, RegSelectorHashMap, and RegSelectorMap.

◆ ROBIDList() [2/2]

virtual void IRegSelLUT::ROBIDList ( long  layer,
const IRoiDescriptor roi,
std::vector< uint32_t > &  roblist 
) const
pure virtual

ROBIDList interface declaration. This interface can be used by the ID subdetectors. A list of non-repeated ROBIDs (uint_32_t) is returned by a reference.

Parameters
longlayer, long int to decide which layer within the detector.
IRoiDescriptorthe IRoiDescriptor for the roi, all enabled elements in the roi are found.
Returns
std::vector<uint32_t> which is a list of non-repeated ROBID numbers.

Implemented in RegSelSiLUT, RegSelectorHashMap, and RegSelectorMap.


The documentation for this class was generated from the following file:
DMTest::C
C_v1 C
Definition: C.h:26
IRoiDescriptor::size
virtual unsigned size() const =0
number of constituents
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
IRoiDescriptor::at
virtual const IRoiDescriptor * at(int i) const =0
find an RoiDescriptor constituent
IRegSelLUT::removeDuplicates
static void removeDuplicates(std::vector< T > &vec)
useful for removing duplicates if required ...
Definition: IRegSelLUT.h:78
IRoiDescriptor::composite
virtual bool composite() const =0
Super RoI access methods.