correct handling of dictionary handling

This commit is contained in:
nemu
2008-05-29 14:41:33 +00:00
parent b4c70d2d4e
commit 7458f000a8
8 changed files with 104 additions and 31 deletions

View File

@ -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 $^

View File

@ -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;
*/
}
}
//--------------------------------------------------------------------------