added the option to split a user function into a global and run-block related part (see MUSR-134)

This commit is contained in:
nemu
2010-11-10 13:13:00 +00:00
parent c4dfc3cbce
commit f4d6e349fe
41 changed files with 2401 additions and 161 deletions

View File

@@ -201,6 +201,7 @@ class PTheory
private:
virtual void CleanUp(PTheory *theo);
virtual Int_t SearchDataBase(TString name);
virtual Int_t GetUserFcnIdx(UInt_t lineNo) const;
virtual void MakeCleanAndTidyTheoryBlock(PMsrLines* fullTheoryBlock);
virtual void MakeCleanAndTidyPolynom(UInt_t i, PMsrLines* fullTheoryBlock);
virtual void MakeCleanAndTidyUserFcn(UInt_t i, PMsrLines* fullTheoryBlock);
@@ -240,6 +241,7 @@ class PTheory
UInt_t fNoOfParam; ///< number of parameters for the given function
PTheory *fAdd, *fMul; ///< pointers to the add-sub-function or the multiply-sub-function
Int_t fUserFcnIdx; ///< index of the user function within the theory tree
TString fUserFcnClassName; ///< name of the user function class for within root
TString fUserFcnSharedLibName; ///< name of the shared lib to which the user function belongs
PUserFcnBase *fUserFcn; ///< pointer to the user function object

View File

@@ -33,9 +33,11 @@
#define _PUSERFCNBASE_H_
#include <vector>
using namespace std;
#include "TObject.h"
//--------------------------------------------------------------------------------------------
/**
* <p>Interface class for the user function.
*/
@@ -45,6 +47,10 @@ class PUserFcnBase : public TObject
PUserFcnBase();
virtual ~PUserFcnBase();
virtual Bool_t NeedGlobalPart() const = 0; ///< if a user function needs a global part this function should return true, otherwise false
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) = 0; ///< if a user function is using a global part, this function is used to invoke and retrieve the proper global object
virtual Bool_t GlobalPartIsValid() const = 0; ///< if a user function is using a global part, this function returns if the global object part is valid
virtual Double_t operator()(Double_t t, const std::vector<Double_t> &param) const = 0;
ClassDef(PUserFcnBase, 1)