Dear rooters,
Happy new year to everyone, and best wished for 2019. Now this is probably a stupid question, but i am trying to create a TFitResultPtr object. Now I know this is actually behaving like a smart pointer (it will take care of tidying up and deleting). Nevertheless, what I would like to do is to create the object in advance and assign it later in the function with respect to external options (eg changing the type of fits and fit options but keeping the pointer always the sane). Although there is a constructor:
TFitResultPtr(int status = -1): fStatus(status), fPointer(0) {};
I cannot seem to be able to create an empty TFitReulstPtr and assign it later, neither in CINT or ACLIC. In particular in CINT i am getting:
Error: Can’t call TFitResultPtr::TFitResultPtr((class TFitResultPtr*)0x311f780) in current scope (tmpfile)(1)
Possible candidates are…
(in TFitResultPtr)
C:\root\bin\libHist.dll -1:-1 0 public: TFitResultPtr TFitResultPtr::TFitResultPtr(int status=-1);
C:\root\bin\libHist.dll -1:-1 0 public: TFitResultPtr TFitResultPtr::TFitResultPtr(TFitResult* p);
C:\root\bin\libHist.dll -1:-1 0 public: TFitResultPtr TFitResultPtr::TFitResultPtr(const TFitResultPtr& rhs);
*** Interpreter error recovered ***
and while compiling in ACLIC:
C:/Users/Luminociter/Desktop/HGTDUtils/Root/HGTDfITS.cxx(78): error C2440: ‘initialisation’ : impossible de convertir de ‘TFitResultPtr *’ en ‘TFitResultPtr’
C:/Users/Luminociter/Desktop/HGTDUtils/Root/HGTDfITS.cxx(78): note: Aucun constructeur n’a pu prendre le type de source, ou la résolution de la surcharge du constructeur était ambiguë
Error in : Compilation failed!
I am trying to create the object the standard way: TFitResultPtr fitResult = new TFitResultPtr();
What am i missing in this case?
Thanks a lot!!!