KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVVirtualIDFitter.cpp
Go to the documentation of this file.
1 /*
2 $Id: KVVirtualIDFitter.cpp,v 1.2 2009/03/03 14:27:15 franklan Exp $
3 $Revision: 1.2 $
4 $Date: 2009/03/03 14:27:15 $
5 */
6 
7 //Created by KVClassFactory on Mon Apr 21 09:25:57 2008
8 //Author: franklan
9 
10 #include "KVVirtualIDFitter.h"
11 #include "TEnv.h"
12 #include "TPluginManager.h"
13 
15 
16 
17 
31 {
32  // Static method. Creates (if necessary) and returns pointer to
33  // static instanciation of default ID fitter object. The class of this
34  // object is defined by the variable
35  //
36  // KVVirtualIDFitter.DefaultFitter: xxxxxxxxxxx
37  //
38  // which can be customised in the user's .kvrootrc. The class must be defined
39  // as a KVVirtualIDFitter plugin and have a default ctor with no arguments:
40  //
41  // +Plugin.KVVirtualIDFitter: MyFitter MyFitter MyFitter.cpp+ "MyFitter()"
42 
43  if (!gDefaultFitter) {
44  TString df = gEnv->GetValue("KVVirtualIDFitter.DefaultFitter", "");
45  if (df == "") {
46  ::Error("KVVirtualIDFitter::GetDefaultFitter",
47  "No default fitter defined. Use variable KVVirtualIDFitter.DefaultFitter");
48  return 0;
49  }
50  TPluginHandler* ph;
51  if (!(ph = LoadPlugin("KVVirtualIDFitter", df.Data()))) return 0;
53  }
54  return gDefaultFitter;
55 }
56 
57 
58 
61 
63 {
64  // Default constructor
65  fGrid = 0;
66  fPad = 0;
67 }
68 
69 
70 
73 
75 {
76  // Destructor
77 }
78 
79 
80 
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
R__EXTERN TEnv * gEnv
static TPluginHandler * LoadPlugin(const Char_t *base, const Char_t *uri="0")
Definition: KVBase.cpp:756
ABC for fitting ID grids with functionals.
static KVVirtualIDFitter * GetDefaultFitter()
TVirtualPad * fPad
the pad in which grid is drawn (=0 if not drawn)
KVIDGraph * fGrid
the grid to fit
KVVirtualIDFitter()
Default constructor.
virtual ~KVVirtualIDFitter()
Destructor.
static KVVirtualIDFitter * gDefaultFitter
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void Error(const char *method, const char *msgfmt,...) const
Longptr_t ExecPlugin(int nargs, const T &... params)
const char * Data() const