All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BaseAlgorithm.h
Go to the documentation of this file.
1 /**
2  * \file BaseAlgorithm.h
3  *
4  * \ingroup Base
5  *
6  * \brief Class def header for a class BaseAlgorithm
7  *
8  * @author kazuhiro
9  */
10 
11 /** \addtogroup Base
12 
13  @{*/
14 #ifndef OPT0FINDER_BASEALGORITHM_H
15 #define OPT0FINDER_BASEALGORITHM_H
16 
17 #include "OpT0FinderTypes.h"
18 #include "FMWKInterface.h"
19 #include "LoggerFeature.h"
20 #include <vector>
21 namespace flashmatch {
22 
23  class FlashMatchManager;
24 
25  /**
26  \class BaseAlgorithm
27  */
28  class BaseAlgorithm : public LoggerFeature {
29 
30  friend class FlashMatchManager;
31 
32  public:
33 
34  /// Default constructor
35  BaseAlgorithm(const Algorithm_t type, const std::string name);
36 
37  /// Default destructor
39 
40  /// Function to accept configuration
41  void Configure(const Config_t &pset);
42 
43  /// Algorithm type
44  Algorithm_t AlgorithmType() const;
45 
46  /// Algorithm name
47  const std::string& AlgorithmName() const;
48 
49  protected:
50 
51  virtual void _Configure_(const Config_t &pset) = 0;
52 
53  private:
54 
55  Algorithm_t _type; ///< Algorithm type
56  std::string _name; ///< Algorithm name
57  };
58 }
59 #endif
60 /** @} */ // end of doxygen group
61 
Algorithm_t
Enumerator for different types of algorithm.
BaseAlgorithm(const Algorithm_t type, const std::string name)
Default constructor.
Class definition file of LoggerFeature.
fhicl::ParameterSet Config_t
Configuration object.
Definition: FMWKInterface.h:31
const std::string & AlgorithmName() const
Algorithm name.
std::string _name
Algorithm name.
Definition: BaseAlgorithm.h:56
Algorithm_t AlgorithmType() const
Algorithm type.
~BaseAlgorithm()
Default destructor.
Definition: BaseAlgorithm.h:38
void Configure(const Config_t &pset)
Function to accept configuration.
virtual void _Configure_(const Config_t &pset)=0
const std::string & name() const
Name getter, defined in a logger instance attribute.
Definition: LoggerFeature.h:51
Algorithm_t _type
Algorithm type.
Definition: BaseAlgorithm.h:55