correct handling of dictionary handling
This commit is contained in:
parent
b4c70d2d4e
commit
7458f000a8
@ -54,19 +54,19 @@ short term:
|
||||
|
||||
* something is strange with the coordinate system in TPaveText! **CHECK**
|
||||
|
||||
* something is wrong with lifetimecorrection plot of musrview (up shifted data) **DONE** 08-05-16
|
||||
* something is wrong with lifetimecorrection plot of musrview (up shifted data) **FIXED** 08-05-16
|
||||
|
||||
|
||||
---------------------
|
||||
intermediate term:
|
||||
---------------------
|
||||
|
||||
* implement access to user-function, i.e. functions not
|
||||
* start writing docu, i.e. transferring WKM doc from German -> English and
|
||||
describe new features with examples!
|
||||
* introduce error numbers with corresponding docu/explanation in the latex-docu.
|
||||
* implement RRF stuff
|
||||
* implement NonMuSR stuff
|
||||
* implement access to user-function, i.e. functions not
|
||||
defined within musrfit, using the ROOT dictionary feature
|
||||
to look for them and use them.
|
||||
* think about if it is worth to modify wkm in order to read
|
||||
|
@ -124,11 +124,11 @@ $(OBJS): %.o: %.cpp
|
||||
MuSR_td_PSI_bin.o: ../external/MuSR_software/Class_MuSR_PSI/MuSR_td_PSI_bin.cpp
|
||||
$(CXX) $(INCLUDES) $(CXXFLAGS) -c ../external/MuSR_software/Class_MuSR_PSI/MuSR_td_PSI_bin.cpp
|
||||
|
||||
PStartupHandlerDict.cpp: ../include/PStartupHandler.h
|
||||
PStartupHandlerDict.cpp: ../include/PStartupHandler.h ../include/PStartupHandlerLinkDef.h
|
||||
@echo "Generating dictionary $@..."
|
||||
rootcint -f $@ -c -p $^
|
||||
|
||||
PMusrCanvasDict.cpp: ../include/PMusrCanvas.h
|
||||
PMusrCanvasDict.cpp: ../include/PMusrCanvas.h ../include/PMusrCanvasLinkDef.h
|
||||
@echo "Generating dictionary $@..."
|
||||
rootcint -v -f $@ -c -p $^
|
||||
|
||||
|
@ -254,12 +254,21 @@ PTheory::PTheory(PMsrHandler *msrInfo, unsigned int runNo, const bool hasParent)
|
||||
MakeCleanAndTidyTheoryBlock(fullTheoryBlock);
|
||||
}
|
||||
|
||||
// check if user function, if so, check if it is reachable (root)
|
||||
// check if user function, if so, check if it is reachable (root) and if yes invoke object
|
||||
if (!fUserFcnClassName.IsWhitespace()) {
|
||||
cout << endl << ">> user function class name: " << fUserFcnClassName.Data() << endl;
|
||||
if (!TClass::GetDict(fUserFcnClassName.Data())) {
|
||||
cout << endl << "**ERROR**: PTheory: user function class '" << fUserFcnClassName.Data() << "' not found. See line no " << line->fLineNo;
|
||||
fValid = false;
|
||||
} else { // invoke user function object
|
||||
fUserFcn = 0;
|
||||
fUserFcn = TClass::GetClass(fUserFcnClassName.Data())->New();
|
||||
cout << endl << ">> fUserFcn = " << fUserFcn;
|
||||
if (fUserFcn == 0) {
|
||||
cout << endl << "**ERROR**: PTheory: user function object could not be invoked. See line no " << line->fLineNo;
|
||||
fValid = false;
|
||||
} else { // get the pointer to the user function evaluation routine
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,6 +305,12 @@ PTheory::~PTheory()
|
||||
delete fStaticKTLFFunc;
|
||||
fStaticKTLFFunc = 0;
|
||||
}
|
||||
|
||||
if (fUserFcn) {
|
||||
/*
|
||||
fUserFcn = 0;
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
@ -140,16 +140,4 @@ class PMusrCanvas : public TObject, public TQObject
|
||||
ClassDef(PMusrCanvas, 1)
|
||||
};
|
||||
|
||||
// root dictionary stuff --------------------------------------------------
|
||||
#ifdef __CINT__
|
||||
|
||||
#pragma link off all globals;
|
||||
#pragma link off all classes;
|
||||
#pragma link off all functions;
|
||||
|
||||
#pragma link C++ class PMusrCanvas+;
|
||||
|
||||
#endif
|
||||
// root dictionary stuff --------------------------------------------------
|
||||
|
||||
#endif // _PMUSRCANVAS_H_
|
||||
|
41
src/include/PMusrCanvasLinkDef.h
Normal file
41
src/include/PMusrCanvasLinkDef.h
Normal file
@ -0,0 +1,41 @@
|
||||
/***************************************************************************
|
||||
|
||||
PMusrCanvasLinkDef.h
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
$Id$
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef __CINT__
|
||||
|
||||
#pragma link off all globals;
|
||||
#pragma link off all classes;
|
||||
#pragma link off all functions;
|
||||
|
||||
#pragma link C++ class PMusrCanvas+;
|
||||
|
||||
#endif
|
||||
|
@ -57,7 +57,7 @@ class PStartupHandler : public TObject, public TQObject
|
||||
virtual void OnCdataBlock(const char*, Int_t); // SLOT
|
||||
|
||||
virtual void CheckLists();
|
||||
|
||||
|
||||
virtual const PStringVector GetDataPathList() const { return fDataPathList; }
|
||||
virtual const PIntVector GetMarkerList() const { return fMarkerList; }
|
||||
virtual const PIntVector GetColorList() const { return fColorList; }
|
||||
@ -75,17 +75,5 @@ class PStartupHandler : public TObject, public TQObject
|
||||
ClassDef(PStartupHandler, 1)
|
||||
};
|
||||
|
||||
// root dictionary stuff --------------------------------------------------
|
||||
#ifdef __CINT__
|
||||
|
||||
#pragma link off all globals;
|
||||
#pragma link off all classes;
|
||||
#pragma link off all functions;
|
||||
|
||||
#pragma link C++ class PStartupHandler+;
|
||||
|
||||
#endif
|
||||
// root dictionary stuff --------------------------------------------------
|
||||
|
||||
#endif // _PSTARTUPHANDLER_H_
|
||||
|
||||
|
40
src/include/PStartupHandlerLinkDef.h
Normal file
40
src/include/PStartupHandlerLinkDef.h
Normal file
@ -0,0 +1,40 @@
|
||||
/***************************************************************************
|
||||
|
||||
PStartupHandlerLinkDef.h
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
$Id$
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007 by Andreas Suter *
|
||||
* andreas.suter@psi.c *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef __CINT__
|
||||
|
||||
#pragma link off all globals;
|
||||
#pragma link off all classes;
|
||||
#pragma link off all functions;
|
||||
|
||||
#pragma link C++ class PStartupHandler+;
|
||||
|
||||
#endif
|
@ -214,7 +214,8 @@ class PTheory
|
||||
// TString fUserFunPreParsed;
|
||||
TF1 *fStaticKTLFFunc;
|
||||
|
||||
TString fUserFcnClassName; ///< name of the user function class for within root
|
||||
TString fUserFcnClassName; ///< name of the user function class for within root
|
||||
void *fUserFcn; ///< pointer to the user function object
|
||||
|
||||
PMsrHandler *fMsrInfo;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user