by changing the behaviour of the global parts of the class PUserFcnBase from pure virtual default NeedGlobalPart=false, the code can be simplified in many places.

This commit is contained in:
2021-02-26 15:17:41 +01:00
parent 1372a8b782
commit cc8ac60713
15 changed files with 7 additions and 296 deletions

View File

@ -42,12 +42,12 @@
class PUserFcnBase : public TObject
{
public:
PUserFcnBase();
virtual ~PUserFcnBase();
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(std::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 Bool_t NeedGlobalPart() const { return false; } ///< if a user function needs a global part this function should return true, otherwise false (default: false)
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) {} ///< 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 { return false; } ///< if a user function is using a global part, this function returns if the global object part is valid (default: false)
virtual Double_t operator()(Double_t t, const std::vector<Double_t> &param) const = 0;