LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
opdet::PedAlgoMakerToolBase< PedAlgoClass > Class Template Reference

Base art tool class wrapping a pedestal estimator algorithm. More...

#include "PedAlgoMakerToolBase.h"

Inheritance diagram for opdet::PedAlgoMakerToolBase< PedAlgoClass >:
opdet::IPedAlgoMakerTool

Classes

struct  Config
 

Public Types

using Parameters = art::ToolConfigTable< Config >
 

Public Member Functions

 PedAlgoMakerToolBase (Parameters const &params)
 Constructor: copies and stores the configuration for the algorithm. More...
 
virtual std::unique_ptr< pmtana::PMTPedestalBasemakeAlgo () override
 Creates and returns the algorithm from the configuration on construction. More...
 

Protected Attributes

Config fConfig
 Tool configuration cache. More...
 

Detailed Description

template<class PedAlgoClass>
class opdet::PedAlgoMakerToolBase< PedAlgoClass >

Base art tool class wrapping a pedestal estimator algorithm.

Template Parameters
PedAlgoClassthe pedestal estimator algorithm class being created

Algorithms of the pedestal estimation mini-framework in larana follow a factory pattern which is not the one native in art.

This base class provides the backbone to a art tool wrapping one of the pedestal estimator algorithms. The only function of these tools is to create and configure a pedestal estimator algorithm object: the tools do not offer any pedestal estimation functionality by themselves.

Note that these tools all implement a single art tool interface, which is defined as opdet::IPedAlgoMakerTool.

The current art plugin system will be content with a simple declaration like:

for defining the tool that creates a pmtana::PedAlgoRollingMean algorithm. This definition needs to live in a source file with an appropriate name (e.g. PedAlgoRollingMeanMaker_tool.cc), as the source name will be used to identify which library to load at run time.

Pedestal estimator class (PedAlgoClass) requirements

The constructor of the pedestal estimator class, PedAlgoClass, must support one parameter:

PedAlgoClass::PedAlgoClass(fhicl::ParameterSet const& config);

Definition at line 27 of file PedAlgoMakerToolBase.h.

Member Typedef Documentation

template<class PedAlgoClass >
using opdet::PedAlgoMakerToolBase< PedAlgoClass >::Parameters = art::ToolConfigTable<Config>

Definition at line 78 of file PedAlgoMakerToolBase.h.

Constructor & Destructor Documentation

template<class PedAlgoClass >
opdet::PedAlgoMakerToolBase< PedAlgoClass >::PedAlgoMakerToolBase ( Parameters const &  params)

Constructor: copies and stores the configuration for the algorithm.

Definition at line 95 of file PedAlgoMakerToolBase.h.

96  : fConfig{params()}
97 {}
Config fConfig
Tool configuration cache.

Member Function Documentation

template<class PedAlgoClass >
std::unique_ptr< pmtana::PMTPedestalBase > opdet::PedAlgoMakerToolBase< PedAlgoClass >::makeAlgo ( )
overridevirtual

Creates and returns the algorithm from the configuration on construction.

Implements opdet::IPedAlgoMakerTool.

Definition at line 101 of file PedAlgoMakerToolBase.h.

References opdet::PedAlgoMakerToolBase< PedAlgoClass >::fConfig, and opdet::PedAlgoMakerToolBase< PedAlgoClass >::Config::PedAlgoPset.

102 {
103 
104  return std::make_unique<PedAlgoClass>(fConfig.PedAlgoPset.template get<fhicl::ParameterSet>());
105 
106 } // opdet::PedAlgoMakerToolBase::makeAlgo()
Config fConfig
Tool configuration cache.
fhicl::DelegatedParameter PedAlgoPset

Member Data Documentation

template<class PedAlgoClass >
Config opdet::PedAlgoMakerToolBase< PedAlgoClass >::fConfig
protected

Tool configuration cache.

Definition at line 87 of file PedAlgoMakerToolBase.h.

Referenced by opdet::PedAlgoMakerToolBase< PedAlgoClass >::makeAlgo().


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