mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-06-19 07:47:05 +01:00
now HDF5, Minuit and NLopt are really optional dependencies
This commit is contained in:
16
lib/Io.cpp
16
lib/Io.cpp
@ -19,6 +19,10 @@
|
||||
|
||||
#include <LatAnalyze/Io.hpp>
|
||||
#include <LatAnalyze/includes.hpp>
|
||||
#include <LatAnalyze/AsciiFile.hpp>
|
||||
#ifdef HAVE_HDF5
|
||||
#include <LatAnalyze/Hdf5File.hpp>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace Latan;
|
||||
@ -34,14 +38,16 @@ unique_ptr<File> Io::open(const std::string &fileName, const unsigned int mode)
|
||||
{
|
||||
string ext = extension(fileName);
|
||||
|
||||
if (ext == "h5")
|
||||
{
|
||||
return unique_ptr<File>(new Hdf5File(fileName, mode));
|
||||
}
|
||||
else if ((ext == "dat")||(ext == "sample")||(ext == "seed"))
|
||||
if ((ext == "dat")||(ext == "sample")||(ext == "seed"))
|
||||
{
|
||||
return unique_ptr<File>(new AsciiFile(fileName, mode));
|
||||
}
|
||||
#ifdef HAVE_HDF5
|
||||
else if (ext == "h5")
|
||||
{
|
||||
return unique_ptr<File>(new Hdf5File(fileName, mode));
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
LATAN_ERROR(Io, "unknown file extension '" + ext + "'");
|
||||
|
@ -21,8 +21,7 @@
|
||||
#define Latan_Io_hpp_
|
||||
|
||||
#include <LatAnalyze/Global.hpp>
|
||||
#include <LatAnalyze/AsciiFile.hpp>
|
||||
#include <LatAnalyze/Hdf5File.hpp>
|
||||
#include <LatAnalyze/File.hpp>
|
||||
|
||||
BEGIN_LATAN_NAMESPACE
|
||||
|
||||
|
@ -34,7 +34,6 @@ libLatAnalyze_la_SOURCES = \
|
||||
GslHybridRootFinder.cpp\
|
||||
GslMinimizer.cpp \
|
||||
GslQagsIntegrator.cpp \
|
||||
Hdf5File.cpp \
|
||||
Histogram.cpp \
|
||||
includes.hpp \
|
||||
Io.cpp \
|
||||
@ -67,7 +66,6 @@ libLatAnalyze_la_HEADERS = \
|
||||
GslHybridRootFinder.hpp\
|
||||
GslMinimizer.hpp \
|
||||
GslQagsIntegrator.hpp \
|
||||
Hdf5File.hpp \
|
||||
Histogram.hpp \
|
||||
Integrator.hpp \
|
||||
Io.hpp \
|
||||
@ -86,6 +84,10 @@ libLatAnalyze_la_HEADERS = \
|
||||
StatArray.hpp \
|
||||
XYSampleData.hpp \
|
||||
XYStatData.hpp
|
||||
if HAVE_HDF5
|
||||
libLatAnalyze_la_SOURCES += Hdf5File.cpp
|
||||
libLatAnalyze_la_HEADERS += Hdf5File.hpp
|
||||
endif
|
||||
if HAVE_MINUIT
|
||||
libLatAnalyze_la_SOURCES += MinuitMinimizer.cpp
|
||||
libLatAnalyze_la_HEADERS += MinuitMinimizer.hpp
|
||||
|
Reference in New Issue
Block a user