content is missing!";
+ fIsValid = false;
+ OnError(err.c_str());
+ }
+ if (fTrimSpDataEnergyList.size()==0) {
+ std::string err = "no implantation energies present!";
+ fIsValid = false;
+ OnError(err.c_str());
+ }
+}
+
+//--------------------------------------------------------------------------
+// OnStartElement
+//--------------------------------------------------------------------------
+/**
+ * Called when a XML start element is found. Filters out the needed elements
+ * and sets a proper key.
+ *
+ * \param str XML element name
+ * \param attributes not used
+ */
+void PXmlRgeHandler::OnStartElement(const Char_t *str, const TList *attributes)
+{
+ if (!strcmp(str, "trim_sp")) {
+ isTrimSp=true;
+ } else if (!strcmp(str, "data_path") && isTrimSp) {
+ fKey = eDataPath;
+ } else if (!strcmp(str, "rge_fln_pre") && isTrimSp) {
+ fKey = eFlnPre;
+ } else if (!strcmp(str, "energy") && isTrimSp) {
+ fKey = eEnergy;
+ }
+}
+
+//--------------------------------------------------------------------------
+// OnEndElement
+//--------------------------------------------------------------------------
+/**
+ *
Called when a XML end element is found. Resets the handler key.
+ *
+ * \param str not used
+ */
+void PXmlRgeHandler::OnEndElement(const Char_t *str)
+{
+ if (!strcmp(str, "trim_sp")) {
+ isTrimSp=false;
+ }
+
+ fKey = eEmpty;
+}
+
+//--------------------------------------------------------------------------
+// OnCharacters
+//--------------------------------------------------------------------------
+/**
+ *
Content of a given XML element. Filters out the data and feeds them to
+ * the internal variables.
+ *
+ * \param str XML element string
+ */
+void PXmlRgeHandler::OnCharacters(const Char_t *str)
+{
+ int ival;
+ std::string msg(""), sstr(str);
+ size_t pos;
+
+ switch(fKey) {
+ case eDataPath:
+ fTrimSpDataPath=str;
+ break;
+ case eFlnPre:
+ fTrimSpFlnPre=str;
+ break;
+ case eEnergy:
+ try {
+ ival = std::stoi(str, &pos);
+ } catch(std::invalid_argument& e) {
+ fIsValid = false;
+ msg = "The found energy '" + sstr + "' which is not a number";
+ OnError(msg.c_str());
+ } catch(std::out_of_range& e) {
+ fIsValid = false;
+ msg = "The found energy '" + sstr + "' which is out-of-range.";
+ OnError(msg.c_str());
+ } catch(...) {
+ fIsValid = false;
+ msg = "The found energy '" + sstr + "' which generates an error.";
+ OnError(msg.c_str());
+ }
+ if (pos != sstr.length()) {
+ fIsValid = false;
+ msg = "The found energy '" + sstr + "' which is not an integer";
+ OnError(msg.c_str());
+ }
+ fTrimSpDataEnergyList.push_back(ival);
+ break;
+ default:
+ break;
+ }
+}
+
+//--------------------------------------------------------------------------
+// OnComment
+//--------------------------------------------------------------------------
+/**
+ *
Called when a XML comment is found. Not used.
+ *
+ * \param str not used.
+ */
+void PXmlRgeHandler::OnComment(const Char_t *str)
+{
+ // nothing to be done for now
+}
+
+//--------------------------------------------------------------------------
+// OnWarning
+//--------------------------------------------------------------------------
+/**
+ *
Called when the XML parser emits a warning.
+ *
+ * \param str warning string
+ */
+void PXmlRgeHandler::OnWarning(const Char_t *str)
+{
+ std::cerr << std::endl << "PXmlRgeHandler **WARNING** " << str;
+ std::cerr << std::endl;
+}
+
+//--------------------------------------------------------------------------
+// OnError
+//--------------------------------------------------------------------------
+/**
+ *
Called when the XML parser emits an error.
+ *
+ * \param str error string
+ */
+void PXmlRgeHandler::OnError(const Char_t *str)
+{
+ std::cerr << std::endl << "PXmlRgeHandler **ERROR** " << str;
+ std::cerr << std::endl;
+}
+
+//--------------------------------------------------------------------------
+// OnFatalError
+//--------------------------------------------------------------------------
+/**
+ *
Called when the XML parser emits a fatal error.
+ *
+ * \param str fatal error string
+ */
+void PXmlRgeHandler::OnFatalError(const Char_t *str)
+{
+ std::cerr << std::endl << "PXmlRgeHandler **FATAL ERROR** " << str;
+ std::cerr << std::endl;
+}
+
+//--------------------------------------------------------------------------
+// OnCdataBlock
+//--------------------------------------------------------------------------
+/**
+ *
Not used.
+ *
+ * \param str not used
+ * \param len not used
+ */
+void PXmlRgeHandler::OnCdataBlock(const Char_t *str, Int_t len)
+{
+ // nothing to be done for now
+}
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+ClassImp(PRgeHandler)
+
+//--------------------------------------------------------------------------
+// Ctor
+//--------------------------------------------------------------------------
+/**
+ * @brief PRgeHandler::PRgeHandler
+ * @param fln
+ */
+PRgeHandler::PRgeHandler(const std::string fln)
+{
+ // make sure there is an xml-startup file name
+ if (fln.empty()) { // fln not given
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** NO xml file name provided." << std::endl;
+ std::cerr << std::endl;
+ fValid=false;
+ return;
+ }
+
+ // read the startup xml-file to extract the necessary rge infos.
+ if (!boost::filesystem::exists(fln)) {
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** xml file named: " << fln << " does not exist." << std::endl;
+ std::cerr << std::endl;
+ fValid=false;
+ return;
+ }
+
+ // create the rge xml handler
+ PXmlRgeHandler *xmlRge = new PXmlRgeHandler();
+ if (xmlRge == nullptr) {
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** couldn't invoke PXmlRgeHandler." << std::endl;
+ std::cerr << std::endl;
+ fValid=false;
+ return;
+ }
+
+ // create the SAX parser
+ TSAXParser *saxParser = new TSAXParser();
+ if (saxParser == nullptr) {
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** couldn't invoke TSAXParser." << std::endl;
+ std::cerr << std::endl;
+ fValid=false;
+ return;
+ }
+ saxParser->SetStopOnError();
+
+ // connect SAX parser and rge handler
+ saxParser->ConnectToHandler("PXmlRgeHandler", xmlRge);
+ int status = saxParser->ParseFile(fln.c_str());
+ if (status != 0) {
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** parsing the xml-file: " << fln << "." << std::endl;
+ std::cerr << std::endl;
+ fValid=false;
+ return;
+ }
+ if (xmlRge->IsValid())
+ fValid = true;
+ else
+ fValid = false;
+
+ // read the rge-file(s) content if everything went fine so far
+ std::string rgeFln;
+ PRgeData dataSet;
+ if (fValid) {
+ const PIntVector energy = xmlRge->GetTrimSpDataVectorList();
+ for (int i=0; iGetTrimSpDataPath();
+ if (rgeFln[rgeFln.size()-1] != '/')
+ rgeFln += "/";
+ rgeFln += xmlRge->GetTrimSpFlnPre();
+ rgeFln += std::to_string(energy[i]);
+ rgeFln += ".rge";
+ if (!boost::filesystem::exists(rgeFln)) {
+ fValid = false;
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** rge-file: " << rgeFln << " not found." << std::endl;
+ std::cerr << std::endl;
+ break;
+ }
+ // init data set
+ dataSet.energy = energy[i];
+ dataSet.depth.clear();
+ dataSet.amplitude.clear();
+ if (!ReadRgeFile(rgeFln, dataSet)) {
+ fValid = false;
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** read error in rge-file: " << rgeFln << " not found." << std::endl;
+ std::cerr << std::endl;
+ break;
+ }
+
+ // get the total number of particles
+ double tot=0.0;
+ for (int j=0; jRead the content of a rge-file.
+ *
+ * @param fln file name of the rge-file
+ * @return true on success.
+ */
+bool PRgeHandler::ReadRgeFile(const std::string fln, PRgeData &data)
+{
+ std::ifstream fin(fln);
+ if (!fin.is_open())
+ return false;
+
+ std::string line, msg;
+ std::vector tok;
+ Double_t zz, nn;
+ size_t pos;
+ int lineNo=0;
+
+ while (fin.good() && fValid) {
+ std::getline(fin, line);
+ lineNo++;
+ boost::algorithm::trim(line);
+ if (line.empty())
+ continue;
+ if (!std::isdigit(line[0]))
+ continue;
+ tok.clear();
+ boost::algorithm::split(tok, line, boost::algorithm::is_any_of(" \t"), boost::algorithm::token_compress_on);
+ if (tok.size() != 2) {
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** in rge-file: " << fln << ", unexpected number of tokens (" << tok.size() << ")." << std::endl;
+ std::cerr << std::endl;
+ fin.close();
+ return false;
+ }
+ // check distance
+ try {
+ zz = std::stod(tok[0], &pos);
+ } catch(std::invalid_argument& e) {
+ fValid = false;
+ msg = "The found depth '" + tok[0] + "' which is not a number";
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
+ std::cerr << " " << msg << std::endl;
+ std::cerr << std::endl;
+ } catch(std::out_of_range& e) {
+ fValid = false;
+ msg = "The found depth '" + tok[0] + "' which is out-of-range.";
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
+ std::cerr << " " << msg << std::endl;
+ std::cerr << std::endl;
+ } catch(...) {
+ fValid = false;
+ msg = "The found depth '" + tok[0] + "' which generates an error.";
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
+ std::cerr << " " << msg << std::endl;
+ std::cerr << std::endl;
+ }
+ if (pos != tok[0].length()) {
+ fValid = false;
+ msg = "The found depth '" + tok[0] + "' which is not an number.";
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
+ std::cerr << " " << msg << std::endl;
+ std::cerr << std::endl;
+ }
+ // check number of implanted particles
+ try {
+ nn = std::stod(tok[1], &pos);
+ } catch(std::invalid_argument& e) {
+ fValid = false;
+ msg = "The found #particles '" + tok[1] + "' which is not a number";
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
+ std::cerr << " " << msg << std::endl;
+ std::cerr << std::endl;
+ } catch(std::out_of_range& e) {
+ fValid = false;
+ msg = "The found #particles '" + tok[1] + "' which is out-of-range.";
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
+ std::cerr << " " << msg << std::endl;
+ std::cerr << std::endl;
+ } catch(...) {
+ fValid = false;
+ msg = "The found #particles '" + tok[1] + "' which generates an error.";
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
+ std::cerr << " " << msg << std::endl;
+ std::cerr << std::endl;
+ }
+ if (pos != tok[1].length()) {
+ fValid = false;
+ msg = "The found #particles '" + tok[1] + "' which is not an integer.";
+ std::cerr << std::endl;
+ std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
+ std::cerr << " " << msg << std::endl;
+ std::cerr << std::endl;
+ }
+ data.depth.push_back(zz/10.0); // distance in nm
+ data.amplitude.push_back(nn);
+ }
+
+ fin.close();
+
+ return true;
+}
+
+//--------------------------------------------------------------------------
+// GetZmax via energy
+//--------------------------------------------------------------------------
+/**
+ * Get maximal depth for a given energy.
+ *
+ * @param energy energy in (eV)
+ * @return zMax if energy is found, -1 otherwise.
+ */
+Double_t PRgeHandler::GetZmax(const Double_t energy)
+{
+ int idx=-1;
+ for (int i=0; iGet maximal depth for a given index.
+ *
+ * @param idx index for which zMax is requested.
+ * @return zMax if idx is in range, -1 otherwise.
+ */
+Double_t PRgeHandler::GetZmax(const Int_t idx)
+{
+ if ((idx < 0) || (idx >= fData.size()))
+ return -1.0;
+
+ return fData[idx].depth[fData[idx].depth.size()-1];
+}
+
+//--------------------------------------------------------------------------
+// Get_n via energy
+//--------------------------------------------------------------------------
+/**
+ * Get the normalized n(E,z) value.
+ *
+ * @param energy (eV)
+ * @param z (nm)
+ * @return n(E,z) if energy and z are in proper range, -1.0 otherwise.
+ */
+Double_t PRgeHandler::Get_n(const Double_t energy, const Double_t z)
+{
+ int idx=-1;
+ for (int i=0; iGet the normalized n(idx,z) value.
+ *
+ * @param idx index of the rge-dataset
+ * @param z (nm)
+ * @return n(idx,z) if idx and z are in proper range, -1.0 otherwise.
+ */
+Double_t PRgeHandler::Get_n(const Int_t idx, const Double_t z)
+{
+ if ((idx < 0) || (idx >= fData.size()))
+ return 0.0;
+
+ if ((z < 0.0) || (z > GetZmax(idx)))
+ return 0.0;
+
+ int pos=0;
+ for (int i=0; iGet the energy index by providing an energy in (eV).
+ *
+ * @param energy in (eV).
+ * @return energy index if energy was found, -1 otherwise.
+ */
+Int_t PRgeHandler::GetEnergyIndex(const Double_t energy)
+{
+ int idx=-1;
+ for (int i=0; iGetDataBin(histoNo[0])->size();
+ UInt_t size = runData->GetDataBin(histoNo[0])->size()/packing;
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
diff --git a/src/classes/PRunSingleHisto.cpp b/src/classes/PRunSingleHisto.cpp
index 6aab2152..72c8c17e 100644
--- a/src/classes/PRunSingleHisto.cpp
+++ b/src/classes/PRunSingleHisto.cpp
@@ -1315,7 +1315,7 @@ Bool_t PRunSingleHisto::PrepareViewData(PRawRunData* runData, const UInt_t histo
// calculate theory
Double_t theoryValue;
- UInt_t size = fForward.size();
+ UInt_t size = fForward.size()/packing;
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
UInt_t rebinRRF = 0;
diff --git a/src/external/MagProximity/CMakeLists.txt b/src/external/MagProximity/CMakeLists.txt
index 2e09a573..9da18aa6 100644
--- a/src/external/MagProximity/CMakeLists.txt
+++ b/src/external/MagProximity/CMakeLists.txt
@@ -38,7 +38,6 @@ configure_file("PMagProximityFitter.pc.in" "PMagProximityFitter.pc" @ONLY)
add_library(PMagProximityFitter SHARED
PMagProximityFitter.cpp
PMagProximityFitterDict.cxx
- PMPRgeHandler.cpp
PMPStartupHandler.cpp
PMPStartupHandlerDict.cxx
)
@@ -57,7 +56,7 @@ set_target_properties(PMagProximityFitter
)
#--- add library dependencies -------------------------------------------------
-target_link_libraries(PMagProximityFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase)
+target_link_libraries(PMagProximityFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
#--- install PMagProximityFitter solib ----------------------------------------
install(TARGETS PMagProximityFitter DESTINATION lib)
@@ -76,7 +75,6 @@ install(
FILES
PMagProximity.h
PMagProximityFitter.h
- PMPRgeHandler.h
PMPStartupHandler.h
DESTINATION
include
diff --git a/src/external/MagProximity/PMPRgeHandler.cpp b/src/external/MagProximity/PMPRgeHandler.cpp
deleted file mode 100644
index fad7a898..00000000
--- a/src/external/MagProximity/PMPRgeHandler.cpp
+++ /dev/null
@@ -1,212 +0,0 @@
-/***************************************************************************
-
- PMPRgeHandler.cpp
-
- Author: Andreas Suter
- e-mail: andreas.suter@psi.ch
-
-***************************************************************************/
-
-/***************************************************************************
- * Copyright (C) 2011-2021 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. *
- ***************************************************************************/
-
-#include
-
-#include
-#include
-
-#include "PMPRgeHandler.h"
-
-//--------------------------------------------------------------------------
-// Constructor
-//--------------------------------------------------------------------------
-/**
- *
- */
-PMPRgeHandler::PMPRgeHandler(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
-{
- fIsValid = false;
-
- fIsValid = LoadRgeData(rgeDataPathList, rgeDataEnergyList);
-}
-
-//--------------------------------------------------------------------------
-// Destructor
-//--------------------------------------------------------------------------
-/**
- *
- */
-PMPRgeHandler::~PMPRgeHandler()
-{
- fRgeDataList.clear();
-}
-
-//--------------------------------------------------------------------------
-// GetRgeEnergyIndex
-//--------------------------------------------------------------------------
-/**
- *
- * \param energy in (keV)
- */
-Int_t PMPRgeHandler::GetRgeEnergyIndex(const Double_t energy)
-{
- Int_t idx = -1;
-
- for (UInt_t i=0; i(dist/(fRgeDataList[index].stoppingDistance[1]-fRgeDataList[index].stoppingDistance[0]));
-
- if (distIdx >= fRgeDataList[index].stoppingDistance.size()) {
- rgeVal = 0.0;
- } else {
- rgeVal = fRgeDataList[index].stoppingAmplitude[distIdx] +
- (fRgeDataList[index].stoppingAmplitude[distIdx+1] - fRgeDataList[index].stoppingAmplitude[distIdx]) *
- (dist-fRgeDataList[index].stoppingDistance[distIdx])/(fRgeDataList[index].stoppingDistance[distIdx+1]-fRgeDataList[index].stoppingDistance[distIdx]);
- }
-
- return rgeVal;
-}
-
-//--------------------------------------------------------------------------
-// GetRgeValue
-//--------------------------------------------------------------------------
-/**
- *
- * \param energy in (keV)
- * \param dist in (nm)
- */
-Double_t PMPRgeHandler::GetRgeValue(const Double_t energy, const Double_t dist)
-{
- // check if energy is present in rge data list
- Int_t idx = -1;
-
- for (UInt_t i=0; iGetTrimSpDataPathList(), fStartupHandler->GetTrimSpDataVectorList());
+ fRgeHandler = new PRgeHandler();
if (!fRgeHandler->IsValid()) {
std::cout << std::endl << ">> PMagProximityFitterGlobal::PMagProximityFitterGlobal **PANIC ERROR**";
std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
diff --git a/src/external/MagProximity/PMagProximityFitter.h b/src/external/MagProximity/PMagProximityFitter.h
index cdcce124..fdd34d63 100644
--- a/src/external/MagProximity/PMagProximityFitter.h
+++ b/src/external/MagProximity/PMagProximityFitter.h
@@ -32,7 +32,7 @@
#include "PUserFcnBase.h"
#include "PMPStartupHandler.h"
-#include "PMPRgeHandler.h"
+#include "PRgeHandler.h"
class PMagProximityFitterGlobal
{
@@ -42,15 +42,15 @@ class PMagProximityFitterGlobal
Bool_t IsValid() { return fValid; }
virtual void CalculateField(const std::vector ¶m) const;
- virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetRgeEnergyIndex(energy); }
- virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->GetRgeValue(energyIndex, z); }
+ virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetEnergyIndex(energy); }
+ virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->Get_n(energyIndex, z); }
virtual Double_t GetMagneticField(const Double_t z) const;
private:
Bool_t fValid;
PMPStartupHandler *fStartupHandler;
- PMPRgeHandler *fRgeHandler;
+ PRgeHandler *fRgeHandler;
mutable std::vector fPreviousParam;
diff --git a/src/external/MagProximity/mag_proximity_startup.xml b/src/external/MagProximity/mag_proximity_startup.xml
index d23326f3..402ac07e 100644
--- a/src/external/MagProximity/mag_proximity_startup.xml
+++ b/src/external/MagProximity/mag_proximity_startup.xml
@@ -3,13 +3,14 @@
contains meta file infromation of the needed trim.sp files.
-
- /mnt/home/nemu/analysis/2010/EuS-Co/trimsp2/EuS-Co_E
+
+ /afs/psi.ch/project/nemu/analysis/2010/EuS-Co/trimsp2
+ EuS-Co_E
5030
6330
7530
8730
-
+
diff --git a/src/external/Nonlocal/CMakeLists.txt b/src/external/Nonlocal/CMakeLists.txt
index f28725cd..d35d5c41 100644
--- a/src/external/Nonlocal/CMakeLists.txt
+++ b/src/external/Nonlocal/CMakeLists.txt
@@ -36,7 +36,7 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\$\{prefix\}")
set(libdir "\$\{exec_prefix\}/lib")
set(includedir "\$\{prefix\}/include")
-set(PNL_PIPPARDFITTER_VERSION "1.0.0")
+set(PNL_PIPPARDFITTER_VERSION "1.1.0")
set(PNL_PIPPARDFITTER_LIBRARY_NAME "PNL_PippardFitter")
configure_file("PNL_PippardFitter.pc.in" "PNL_PippardFitter.pc" @ONLY)
@@ -44,7 +44,6 @@ configure_file("PNL_PippardFitter.pc.in" "PNL_PippardFitter.pc" @ONLY)
add_library(PNL_PippardFitter SHARED
PNL_PippardFitter.cpp
PNL_PippardFitterDict.cxx
- PNL_RgeHandler.cpp
PNL_StartupHandler.cpp
PNL_StartupHandlerDict.cxx
)
@@ -63,7 +62,7 @@ set_target_properties(PNL_PippardFitter
)
#--- add library dependencies -------------------------------------------------
-target_link_libraries(PNL_PippardFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase)
+target_link_libraries(PNL_PippardFitter ${Boost_LIBRARIES} ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
#--- install PNL_PippardFitter solib ------------------------------------------
install(TARGETS PNL_PippardFitter DESTINATION lib)
@@ -80,9 +79,7 @@ install(
#--- install PNL_PippardFitter header -----------------------------------------
install(
FILES
- PNonlocal.h
PNL_PippardFitter.h
- PNL_RgeHandler.h
PNL_StartupHandler.h
DESTINATION
include
diff --git a/src/external/Nonlocal/PNL_PippardFitter.cpp b/src/external/Nonlocal/PNL_PippardFitter.cpp
index 290145a9..7a751332 100644
--- a/src/external/Nonlocal/PNL_PippardFitter.cpp
+++ b/src/external/Nonlocal/PNL_PippardFitter.cpp
@@ -31,7 +31,6 @@
#include
#include
-using namespace std;
#include
#include
@@ -51,10 +50,6 @@ ClassImp(PNL_PippardFitterGlobal)
*/
PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
{
- fValid = true;
- fStartupHandler = 0;
- fRgeHandler = 0;
-
// read XML startup file
char startup_path_name[128];
TSAXParser *saxParser = new TSAXParser();
@@ -67,8 +62,8 @@ PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
Int_t status = parseXmlFile(saxParser, startup_path_name);
// check for parse errors
if (status) { // error
- cout << endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal: **WARNING** Reading/parsing nonlocal_startup.xml failed.";
- cout << endl;
+ std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal: **WARNING** Reading/parsing nonlocal_startup.xml failed.";
+ std::cout << std::endl;
fValid = false;
}
@@ -80,20 +75,20 @@ PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
// check if everything went fine with the startup handler
if (!fStartupHandler->IsValid()) {
- cout << endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
- cout << endl << ">> startup handler too unhappy. Will terminate unfriendly, sorry.";
- cout << endl;
+ std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
+ std::cout << std::endl << ">> startup handler too unhappy. Will terminate unfriendly, sorry.";
+ std::cout << std::endl;
fValid = false;
}
fFourierPoints = fStartupHandler->GetFourierPoints();
// load all the TRIM.SP rge-files
- fRgeHandler = new PNL_RgeHandler(fStartupHandler->GetTrimSpDataPathList(), fStartupHandler->GetTrimSpDataVectorList());
+ fRgeHandler = new PRgeHandler("./nonlocal_startup.xml");
if (!fRgeHandler->IsValid()) {
- cout << endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
- cout << endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
- cout << endl;
+ std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
+ std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
+ std::cout << std::endl;
fValid = false;
}
@@ -182,16 +177,16 @@ void PNL_PippardFitterGlobal::CalculateField(const std::vector ¶m)
if (fFieldq == 0) {
fFieldq = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * fFourierPoints);
if (fFieldq == 0) {
- cout << endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldq";
- cout << endl;
+ std::cout << std::endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldq";
+ std::cout << std::endl;
return;
}
}
if (fFieldB == 0) {
fFieldB = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * fFourierPoints);
if (fFieldB == 0) {
- cout << endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldB";
- cout << endl;
+ std::cout << std::endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldB";
+ std::cout << std::endl;
return;
}
}
@@ -349,19 +344,6 @@ Double_t PNL_PippardFitterGlobal::XiP_T(const Double_t xi0, const Double_t meanF
ClassImp(PNL_PippardFitter)
-//--------------------------------------------------------------------------
-// Constructor
-//--------------------------------------------------------------------------
-/**
- *
- */
-PNL_PippardFitter::PNL_PippardFitter()
-{
- fValid = false;
- fInvokedGlobal = false;
- fPippardFitterGlobal = 0;
-}
-
//--------------------------------------------------------------------------
// Destructor
//--------------------------------------------------------------------------
@@ -387,18 +369,18 @@ PNL_PippardFitter::~PNL_PippardFitter()
* \param globalPart
* \param idx
*/
-void PNL_PippardFitter::SetGlobalPart(vector &globalPart, UInt_t idx)
+void PNL_PippardFitter::SetGlobalPart(std::vector &globalPart, UInt_t idx)
{
fIdxGlobal = static_cast(idx);
if ((Int_t)globalPart.size() <= fIdxGlobal) {
fPippardFitterGlobal = new PNL_PippardFitterGlobal();
- if (fPippardFitterGlobal == 0) {
+ if (fPippardFitterGlobal == nullptr) {
fValid = false;
- cerr << endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** Couldn't invoke global user function object, sorry ..." << endl;
+ std::cerr << std::endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** Couldn't invoke global user function object, sorry ..." << std::endl;
} else if (!fPippardFitterGlobal->IsValid()) {
fValid = false;
- cerr << endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** initialization of global user function object failed, sorry ..." << endl;
+ std::cerr << std::endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** initialization of global user function object failed, sorry ..." << std::endl;
} else {
fValid = true;
fInvokedGlobal = true;
@@ -447,7 +429,7 @@ Double_t PNL_PippardFitter::operator()(Double_t t, const std::vector &
fPippardFitterGlobal->CalculateField(param);
Int_t energyIndex = fPippardFitterGlobal->GetEnergyIndex(param[0]);
if (energyIndex == -1) { // energy not found
- cerr << endl << ">> PNL_PippardFitter::operator() energy " << param[0] << " not found. Will terminate." << endl;
+ std::cerr << std::endl << ">> PNL_PippardFitter::operator() energy " << param[0] << " not found. Will terminate." << std::endl;
assert(0);
}
diff --git a/src/external/Nonlocal/PNL_PippardFitter.h b/src/external/Nonlocal/PNL_PippardFitter.h
index b4ac7f9e..c026f908 100644
--- a/src/external/Nonlocal/PNL_PippardFitter.h
+++ b/src/external/Nonlocal/PNL_PippardFitter.h
@@ -36,9 +36,10 @@
//#endif
#include
+#include "PMusr.h"
#include "PUserFcnBase.h"
#include "PNL_StartupHandler.h"
-#include "PNL_RgeHandler.h"
+#include "PRgeHandler.h"
class PNL_PippardFitterGlobal
{
@@ -49,15 +50,15 @@ class PNL_PippardFitterGlobal
Bool_t IsValid() { return fValid; }
virtual void SetTempExponent(const Double_t nn) { f_nn = nn; }
virtual void CalculateField(const std::vector ¶m) const;
- virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetRgeEnergyIndex(energy); }
- virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->GetRgeValue(energyIndex, z); }
+ virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetEnergyIndex(energy); }
+ virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->Get_n(energyIndex, z); }
virtual Double_t GetMagneticField(const Double_t z) const;
private:
- Bool_t fValid;
+ Bool_t fValid{true};
- PNL_StartupHandler *fStartupHandler;
- PNL_RgeHandler *fRgeHandler;
+ PNL_StartupHandler *fStartupHandler{nullptr};
+ PRgeHandler *fRgeHandler{nullptr};
mutable std::vector fPreviousParam;
@@ -85,21 +86,21 @@ class PNL_PippardFitterGlobal
class PNL_PippardFitter : public PUserFcnBase
{
public:
- PNL_PippardFitter();
+ PNL_PippardFitter() {}
virtual ~PNL_PippardFitter();
virtual Bool_t NeedGlobalPart() const { return true; }
- virtual void SetGlobalPart(vector &globalPart, UInt_t idx);
+ virtual void SetGlobalPart(std::vector &globalPart, UInt_t idx);
virtual Bool_t GlobalPartIsValid() const;
virtual Double_t operator()(Double_t t, const std::vector ¶m) const;
private:
- Bool_t fValid;
- Bool_t fInvokedGlobal;
+ Bool_t fValid{true};
+ Bool_t fInvokedGlobal{false};
Int_t fIdxGlobal;
- PNL_PippardFitterGlobal *fPippardFitterGlobal;
+ PNL_PippardFitterGlobal *fPippardFitterGlobal{nullptr};
ClassDef(PNL_PippardFitter, 1)
};
diff --git a/src/external/Nonlocal/PNL_RgeHandler.cpp b/src/external/Nonlocal/PNL_RgeHandler.cpp
deleted file mode 100644
index a08aeb89..00000000
--- a/src/external/Nonlocal/PNL_RgeHandler.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-/***************************************************************************
-
- PNL_RgeHandler.cpp
-
- Author: Andreas Suter
- e-mail: andreas.suter@psi.ch
-
- $Id$
-
-***************************************************************************/
-
-/***************************************************************************
- * Copyright (C) 2009 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. *
- ***************************************************************************/
-
-#include
-
-#include
-#include
-
-#include "PNL_RgeHandler.h"
-
-//--------------------------------------------------------------------------
-// Constructor
-//--------------------------------------------------------------------------
-/**
- *
- */
-PNL_RgeHandler::PNL_RgeHandler(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
-{
- fIsValid = false;
-
- fIsValid = LoadRgeData(rgeDataPathList, rgeDataEnergyList);
-}
-
-//--------------------------------------------------------------------------
-// Destructor
-//--------------------------------------------------------------------------
-/**
- *
- */
-PNL_RgeHandler::~PNL_RgeHandler()
-{
- fRgeDataList.clear();
-}
-
-//--------------------------------------------------------------------------
-// GetRgeEnergyIndex
-//--------------------------------------------------------------------------
-/**
- *
- */
-Int_t PNL_RgeHandler::GetRgeEnergyIndex(const Double_t energy)
-{
- Int_t idx = -1;
-
- for (UInt_t i=0; i dist) {
- distIdx = i-1;
- break;
- }
- }
-
- // get the proper n(z) value
- if (distIdx < 0) {
- rgeVal = 0.0;
- } else {
- rgeVal = fRgeDataList[index].stoppingAmplitude[distIdx] +
- (fRgeDataList[index].stoppingAmplitude[distIdx+1] - fRgeDataList[index].stoppingAmplitude[distIdx]) *
- (dist-fRgeDataList[index].stoppingDistance[distIdx])/(fRgeDataList[index].stoppingDistance[distIdx+1]-fRgeDataList[index].stoppingDistance[distIdx]);
- }
-
- return rgeVal;
-}
-
-//--------------------------------------------------------------------------
-// GetRgeValue
-//--------------------------------------------------------------------------
-/**
- *
- */
-Double_t PNL_RgeHandler::GetRgeValue(const Double_t energy, const Double_t dist)
-{
- // check if energy is present in rge data list
- Int_t idx = -1;
-
- for (UInt_t i=0; i
#include
+#include
+
#include "PNL_StartupHandler.h"
ClassImpQ(PNL_StartupHandler)
@@ -44,46 +46,26 @@ ClassImpQ(PNL_StartupHandler)
*/
PNL_StartupHandler::PNL_StartupHandler()
{
- fIsValid = true;
-
- fStartupFileFound = false;
- fStartupFilePath = "";
-
- fFourierPoints = 0;
- fTrimSpDataPath = TString("");
-
// get default path (for the moment only linux like)
char startup_path_name[512];
char *home_str=0;
// check if the startup file is found in the current directory
strcpy(startup_path_name, "./nonlocal_startup.xml");
- if (StartupFileExists(startup_path_name)) {
+ if (boost::filesystem::exists(startup_path_name)) {
fStartupFileFound = true;
fStartupFilePath = TString(startup_path_name);
} else { // startup file is not found in the current directory
std::cout << std::endl << "PNL_StartupHandler(): **WARNING** Couldn't find nonlocal_startup.xml in the current directory, will try default one." << std::endl;
home_str = getenv("HOME");
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/nonlocal_startup.xml", home_str);
- if (StartupFileExists(startup_path_name)) {
+ if (boost::filesystem::exists(startup_path_name)) {
fStartupFileFound = true;
fStartupFilePath = TString(startup_path_name);
}
}
}
-//--------------------------------------------------------------------------
-// Destructor
-//--------------------------------------------------------------------------
-/**
- *
- */
-PNL_StartupHandler::~PNL_StartupHandler()
-{
- fTrimSpDataPathList.clear();
- fTrimSpDataEnergyList.clear();
-}
-
//--------------------------------------------------------------------------
// OnStartDocument
//--------------------------------------------------------------------------
@@ -124,10 +106,6 @@ void PNL_StartupHandler::OnStartElement(const char *str, const TList *attributes
{
if (!strcmp(str, "fourier_points")) {
fKey = eFourierPoints;
- } else if (!strcmp(str, "data_path")) {
- fKey = eDataPath;
- } else if (!strcmp(str, "energy")) {
- fKey = eEnergy;
}
}
@@ -167,23 +145,6 @@ void PNL_StartupHandler::OnCharacters(const char *str)
std::cout << std::endl;
}
break;
- case eDataPath:
- fTrimSpDataPath = str;
- break;
- case eEnergy:
- tstr = str;
- if (tstr.IsFloat()) {
- fTrimSpDataEnergyList.push_back(tstr.Atof());
- tstr = fTrimSpDataPath;
- tstr += str;
- tstr += ".rge";
- fTrimSpDataPathList.push_back(tstr);
- } else {
- std::cout << std::endl << "PNL_StartupHandler::OnCharacters: **ERROR** when finding energy:";
- std::cout << std::endl << "\"" << str << "\" is not a floating point number, will ignore it and use the default value.";
- std::cout << std::endl;
- }
- break;
default:
break;
}
@@ -257,29 +218,6 @@ void PNL_StartupHandler::OnCdataBlock(const char *str, Int_t len)
// nothing to be done for now
}
-//--------------------------------------------------------------------------
-// StartupFileExists
-//--------------------------------------------------------------------------
-/**
- *
- *
- */
-bool PNL_StartupHandler::StartupFileExists(char *fln)
-{
- bool result = false;
-
- std::ifstream ifile(fln);
-
- if (ifile.fail()) {
- result = false;
- } else {
- result = true;
- ifile.close();
- }
-
- return result;
-}
-
// -------------------------------------------------------------------------
// end
// -------------------------------------------------------------------------
diff --git a/src/external/Nonlocal/PNL_StartupHandler.h b/src/external/Nonlocal/PNL_StartupHandler.h
index e70b0614..ea80c2e2 100644
--- a/src/external/Nonlocal/PNL_StartupHandler.h
+++ b/src/external/Nonlocal/PNL_StartupHandler.h
@@ -5,8 +5,6 @@
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
- $Id$
-
***************************************************************************/
/***************************************************************************
@@ -36,13 +34,11 @@
#include
#include
-#include "PNonlocal.h"
-
class PNL_StartupHandler : public TObject
{
public:
PNL_StartupHandler();
- virtual ~PNL_StartupHandler();
+ virtual ~PNL_StartupHandler() {}
virtual void OnStartDocument(); // SLOT
virtual void OnEndDocument(); // SLOT
@@ -58,26 +54,18 @@ class PNL_StartupHandler : public TObject
virtual bool IsValid() { return fIsValid; }
virtual TString GetStartupFilePath() { return fStartupFilePath; }
virtual const Int_t GetFourierPoints() const { return fFourierPoints; }
- virtual const PStringVector GetTrimSpDataPathList() const { return fTrimSpDataPathList; }
- virtual const PDoubleVector GetTrimSpDataVectorList() const { return fTrimSpDataEnergyList; }
-
virtual bool StartupFileFound() { return fStartupFileFound; }
private:
- enum EKeyWords {eEmpty, eComment, eFourierPoints, eDataPath, eEnergy};
+ enum EKeyWords {eEmpty, eFourierPoints};
EKeyWords fKey;
- bool fIsValid;
+ bool fIsValid{true};
- bool fStartupFileFound;
- TString fStartupFilePath;
+ bool fStartupFileFound{false};
+ TString fStartupFilePath{""};
- Int_t fFourierPoints;
- TString fTrimSpDataPath;
- PStringVector fTrimSpDataPathList;
- PDoubleVector fTrimSpDataEnergyList;
-
- bool StartupFileExists(char *fln);
+ Int_t fFourierPoints{0};
ClassDef(PNL_StartupHandler, 1)
};
diff --git a/src/external/Nonlocal/PNonlocal.h b/src/external/Nonlocal/PNonlocal.h
deleted file mode 100644
index 3a315771..00000000
--- a/src/external/Nonlocal/PNonlocal.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/***************************************************************************
-
- PNonlocal.h
-
- Author: Andreas Suter
- e-mail: andreas.suter@psi.ch
-
-***************************************************************************/
-
-/***************************************************************************
- * Copyright (C) 2009-2021 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. *
- ***************************************************************************/
-
-#ifndef _PNONLOCAL_H_
-#define _PNONLOCAL_H_
-
-#include
-
-#include
-
-//-------------------------------------------------------------
-/**
- * typedef to make to code more readable.
- */
-typedef std::vector PStringVector;
-
-//-------------------------------------------------------------
-/**
- * typedef to make to code more readable.
- */
-typedef std::vector PDoubleVector;
-
-//-------------------------------------------------------------
-/**
- *
- */
-typedef struct {
- Double_t energy;
- PDoubleVector stoppingDistance;
- PDoubleVector stoppingAmplitude;
-} PNL_RgeData;
-
-//-------------------------------------------------------------
-/**
- *
- */
-typedef std::vector PNL_RgeDataList;
-
-#endif // _PNONLOCAL_H_
diff --git a/src/external/Nonlocal/nonlocal_startup.xml b/src/external/Nonlocal/nonlocal_startup.xml
index 26eaa87d..e66722c7 100644
--- a/src/external/Nonlocal/nonlocal_startup.xml
+++ b/src/external/Nonlocal/nonlocal_startup.xml
@@ -1,25 +1,27 @@
- trim.sp meta information
+ Fourier and TrimSp information
262144
-
- /afs/psi.ch/project/nemu/analysis/2009/Nonlocal/trimsp/InSne
+
+ ./profiles/
+ Sn_E
- 2.5
- 4.0
- 6.0
- 8.0
- 10.0
- 12.5
- 14.1
- 17.5
- 22.0
- 25.0
- 28.2
+ 1000
+ 2000
+ 4000
+ 6000
+ 8000
+ 10000
+ 12000
+ 14100
+ 18000
+ 22000
+ 25000
+ 27300
-
+
diff --git a/src/external/libPhotoMeissner/classes/CMakeLists.txt b/src/external/libPhotoMeissner/classes/CMakeLists.txt
index 2cbb7432..6e7b1ba1 100644
--- a/src/external/libPhotoMeissner/classes/CMakeLists.txt
+++ b/src/external/libPhotoMeissner/classes/CMakeLists.txt
@@ -21,16 +21,6 @@ root_generate_dictionary(
LINKDEF ${PHOTO_MEISSNER_INC}/PPhotoMeissnerLinkDef.h
MODULE PPhotoMeissner
)
-root_generate_dictionary(
- PStartupHandler_PMDict
- PStartupHandler_PM.h
- OPTIONS
- -I${MUSRFIT_INC}
- -I${PHOTO_MEISSNER_INC}
- -inlineInputHeader
- LINKDEF ${PHOTO_MEISSNER_INC}/PStartupHandler_PMLinkDef.h
- MODULE PStartupHandler_PM
-)
#--- create pkg-config info ---------------------------------------------------
set(prefix "${CMAKE_INSTALL_PREFIX}")
@@ -45,8 +35,6 @@ configure_file("PPhotoMeissner.pc.in" "PPhotoMeissner.pc" @ONLY)
add_library(PPhotoMeissner SHARED
PPhotoMeissner.cpp
PPhotoMeissnerDict.cxx
- PStartupHandler_PM.cpp
- PStartupHandler_PMDict.cxx
)
#--- set target properties, e.g. version --------------------------------------
@@ -67,7 +55,7 @@ target_include_directories(
#--- add library dependencies -------------------------------------------------
target_link_libraries(PPhotoMeissner
- ${FFTW3_LIBRARY} ${GSL_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase
+ ${FFTW3_LIBRARY} ${GSL_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase
)
#--- install PPhotoMeissner solib ---------------------------------------------
@@ -77,8 +65,6 @@ install(TARGETS PPhotoMeissner DESTINATION lib)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPPhotoMeissner_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/libPPhotoMeissner.rootmap
- ${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_PM_rdict.pcm
- ${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_PM.rootmap
DESTINATION lib
)
@@ -86,7 +72,6 @@ install(
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../include/PPhotoMeissner.h
- ${CMAKE_CURRENT_SOURCE_DIR}/../include/PStartupHandler_PM.h
DESTINATION
include
)
diff --git a/src/external/libPhotoMeissner/classes/PPhotoMeissner.cpp b/src/external/libPhotoMeissner/classes/PPhotoMeissner.cpp
index 4eab5d46..670504a0 100644
--- a/src/external/libPhotoMeissner/classes/PPhotoMeissner.cpp
+++ b/src/external/libPhotoMeissner/classes/PPhotoMeissner.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
- * Copyright (C) 2013 by Andreas Suter *
+ * Copyright (C) 2013-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -30,15 +30,11 @@
#include
#include
#include
-using namespace std;
#include
-#include
-
#include "PMusr.h"
-
-#include "../include/PPhotoMeissner.h"
+#include "PPhotoMeissner.h"
ClassImp(PPhotoMeissner) // for ROOT dictionary
@@ -51,38 +47,14 @@ ClassImp(PPhotoMeissner) // for ROOT dictionary
*/
PPhotoMeissner::PPhotoMeissner()
{
- // init
- fStartupHandler = 0;
- fValid = true;
-
// read XML startup file
- char startup_path_name[128];
- TSAXParser *saxParser = new TSAXParser();
- fStartupHandler = new PStartupHandler_PM();
- strcpy(startup_path_name, fStartupHandler->GetStartupFilePath().Data());
- saxParser->ConnectToHandler("PStartupHandler_PM", fStartupHandler);
- //Int_t status = saxParser->ParseFile(startup_path_name);
- // parsing the file as above seems to lead to problems in certain environments;
- // use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
- Int_t status = parseXmlFile(saxParser, startup_path_name);
- // check for parse errors
- if (status) { // error
- cout << endl << ">> PPhotoMeissner::PPhotoMeissner: **WARNING** Reading/parsing photoMeissner_startup.xml failed.";
- cout << endl;
- fValid = false;
- }
-
- // clean up
- if (saxParser) {
- delete saxParser;
- saxParser = 0;
- }
+ fRgeHandler = new PRgeHandler("./photoMeissner_startup.xml");
// check if everything went fine with the startup handler
- if (!fStartupHandler->IsValid()) {
- cout << endl << ">> PPhotoMeissner::PPhotoMeissner **PANIC ERROR**";
- cout << endl << ">> startup handler too unhappy. Will terminate unfriendly, sorry.";
- cout << endl;
+ if (!fRgeHandler->IsValid()) {
+ std::cout << std::endl << ">> PPhotoMeissner::PPhotoMeissner **PANIC ERROR**";
+ std::cout << std::endl << ">> startup handler too unhappy. Will terminate unfriendly, sorry.";
+ std::cout << std::endl;
fValid = false;
}
}
@@ -95,8 +67,8 @@ PPhotoMeissner::PPhotoMeissner()
*/
PPhotoMeissner::~PPhotoMeissner()
{
- if (fStartupHandler)
- delete fStartupHandler;
+ if (fRgeHandler)
+ delete fRgeHandler;
}
//--------------------------------------------------------------------------
@@ -108,9 +80,9 @@ PPhotoMeissner::~PPhotoMeissner()
* \param t
* \param par
*/
-Double_t PPhotoMeissner::operator()(Double_t t, const vector &par) const
+Double_t PPhotoMeissner::operator()(Double_t t, const std::vector &par) const
{
- // expected parameters: (0) implantation energy (kV), (1) dead layer (nm), (2) Bext (G), (3) lambdaLondon (nm),
+ // expected parameters: (0) implantation energy (eV), (1) dead layer (nm), (2) Bext (G), (3) lambdaLondon (nm),
// (4) lambdaPhoto (nm), (5) z0 (nm), (6) detector phase (°), [(7) layer thickness]
assert((par.size() == 7) || (par.size() == 8));
@@ -122,39 +94,33 @@ Double_t PPhotoMeissner::operator()(Double_t t, const vector &par) con
Double_t dz = 1.0; // go in 1A steps
Double_t zz = 0.0;
Double_t nn = 0.0;
- Double_t sum = 0.0;
Double_t BB = 0.0;
Double_t gamma = fTwoPi*GAMMA_BAR_MUON;
+ int idx = fRgeHandler->GetEnergyIndex(par[0]);
int done = 0;
if (par.size() == 7) { // semi-infinite sample
do {
- nn = fStartupHandler->GetRgeValue(par[0], zz);
+ nn = fRgeHandler->Get_n(idx, zz);
BB = FieldHalfSpace(zz, par);
result += nn*cos(gamma*BB*t+fDegToRad*par[6]);
zz += dz;
- sum += nn;
if (nn == 0.0)
done++;
} while (done < 5);
} else { // film
do {
- nn = fStartupHandler->GetRgeValue(par[0], zz);
+ nn = fRgeHandler->Get_n(idx, zz);
BB = FieldFilm(zz, par);
result += nn*cos(gamma*BB*t+fDegToRad*par[6]);
zz += dz;
- sum += nn;
if (nn == 0.0)
done++;
} while (done < 5);
}
- if (sum == 0.0) {
- cerr << endl << ">> PPhotoMeissner::operator(): **PANIC ERROR** sum of RGE values == 0!" << endl;
- assert(0);
- }
- return result/sum;
+ return result;
}
//--------------------------------------------------------------------------
@@ -180,7 +146,7 @@ Double_t PPhotoMeissner::InuMinus(const Double_t nu, const Double_t x) const
*
* \param par
*/
-Double_t PPhotoMeissner::FieldFilm(const Double_t z, const vector &par) const
+Double_t PPhotoMeissner::FieldFilm(const Double_t z, const std::vector &par) const
{
// prevent dividing by zero
double lamL = par[3];
@@ -217,7 +183,7 @@ Double_t PPhotoMeissner::FieldFilm(const Double_t z, const vector &par
*
* \param par
*/
-Double_t PPhotoMeissner::FieldHalfSpace(const Double_t z, const vector &par) const
+Double_t PPhotoMeissner::FieldHalfSpace(const Double_t z, const std::vector &par) const
{
// prevent dividing by zero
double lamL = par[3];
diff --git a/src/external/libPhotoMeissner/classes/PStartupHandler_PM.cpp b/src/external/libPhotoMeissner/classes/PStartupHandler_PM.cpp
deleted file mode 100644
index 3a02c0e4..00000000
--- a/src/external/libPhotoMeissner/classes/PStartupHandler_PM.cpp
+++ /dev/null
@@ -1,507 +0,0 @@
-/***************************************************************************
-
- PStartupHandler_PM.cpp
-
- Author: Andreas Suter
- e-mail: andreas.suter@psi.ch
-
-***************************************************************************/
-
-/***************************************************************************
- * Copyright (C) 2013-2021 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. *
- ***************************************************************************/
-
-#include
-
-#include
-#include
-
-#include "PStartupHandler_PM.h"
-
-//--------------------------------------------------------------------------
-// Constructor
-//--------------------------------------------------------------------------
-/**
- *
- */
-PRgeHandler_PM::PRgeHandler_PM(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
-{
- fIsValid = false;
-
- fIsValid = LoadRgeData(rgeDataPathList, rgeDataEnergyList);
-}
-
-//--------------------------------------------------------------------------
-// Destructor
-//--------------------------------------------------------------------------
-/**
- *
- */
-PRgeHandler_PM::~PRgeHandler_PM()
-{
- fRgeDataList.clear();
-}
-
-//--------------------------------------------------------------------------
-// GetRgeEnergyIndex
-//--------------------------------------------------------------------------
-/**
- *
- * \param energy in (keV)
- */
-Int_t PRgeHandler_PM::GetRgeEnergyIndex(const Double_t energy)
-{
- Int_t idx = -1;
-
- for (UInt_t i=0; i(dist/(fRgeDataList[index].stoppingDistance[1]-fRgeDataList[index].stoppingDistance[0]));
-
- if (distIdx >= fRgeDataList[index].stoppingDistance.size()) {
- rgeVal = 0.0;
- } else {
- rgeVal = fRgeDataList[index].stoppingAmplitude[distIdx] +
- (fRgeDataList[index].stoppingAmplitude[distIdx+1] - fRgeDataList[index].stoppingAmplitude[distIdx]) *
- (dist-fRgeDataList[index].stoppingDistance[distIdx])/(fRgeDataList[index].stoppingDistance[distIdx+1]-fRgeDataList[index].stoppingDistance[distIdx]);
- }
-
- return rgeVal;
-}
-
-//--------------------------------------------------------------------------
-// GetRgeValue
-//--------------------------------------------------------------------------
-/**
- *
- * \param energy in (keV)
- * \param dist in (nm)
- */
-Double_t PRgeHandler_PM::GetRgeValue(const Double_t energy, const Double_t dist)
-{
- // check if energy is present in rge data list
- Int_t idx = -1;
-
- for (UInt_t i=0; i> PStartupHandler_PM(): **WARNING** Couldn't find photoMeissner_startup.xml in the current directory, will try default one." << std::endl;
- home_path = getenv("HOME");
- snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/external/photoMeissner_startup.xml", home_path);
- if (StartupFileExists(startup_path_name)) {
- fStartupFileFound = true;
- fStartupFilePath = TString(startup_path_name);
- }
- }
-
- // init RGE handler
- fRgeHandler = nullptr;
-}
-
-//--------------------------------------------------------------------------
-// OnStartDocument
-//--------------------------------------------------------------------------
-/**
- *
- */
-void PStartupHandler_PM::OnStartDocument()
-{
- fKey = eEmpty;
-}
-
-//--------------------------------------------------------------------------
-// OnEndDocument
-//--------------------------------------------------------------------------
-/**
- *
- */
-void PStartupHandler_PM::OnEndDocument()
-{
- if (!fIsValid)
- return;
-
- // generate the file path list
- TString str;
- for (unsigned int i=0; i> PStartupHandler_PM::OnEndDocument(): **ERROR** couldn't invoke RGE handler." << std::endl << std::endl;
- return;
- }
-
- if (!fRgeHandler->IsValid()) { // severe problem
- fIsValid = false;
- std::cerr << std::endl << ">> PStartupHandler_PM::OnEndDocument(): **ERROR** RGE handler not valid." << std::endl << std::endl;
- return;
- }
-}
-
-//--------------------------------------------------------------------------
-// OnStartElement
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param str
- * \param attributes
- */
-void PStartupHandler_PM::OnStartElement(const char *str, const TList *attributes)
-{
- if (!strcmp(str, "data_path")) {
- fKey = eDataPath;
- } else if (!strcmp(str, "energy")) {
- fKey = eEnergy;
- }
-}
-
-//--------------------------------------------------------------------------
-// OnEndElement
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param str
- */
-void PStartupHandler_PM::OnEndElement(const char *str)
-{
- fKey = eEmpty;
-}
-
-//--------------------------------------------------------------------------
-// OnCharacters
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param str
- */
-void PStartupHandler_PM::OnCharacters(const char *str)
-{
- TString tstr;
- Double_t dval;
-
- switch (fKey) {
- case eDataPath:
- fRgePath = str;
- break;
- case eEnergy:
- tstr = str;
- if (tstr.IsFloat()) {
- dval = tstr.Atof();
- fRgeDataEnergyList.push_back(dval);
- } else {
- std::cerr << std::endl << "PStartupHandler_PM::OnCharacters: **ERROR** when finding energy:";
- std::cerr << std::endl << "\"" << str << "\" is not a floating point number, will ignore it.";
- std::cerr << std::endl;
- }
- break;
- default:
- break;
- }
-}
-
-//--------------------------------------------------------------------------
-// OnComment
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param str
- */
-void PStartupHandler_PM::OnComment(const char *str)
-{
- // nothing to be done for now
-}
-
-//--------------------------------------------------------------------------
-// OnWarning
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param str
- */
-void PStartupHandler_PM::OnWarning(const char *str)
-{
- std::cerr << std::endl << "PStartupHandler_PM **WARNING** " << str;
- std::cerr << std::endl;
-}
-
-//--------------------------------------------------------------------------
-// OnError
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param str
- */
-void PStartupHandler_PM::OnError(const char *str)
-{
- std::cerr << std::endl << "PStartupHandler_PM **ERROR** " << str;
- std::cerr << std::endl;
-}
-
-//--------------------------------------------------------------------------
-// OnFatalError
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param str
- */
-void PStartupHandler_PM::OnFatalError(const char *str)
-{
- std::cerr << std::endl << "PStartupHandler_PM **FATAL ERROR** " << str;
- std::cerr << std::endl;
-}
-
-//--------------------------------------------------------------------------
-// OnCdataBlock
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param str
- */
-void PStartupHandler_PM::OnCdataBlock(const char *str, Int_t len)
-{
- // nothing to be done for now
-}
-
-//--------------------------------------------------------------------------
-// GetRgeEnergyIndex
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param energy
- */
-Int_t PStartupHandler_PM::GetRgeEnergyIndex(const Double_t energy)
-{
- Int_t result = -1;
- if (fIsValid)
- result = fRgeHandler->GetRgeEnergyIndex(energy);
- return result;
-}
-
-//--------------------------------------------------------------------------
-// GetRgeValue
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param energy
- * \param dist
- */
-Double_t PStartupHandler_PM::GetRgeValue(const Double_t energy, const Double_t dist)
-{
- Double_t result = 0.0;
- if (fIsValid)
- result = fRgeHandler->GetRgeValue(energy, dist);
- return result;
-}
-
-//--------------------------------------------------------------------------
-// GetRgeValue
-//--------------------------------------------------------------------------
-/**
- *
- *
- * \param index
- * \param dist
- */
-Double_t PStartupHandler_PM::GetRgeValue(const Int_t index, const Double_t dist)
-{
- Double_t result = 0.0;
- if (fIsValid)
- result = fRgeHandler->GetRgeValue(index, dist);
- return result;
-}
-
-//--------------------------------------------------------------------------
-// StartupFileExists
-//--------------------------------------------------------------------------
-/**
- *
- *
- */
-bool PStartupHandler_PM::StartupFileExists(char *fln)
-{
- bool result = false;
-
- std::ifstream ifile(fln);
-
- if (ifile.fail()) {
- result = false;
- } else {
- result = true;
- ifile.close();
- }
-
- return result;
-}
-
-// -------------------------------------------------------------------------
-// end
-// -------------------------------------------------------------------------
diff --git a/src/external/libPhotoMeissner/include/PPhotoMeissner.h b/src/external/libPhotoMeissner/include/PPhotoMeissner.h
index 9f12b7e9..f4853216 100644
--- a/src/external/libPhotoMeissner/include/PPhotoMeissner.h
+++ b/src/external/libPhotoMeissner/include/PPhotoMeissner.h
@@ -33,7 +33,7 @@
#include
#include "PUserFcnBase.h"
-#include "PStartupHandler_PM.h"
+#include "PRgeHandler.h"
class PPhotoMeissner : public PUserFcnBase
{
@@ -44,12 +44,12 @@ class PPhotoMeissner : public PUserFcnBase
virtual Bool_t IsValid() { return fValid; }
// function operator
- Double_t operator()(Double_t, const std::vector&) const;
+ Double_t operator()(Double_t t, const std::vector ¶m) const;
private:
- PStartupHandler_PM *fStartupHandler;
+ PRgeHandler *fRgeHandler{nullptr};
- Bool_t fValid; ///< flag indicating if initialization went through smoothly
+ Bool_t fValid{true}; ///< flag indicating if initialization went through smoothly
constexpr static const Double_t fDegToRad = 0.0174532925199432955;
constexpr static const Double_t fTwoPi = 6.28318530717958623;
diff --git a/src/external/libPhotoMeissner/test/photoMeissner_startup.xml b/src/external/libPhotoMeissner/test/photoMeissner_startup.xml
index 535389aa..43202eb5 100644
--- a/src/external/libPhotoMeissner/test/photoMeissner_startup.xml
+++ b/src/external/libPhotoMeissner/test/photoMeissner_startup.xml
@@ -3,8 +3,9 @@
contains the needed trim.sp meta-file information
-
- ./trimsp/YBCO_E
+
+ ./trimsp
+ YBCO_E
1000
3000
@@ -16,5 +17,5 @@
20300
24300
-
+
diff --git a/src/external/libPhotoMeissner/include/PStartupHandler_PM.h b/src/include/PRgeHandler.h
similarity index 50%
rename from src/external/libPhotoMeissner/include/PStartupHandler_PM.h
rename to src/include/PRgeHandler.h
index 0a4eb315..fa4e39fc 100644
--- a/src/external/libPhotoMeissner/include/PStartupHandler_PM.h
+++ b/src/include/PRgeHandler.h
@@ -1,6 +1,6 @@
/***************************************************************************
- PStartupHandler_PM.h
+ PRgeHandler.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
@@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
- * Copyright (C) 2013-2021 by Andreas Suter *
+ * Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -27,74 +27,46 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef _PSTARTUPHANDLER_PM_H_
-#define _PSTARTUPHANDLER_PM_H_
+#ifndef _PRGEHANDLER_H_
+#define _PRGEHANDLER_H_
+#include
#include
#include
#include
-#include
+#include
-//-------------------------------------------------------------
-/**
- * typedef to make to code more readable.
- */
-typedef std::vector PStringVector;
+#include "PMusr.h"
-//-------------------------------------------------------------
+//-----------------------------------------------------------------------------
/**
- * typedef to make to code more readable.
- */
-typedef std::vector PDoubleVector;
-
-//-------------------------------------------------------------
-/**
- *
+ *
Keep a single rge table from TrimSP for a given energy.
*/
typedef struct {
Double_t energy;
- PDoubleVector stoppingDistance;
- PDoubleVector stoppingAmplitude;
-} PRgeData_PM;
+ PDoubleVector depth;
+ PDoubleVector amplitude;
+ PDoubleVector nn; // normalized int n(z) dz = 1 amplitudes
+ Double_t noOfParticles;
+} PRgeData;
-//-------------------------------------------------------------
+//-----------------------------------------------------------------------------
/**
- *
+ *
Keep all rge tables from TrimSP.
*/
-typedef std::vector PRgeData_PM_List;
+typedef std::vector PRgeDataList;
-//-------------------------------------------------------------
+//-----------------------------------------------------------------------------
/**
- *
+ *
Reads the xml-startup file in order to extract all necessary information
+ * about the RGE files (TrimSP) needed.
*/
-class PRgeHandler_PM
+class PXmlRgeHandler : public TObject, public TQObject
{
public:
- PRgeHandler_PM(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList);
- virtual ~PRgeHandler_PM();
-
- virtual Bool_t IsValid() { return fIsValid; }
- virtual Int_t GetRgeEnergyIndex(const Double_t energy);
- virtual Double_t GetRgeValue(const Double_t energy, const Double_t dist);
- virtual Double_t GetRgeValue(const Int_t index, const Double_t dist);
-
- private:
- Bool_t fIsValid;
- PRgeData_PM_List fRgeDataList;
-
- virtual Bool_t LoadRgeData(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList);
-};
-
-//-------------------------------------------------------------
-/**
- *
- */
-class PStartupHandler_PM : public TObject
-{
- public:
- PStartupHandler_PM();
- virtual ~PStartupHandler_PM() {}
+ PXmlRgeHandler() {}
+ virtual ~PXmlRgeHandler() {}
virtual void OnStartDocument(); // SLOT
virtual void OnEndDocument(); // SLOT
@@ -108,32 +80,49 @@ class PStartupHandler_PM : public TObject
virtual void OnCdataBlock(const char*, Int_t); // SLOT
virtual bool IsValid() { return fIsValid; }
- virtual TString GetStartupFilePath() { return fStartupFilePath; }
-
- virtual bool StartupFileFound() { return fStartupFileFound; }
-
- virtual Int_t GetRgeEnergyIndex(const Double_t energy);
- virtual Double_t GetRgeValue(const Double_t energy, const Double_t dist);
- virtual Double_t GetRgeValue(const Int_t index, const Double_t dist);
+ virtual std::string GetTrimSpDataPath() { return fTrimSpDataPath; }
+ virtual std::string GetTrimSpFlnPre() { return fTrimSpFlnPre; }
+ virtual const PIntVector GetTrimSpDataVectorList() const { return fTrimSpDataEnergyList; }
private:
- enum EKeyWords {eEmpty, eDataPath, eEnergy};
+ enum EKeyWords {eEmpty, eDataPath, eFlnPre, eEnergy};
EKeyWords fKey;
- bool fIsValid;
+ bool isTrimSp{false};
+ bool fIsValid{true};
- bool fStartupFileFound;
- TString fStartupFilePath;
+ std::string fTrimSpDataPath{""}; //< where to find the rge-files
+ std::string fTrimSpFlnPre{""}; //< keeps the preface of the rge file name, e.g. LCCO_E
+ PIntVector fTrimSpDataEnergyList; //< TrimSP implantation energy list (in eV)
- TString fRgePath;
- PStringVector fRgeFilePathList;
- PDoubleVector fRgeDataEnergyList;
-
- PRgeHandler_PM *fRgeHandler;
-
- bool StartupFileExists(char *fln);
-
- ClassDef(PStartupHandler_PM, 1)
+ ClassDef(PXmlRgeHandler, 1)
};
-#endif // _PSTARTUPHANDLER_PM_H_
+//-----------------------------------------------------------------------------
+/**
+ * @brief The PRegHandler class
+ */
+class PRgeHandler : public TObject
+{
+ public:
+ PRgeHandler(std::string fln="");
+ virtual ~PRgeHandler() {}
+
+ virtual bool IsValid() { return fValid; }
+ virtual PRgeDataList GetRgeData() { return fData; }
+ virtual Double_t GetZmax(const Double_t energy);
+ virtual Double_t GetZmax(const Int_t idx);
+ virtual Double_t Get_n(const Double_t energy, const Double_t z);
+ virtual Double_t Get_n(const Int_t idx, const Double_t z);
+ virtual Int_t GetEnergyIndex(const Double_t energy);
+
+ private:
+ bool fValid{false};
+ PRgeDataList fData;
+
+ virtual bool ReadRgeFile(const std::string fln, PRgeData &data);
+
+ ClassDef(PRgeHandler, 1)
+};
+
+#endif // _PRGEHANDLER_H_
diff --git a/src/external/libPhotoMeissner/include/PStartupHandler_PMLinkDef.h b/src/include/PRgeHandlerLinkDef.h
similarity index 91%
rename from src/external/libPhotoMeissner/include/PStartupHandler_PMLinkDef.h
rename to src/include/PRgeHandlerLinkDef.h
index fcbe47ac..4bac86bc 100644
--- a/src/external/libPhotoMeissner/include/PStartupHandler_PMLinkDef.h
+++ b/src/include/PRgeHandlerLinkDef.h
@@ -1,6 +1,6 @@
/***************************************************************************
- PStartupHandler_PMLinkDef.h
+ PRgeHandlerLinkDef.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
@@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
- * Copyright (C) 2013-2021 by Andreas Suter *
+ * Copyright (C) 2007-2021 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -33,6 +33,7 @@
#pragma link off all classes;
#pragma link off all functions;
-#pragma link C++ class PStartupHandler_PM+;
+#pragma link C++ class PXmlRgeHandler+;
+#pragma link C++ class PRgeHandler+;
#endif