ATLAS Offline Software
Namespaces | Classes | Functions
AnalysisUtils Namespace Reference

utility class to select combination of elements in a collection More...

Namespaces

 Classify
 classify
 
 Delta
 compute \( \Delta \)
 
 Imass
 compute Invariant mass
 
 Match
 find the closest element in a collection to an INavigable4Momentum
 
 Sort
 sort
 

Classes

class  Combination
 combination More...
 
class  Permutation
 permutation More...
 
struct  Selection
 

Functions

template<class In , class Out , class Pred >
Out copy_if (In first, const In &last, Out res, const Pred &p)
 

Detailed Description

utility class to select combination of elements in a collection

IFilterUtils : Implements a copy iterator (STL is missing this utility, though one could use the std::remove_if with the negative predicate).

Utility class to get elements which pass a selection criteria.

utility class to return permutation of a collection

Tools collection.

Author
Tadashi Maeno

User must provide a class for the selection critaria. The class must have a public method "bool isAccepted(Collection::value_type e)".

Author
Tadashi Maeno

The output destination container is filled with the current iterator on the input container, only if the predicate is true. Example:

AnalysisUtils::copy_if( in.begin(), in.end(),
std::back_inserter(out), filter );

where in and out are STL-like containers and filter is a predicate (in our case, it could be a reference toward an IFilter).

Function Documentation

◆ copy_if()

template<class In , class Out , class Pred >
Out AnalysisUtils::copy_if ( In  first,
const In &  last,
Out  res,
const Pred &  p 
)

Definition at line 30 of file IFilterUtils.h.

31 {
32  for ( ; first != last; ++first ) {
33  if ( p(*first) ) {
34  *res++ = *first;
35  }
36  }
37  return res;
38 }
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
covarianceTool.filter
filter
Definition: covarianceTool.py:514
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
AnalysisUtils::copy_if
Out copy_if(In first, const In &last, Out res, const Pred &p)
Definition: IFilterUtils.h:30
DeMoScan.first
bool first
Definition: DeMoScan.py:536