FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairFieldFactory.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // -------------------------------------------------------------------------
9 // ----- FairFieldFactory header file -----
10 // ----- Created 15/01/07 by M. Al-Turany -----
11 // -------------------------------------------------------------------------
12 
13 #ifndef FAIRFIELDFACTORY_H
14 #define FAIRFIELDFACTORY_H
15 
16 #include <Rtypes.h> // for FairFieldFactory::Class, etc
17 
18 class FairField;
19 
21 {
22  public:
23  static FairFieldFactory* Instance();
25  virtual ~FairFieldFactory();
27  {
28  FairField* field = 0;
29  if (fCreator) {
30  field = fCreator->createFairField();
31  }
32  return field;
33  };
34  virtual void SetParm()
35  {
36  if (fCreator) {
37  fCreator->SetParm();
38  }
39  }
40 
41  protected:
44 
46 
47  private:
49  FairFieldFactory& operator=(const FairFieldFactory&) { return *this; }
50 };
51 
52 #endif // FAIRFIELDFACTORY_H
FairFieldFactory * fCreator
virtual FairField * createFairField()
static FairFieldFactory * Instance()
virtual void SetParm()
ClassDef(FairFieldFactory, 1)
virtual ~FairFieldFactory()
static FairFieldFactory * fgRinstance