EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairContFact.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairContFact.h
1 #ifndef FAIRCONTFACT_H
2 #define FAIRCONTFACT_H
3 
4 #include "FairLogger.h"
5 
6 #include "TList.h"
7 #include "TNamed.h"
8 
9 class FairParSet;
10 class FairParIo;
11 //class TList;
12 
13 class FairContainer : public TNamed
14 {
15  private:
16  FairContainer();
19 
20  protected:
22  TList* contexts;
24  TString actualContext;
27  public:
28  FairContainer( const char*, const char*, const char*);
30  void addContext(const char*);
31  Bool_t setActualContext(const char* c);
32  const char* getDefaultContext();
33  const char* getActualContext() { return actualContext.Data(); }
34  void print();
35  TString getConcatName();
36  const char* getContext();
37  ClassDef(FairContainer,0) // class for list elements in class FairContFact
38 };
39 
40 class FairContFact : public TNamed
41 {
42  public:
43  FairContFact();
44  virtual ~FairContFact();
45  Bool_t addContext(const char* name);
46  void print();
47  FairParSet* getContainer(const char*);
48  virtual FairParSet* createContainer(FairContainer*) {return 0;}
49  virtual void activateParIo(FairParIo*) {}
50  protected:
51 
52  TList* containers; // all parameter containers managed by this factory
53  const char* getActualContext(const char* name) {
54  return ((FairContainer*)containers->FindObject(name))->getActualContext();
55  }
58  ClassDef(FairContFact,0) // base class of all factories for parameter containers
59  private:
60  FairContFact(const FairContFact&);
61  FairContFact& operator=(const FairContFact&);
62 
63 
64 };
65 
66 #endif /* !FAIRCONTFACT_H */