ATLAS Offline Software
Loading...
Searching...
No Matches
AnalysisUtils::Selection< CRITERIA > Struct Template Reference

#include <AnalysisSelection.h>

Inheritance diagram for AnalysisUtils::Selection< CRITERIA >:
Collaboration diagram for AnalysisUtils::Selection< CRITERIA >:

Public Member Functions

template<class COLL>
void getObjects (const COLL *coll, std::vector< typename COLL::value_type > &out)
 get objects which pass the selection criteria
template<class COLL>
void getIndices (const COLL *coll, std::vector< int > &out)
 get indices of the objects which pass the selection criteria

Detailed Description

template<class CRITERIA>
struct AnalysisUtils::Selection< CRITERIA >

Definition at line 20 of file AnalysisSelection.h.

Member Function Documentation

◆ getIndices()

template<class CRITERIA>
template<class COLL>
void AnalysisUtils::Selection< CRITERIA >::getIndices ( const COLL * coll,
std::vector< int > & out )
inline

get indices of the objects which pass the selection criteria

Parameters
COLL[in] type of collection
coll[in] pointer to collection
out[out] indices of selected objects

Definition at line 46 of file AnalysisSelection.h.

47 {
48 out.clear();
49
50 // loop over all elements
51 int index = 0;
52 typename COLL::const_iterator it = coll->begin();
53 typename COLL::const_iterator itE = coll->end();
54 for (; it != itE; ++it)
55 {
56 // selection
58 out.push_back(index);
59
60 ++index;
61 }
62 }

◆ getObjects()

template<class CRITERIA>
template<class COLL>
void AnalysisUtils::Selection< CRITERIA >::getObjects ( const COLL * coll,
std::vector< typename COLL::value_type > & out )
inline

get objects which pass the selection criteria

Parameters
COLL[in] type of collection
coll[in] pointer to collection
out[out] selected objects

Definition at line 28 of file AnalysisSelection.h.

29 {
30 out.clear();
31
32 // loop over all elements
33 typename COLL::const_iterator it = coll->begin();
34 typename COLL::const_iterator itE = coll->end();
35 for (; it != itE; ++it)
36 // selection
38 out.push_back(*it);
39 }

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