All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
opdet::factory::AlgorithmFactory< Base >::AlgoMakerFor< Algo > Struct Template Reference

Standard algorithm maker class. More...

#include <OpRecoFactoryStuff.h>

Inheritance diagram for opdet::factory::AlgorithmFactory< Base >::AlgoMakerFor< Algo >:
opdet::factory::AlgorithmFactory< Base >::AlgoMaker

Public Member Functions

 AlgoMakerFor (std::string const &name)
 
std::unique_ptr< Base > makeAlgo (fhicl::ParameterSet const &pset) const override
 Algorithm class construction. More...
 
- Public Member Functions inherited from opdet::factory::AlgorithmFactory< Base >::AlgoMaker
 AlgoMaker (std::string name)
 
virtual ~AlgoMaker ()=default
 
bool operator< (AlgoMaker const &other) const
 Comparison: sort by name in lexicographic order. More...
 

Additional Inherited Members

- Public Attributes inherited from opdet::factory::AlgorithmFactory< Base >::AlgoMaker
std::string name
 The name associated to this algorithm. More...
 

Detailed Description

template<typename Base>
template<typename Algo>
struct opdet::factory::AlgorithmFactory< Base >::AlgoMakerFor< Algo >

Standard algorithm maker class.

Template Parameters
Algothe concrete algorithm class delivered by this object

This class implements AlgoMaker by overriding makeAlgo() method. Its implementation simply constructs a new object of type Algo passing the parameter set in the interface to the constructor of the Algo class.

Definition at line 340 of file OpRecoFactoryStuff.h.

Constructor & Destructor Documentation

template<typename Base >
template<typename Algo >
opdet::factory::AlgorithmFactory< Base >::AlgoMakerFor< Algo >::AlgoMakerFor ( std::string const &  name)
inline

Definition at line 466 of file OpRecoFactoryStuff.h.

466 : AlgoMaker{ name } {}
std::string name
The name associated to this algorithm.

Member Function Documentation

template<typename Base >
template<typename Algo >
std::unique_ptr<Base> opdet::factory::AlgorithmFactory< Base >::AlgoMakerFor< Algo >::makeAlgo ( fhicl::ParameterSet const &  pset) const
inlineoverridevirtual

Algorithm class construction.

Parameters
psetthe parameter set used to construct the algorithm object
Returns
a pointer to an object derived from Base, ready for use

The implementations will do whatever it takes to allocate and construct the Algo_t-derived object they cover, based on the content of pset, and return it.

Implements opdet::factory::AlgorithmFactory< Base >::AlgoMaker.

Definition at line 469 of file OpRecoFactoryStuff.h.

470  { return std::make_unique<Algo>(pset); }

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