EventAnalysis  1.3.0
ConfigurationTokensHandler.h
Go to the documentation of this file.
1 /*
2  * ConfigurationTokensHandler.h
3  *
4  * Created on: 17 Aug 2017
5  * Author: Nicola Mori
6  */
7 
10 #ifndef CONFIGURATIONTOKENSHANDLER_H_
11 #define CONFIGURATIONTOKENSHANDLER_H_
12 
15 
16 #include <string>
17 #include <vector>
18 
19 namespace EA {
20 
35 
36 public:
42  : anManager(manager), clParameters(clParams) {}
43 
46 
59  virtual bool HandleTokens(const std::vector<std::string> &tokens) = 0;
60 
61 protected:
68  bool SetParameter(const std::string &name, const std::string &value, Configurable &obj);
69 
72 };
73 
74 } // namespace EA
75 
76 #include "plugin/FactoryMacros.h"
77 #define RegisterTokensHandler(className, commandName) \
78  RegisterClassAsHelper(__COUNTER__, ConfigurationTokensHandler, className, commandName, AnalysisManager &, \
79  const CommandLineParameters &)
80 
81 #endif /* CONFIGURATIONTOKENSHANDLER_H_ */
AnalysisManager & anManager
Definition: ConfigurationTokensHandler.h:70
const CommandLineParameters & clParameters
Definition: ConfigurationTokensHandler.h:71
ConfigurationTokensHandler(AnalysisManager &manager, const CommandLineParameters &clParams)
Constructor.
Definition: ConfigurationTokensHandler.h:41
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
A class to store parameters passed from command line.
Definition: CommandLineParameters.h:31
virtual bool HandleTokens(const std::vector< std::string > &tokens)=0
Configures the analysis according to given tokens.
virtual ~ConfigurationTokensHandler()
Destructor.
Definition: ConfigurationTokensHandler.h:45
bool SetParameter(const std::string &name, const std::string &value, Configurable &obj)
Set a parameter of a given Configurable object.
Definition: ConfigurationTokensHandler.cpp:13
Interface of configuration token handler classes.
Definition: ConfigurationTokensHandler.h:34
The top-level class managing the setup and run of the data analysis.
Definition: AnalysisManager.h:27
Interface for a configurable class.
Definition: Configurable.h:25