EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbConfigurable.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairDbConfigurable.h
1 #ifndef FAIRDBCONFIGURABLE_H
2 #define FAIRDBCONFIGURABLE_H
3 #ifndef REGISTRY_H
4 # include "FairRegistry.h"
5 #endif
6 
7 class FairDbConfDialog;
8 
9 #ifndef ROOT_Rtypes
10 #if !defined(__CINT__) || defined(__MAKECINT__)
11 #include "Rtypes.h"
12 #endif
13 #endif
14 
16 {
17 
18  public:
19 
21  virtual ~FairDbConfigurable();
22 
23  // Subclass should implement this method:
24  virtual void Config() = 0;
25 
26  // Access default and main configuration
27  virtual const FairRegistry& DefaultConfig() const;
29  const FairRegistry& GetConfig() const;
30 
31  // Call anytime. Triggers Config() only iff it has been modifed
32  // since last calling.
33  int Update();
34 
35  // Set config via interactive dialog
36  void Set(FairDbConfDialog* d=0);
37 
38  // Set config via string
39  void Set(const char* s);
40 
41  protected:
42  virtual void CommitDefaultConfig(const FairRegistry& r);
43 
44  private:
46 
47 
48  ClassDef(FairDbConfigurable,1)
49 };
50 
51 #endif // FAIRDBCONFIGURABLE_H