ATLAS Offline Software
Loading...
Searching...
No Matches
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.
virtual void HashIDList (long layer, const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const =0
 HashIDList interface declaration. return list of non-repeated IdentifierHash.
virtual void ROBIDList (const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const =0
 Rob identifier methods methods.
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.
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 ...

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 RegSelectorHashMap, RegSelectorMap, and RegSelSiLUT.

◆ 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 RegSelectorHashMap, RegSelectorMap, and RegSelSiLUT.

◆ 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 }
static void removeDuplicates(std::vector< T > &vec)
useful for removing duplicates if required ...
Definition IRegSelLUT.h:78
void IDList(const IRoiDescriptor &roi, std::vector< T > &idlist, handler< C, T > lister) const
Definition IRegSelLUT.h:88
virtual const IRoiDescriptor * at(int i) const =0
find an RoiDescriptor constituent
virtual unsigned size() const =0
number of constituents
virtual bool composite() const =0
Super RoI access methods.
struct color C

◆ 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 }
void IDList_layer(long layer, const IRoiDescriptor &roi, std::vector< T > &idlist, handler_layer< C, T > lister) const
Definition IRegSelLUT.h:106

◆ removeDuplicates()

template<typename T>
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 }
std::vector< size_t > vec
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ 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 RegSelectorHashMap, RegSelectorMap, and RegSelSiLUT.

◆ 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 RegSelectorHashMap, RegSelectorMap, and RegSelSiLUT.


The documentation for this class was generated from the following file: