diff --git a/App/src/TestFittingModule2.cpp b/App/src/TestFittingModule2.cpp index 948ea63c5fd4d7c218df0405aa73a21c13cf78d4..61c785c2896d88f9b37a756fdff50c6693c607e7 100644 --- a/App/src/TestFittingModule2.cpp +++ b/App/src/TestFittingModule2.cpp @@ -43,7 +43,6 @@ #include "TPaveText.h" #include "TH2D.h" -#include <boost/assign/list_of.hpp> TestFittingModule2::TestFittingModule2() diff --git a/Core/Geometry/src/Line.cpp b/Core/Geometry/src/Line.cpp index ee952435f1bd266e10d946b9b68472216e91ea24..af32e05a44062972fd6dc2b150fc1bf57b738956 100644 --- a/Core/Geometry/src/Line.cpp +++ b/Core/Geometry/src/Line.cpp @@ -22,7 +22,6 @@ GCC_DIAG_OFF(unused-parameter) #include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometries/polygon.hpp> #include <boost/geometry/geometries/linestring.hpp> -#include <boost/assign/list_of.hpp> GCC_DIAG_ON(unused-parameter) #include <iostream> diff --git a/Core/InputOutput/OutputDataIOHelper.cpp b/Core/InputOutput/OutputDataIOHelper.cpp index 0bb64dd2df3c66a49ccd31c0c5e7627f221935ae..5c739fd6544cf49657bba03489f3977677f9e4d0 100644 --- a/Core/InputOutput/OutputDataIOHelper.cpp +++ b/Core/InputOutput/OutputDataIOHelper.cpp @@ -25,7 +25,6 @@ #include <iostream> #include <algorithm> #include <boost/algorithm/string.hpp> -#include <boost/assign/list_of.hpp> bool OutputDataIOHelper::isCompressed(const std::string& name) @@ -142,7 +141,7 @@ IAxis *OutputDataIOHelper::createAxis(std::istream &input_stream) //! CustomBinAxis("axis0", 10, -1, 1) IAxis *OutputDataIOHelper::createFixedBinAxis(std::string line) { - std::vector<std::string> to_replace = boost::assign::list_of(",")("\"")("(")(")"); + std::vector<std::string> to_replace = {",", "\"", "(", ")"}; Utils::String::replaceItemsFromString(line, to_replace, " "); std::string type, name; @@ -180,7 +179,7 @@ IAxis *OutputDataIOHelper::createFixedBinAxis(std::string line) //! VariableBinAxis("axis0", 4, [-1, -0.5, 0.5, 1, 2]) IAxis *OutputDataIOHelper::createVariableBinAxis(std::string line) { - std::vector<std::string> to_replace = boost::assign::list_of(",")("\"")("(")(")")("[")("]"); + std::vector<std::string> to_replace = {",", "\"", "(", ")", "[", "]"}; Utils::String::replaceItemsFromString(line, to_replace, " "); std::string type, name; diff --git a/Core/Tools/src/IHistogram.cpp b/Core/Tools/src/IHistogram.cpp index 0c6f49218a1d20b9266a4b69d568547086c3f318..a56adb89a56a7754d6206a74ad30c128f5efb5a3 100644 --- a/Core/Tools/src/IHistogram.cpp +++ b/Core/Tools/src/IHistogram.cpp @@ -20,7 +20,6 @@ #include "Histogram1D.h" #include "Histogram2D.h" #include <sstream> -#include <boost/assign/list_of.hpp> #include <boost/scoped_ptr.hpp> IHistogram::IHistogram() diff --git a/Core/Tools/src/MessageService.cpp b/Core/Tools/src/MessageService.cpp index 7b77b21a801125c5f1608e0fdbd0424a4fbc0b34..0813b6a788efff885cbfb70bbb0e466253b8e060 100644 --- a/Core/Tools/src/MessageService.cpp +++ b/Core/Tools/src/MessageService.cpp @@ -14,14 +14,13 @@ // ************************************************************************** // #include "MessageService.h" -#include <boost/assign/list_of.hpp> #include "Exceptions.h" //#include <sys/time.h> #include <boost/date_time/posix_time/posix_time.hpp> #include <cstdio> std::vector<std::string> MSG::Logger::m_level_names = - boost::assign::list_of("VERBOSE")("DEBUG2")("DEBUG")("INFO")("WARNING")("ERROR")("FATAL"); + {"VERBOSE", "DEBUG2", "DEBUG", "INFO", "WARNING", "ERROR", "FATAL"}; MSG::EMessageLevel MSG::Logger::m_logLevel = MSG::ERROR; @@ -30,18 +29,18 @@ namespace MSG void SetLevel(EMessageLevel level) { - Logger::SetLevel(level); + Logger::SetLevel(level); } void SetLevel(const std::string& levelname) { - Logger::SetLevel(levelname); + Logger::SetLevel(levelname); } Logger::Logger(EMessageLevel level) { - //m_buffer << boost::this_thread::get_id(); + //m_buffer << boost::this_thread::get_id(); m_buffer << "- " << NowTime(); m_buffer << " " << std::setw(8) << std::left << ToString(level) << ": "; } @@ -55,22 +54,22 @@ Logger::~Logger() const std::string& Logger::ToString(EMessageLevel level) { - return m_level_names[level]; + return m_level_names[level]; } void Logger::SetLevel(EMessageLevel level) { - m_logLevel = level; + m_logLevel = level; } EMessageLevel Logger::GetLevel() { - return m_logLevel; + return m_logLevel; } std::string Logger::NowTime() { - //struct timeval tv; + //struct timeval tv; //gettimeofday(&tv, 0); //char buffer[100]; //tm r; @@ -78,10 +77,10 @@ std::string Logger::NowTime() //char result[100]; //sprintf(result, "%s.%06ld", buffer, (long)tv.tv_usec); - std::ostringstream msg; + std::ostringstream msg; //const boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); - boost::posix_time::time_facet*const f=new boost::posix_time::time_facet("%H-%M-%S"); - msg.imbue(std::locale(msg.getloc(),f)); + boost::posix_time::time_facet*const f=new boost::posix_time::time_facet("%H-%M-%S"); + msg.imbue(std::locale(msg.getloc(),f)); return msg.str(); } diff --git a/Fit/FitKernel/src/MinimizerFactory.cpp b/Fit/FitKernel/src/MinimizerFactory.cpp index dcd22d0a63b94bd755551049fbfbee7782dbfccd..d2a9d658106e9c3a82852155f50bd569e3a65954 100644 --- a/Fit/FitKernel/src/MinimizerFactory.cpp +++ b/Fit/FitKernel/src/MinimizerFactory.cpp @@ -21,7 +21,6 @@ #include "ROOTSimAnMinimizer.h" #include "ROOTLMAMinimizer.h" #include "ROOTGeneticMinimizer.h" -#include <boost/assign/list_of.hpp> #include <iomanip> MinimizerFactory::Catalogue MinimizerFactory::m_catalogue = @@ -32,15 +31,15 @@ MinimizerFactory::Catalogue MinimizerFactory::m_catalogue = MinimizerFactory::Catalogue::Catalogue() { // our minimizers - //m_data["Test"] = boost::assign::list_of(""); - //m_data["Scan"] = boost::assign::list_of(""); + //m_data["Test"] = {""}; + //m_data["Scan"] = {""}; // ROOT minimizers - //m_data["Minuit"] = boost::assign::list_of("Migrad")("Simplex")("Combined")("Scan"); - m_data["Minuit2"] = boost::assign::list_of("Migrad")("Simplex")("Combined")("Scan")("Fumili"); - m_data["GSLMultiMin"] = boost::assign::list_of("ConjugateFR")("ConjugatePR")("BFGS")("BFGS2")("SteepestDescent"); - m_data["GSLLMA"] = boost::assign::list_of(""); - m_data["GSLSimAn"] = boost::assign::list_of(""); - m_data["Genetic"] = boost::assign::list_of(""); // available only with ROOT libraries + //m_data["Minuit"] = {"Migrad", "Simplex", "Combined", "Scan"}; + m_data["Minuit2"] = {"Migrad", "Simplex", "Combined", "Scan", "Fumili"}; + m_data["GSLMultiMin"] = {"ConjugateFR", "ConjugatePR", "BFGS", "BFGS2", "SteepestDescent"}; + m_data["GSLLMA"] = {""}; + m_data["GSLSimAn"] = {""}; + m_data["Genetic"] = {""}; // available only with ROOT libraries } diff --git a/Fit/FitKernel/src/ROOTMinimizer.cpp b/Fit/FitKernel/src/ROOTMinimizer.cpp index 4610ce0b4654949befc8557f97652d90d143c266..8c84e8d683d70d2e586daa7dd3e7d049bbff5b94 100644 --- a/Fit/FitKernel/src/ROOTMinimizer.cpp +++ b/Fit/FitKernel/src/ROOTMinimizer.cpp @@ -20,8 +20,6 @@ #include "ROOTMinimizerFunction.h" #include <iomanip> #include <sstream> -#include <boost/assign/list_of.hpp> -#include <boost/assign/list_of.hpp> #include "ROOTMinimizerHelper.h" #include "MinimizerOptions.h" #include "Math/Minimizer.h" diff --git a/Tests/UnitTests/TestCore/DWBASimulationTest.h b/Tests/UnitTests/TestCore/DWBASimulationTest.h index b63dbd81c8a7d5c5e9be5eb5d2c01d2dd8b20b62..2e01b43b95b5c4a23898e15990f0db35c301e213 100644 --- a/Tests/UnitTests/TestCore/DWBASimulationTest.h +++ b/Tests/UnitTests/TestCore/DWBASimulationTest.h @@ -6,7 +6,6 @@ #include "MultiLayer.h" #include "OutputDataFunctions.h" #include "gtest/gtest.h" -#include <boost/assign/list_of.hpp> class DWBASimulationTest : public ::testing::Test diff --git a/Tests/UnitTests/TestCore/DetectorMaskTest.h b/Tests/UnitTests/TestCore/DetectorMaskTest.h index 77044097c24ef431a5cbcebfcd9e18b17b91f236..5132cecd6d91e1c5e2b5a8c9e455b76e15267cfd 100644 --- a/Tests/UnitTests/TestCore/DetectorMaskTest.h +++ b/Tests/UnitTests/TestCore/DetectorMaskTest.h @@ -5,7 +5,6 @@ #include "SphericalDetector.h" #include "gtest/gtest.h" #include <boost/scoped_ptr.hpp> -#include <boost/assign/list_of.hpp> class DetectorMaskTest : public ::testing::Test { @@ -40,8 +39,8 @@ TEST_F(DetectorMaskTest, AddMask) { DetectorMask detectorMask; - std::vector<double> x = boost::assign::list_of(4.0)(-4.0)(-4.0)(4.0)(4.0); - std::vector<double> y = boost::assign::list_of(2.0)(2.0)(-2.0)(-2.0)(2.0); + std::vector<double> x = {4.0, -4.0, -4.0, 4.0, 4.0}; + std::vector<double> y = {2.0, 2.0, -2.0, -2.0, 2.0}; Geometry::Polygon polygon(x, y); SphericalDetector detector; @@ -76,8 +75,8 @@ TEST_F(DetectorMaskTest, AddMask) EXPECT_EQ(detectorMask.getNumberOfMaskedChannels(), 0); // adding third mask - x = boost::assign::list_of(5.0)(5.0)(8.0)(8.0)(5.0); - y = boost::assign::list_of(2.0)(4.0)(4.0)(2.0)(2.0); + x = {5.0, 5.0, 8.0, 8.0, 5.0}; + y = {2.0, 4.0, 4.0, 2.0, 2.0}; Geometry::Polygon polygon2(x, y); detectorMask.addMask(polygon2, true); detectorMask.initMaskData(detector); @@ -105,8 +104,8 @@ TEST_F(DetectorMaskTest, AssignmentOperator) { DetectorMask detectorMask; - std::vector<double> x = boost::assign::list_of(4.0)(-4.0)(-4.0)(4.0)(4.0); - std::vector<double> y = boost::assign::list_of(2.0)(2.0)(-2.0)(-2.0)(2.0); + std::vector<double> x = {4.0, -4.0, -4.0, 4.0, 4.0}; + std::vector<double> y = {2.0, 2.0, -2.0, -2.0, 2.0}; Geometry::Polygon polygon(x, y); SphericalDetector detector; @@ -139,8 +138,8 @@ TEST_F(DetectorMaskTest, CopyConstructor) { DetectorMask detectorMask; - std::vector<double> x = boost::assign::list_of(4.0)(-4.0)(-4.0)(4.0)(4.0); - std::vector<double> y = boost::assign::list_of(2.0)(2.0)(-2.0)(-2.0)(2.0); + std::vector<double> x = {4.0, -4.0, -4.0, 4.0, 4.0}; + std::vector<double> y = {2.0, 2.0, -2.0, -2.0, 2.0}; Geometry::Polygon polygon(x, y); SphericalDetector detector; diff --git a/Tests/UnitTests/TestCore/DetectorTest.h b/Tests/UnitTests/TestCore/DetectorTest.h index a5f54177b759c68858f39f3777af045de753b995..ed79290012879119d16b3ce50844fafc7a53a6bb 100644 --- a/Tests/UnitTests/TestCore/DetectorTest.h +++ b/Tests/UnitTests/TestCore/DetectorTest.h @@ -10,7 +10,6 @@ #include "ResolutionFunction2DGaussian.h" #include "Polygon.h" #include <boost/scoped_ptr.hpp> -#include <boost/assign/list_of.hpp> #include "gtest/gtest.h" @@ -95,8 +94,8 @@ TEST_F(DetectorTest, MaskOfDetector) detector.addAxis(FixedBinAxis("x-axis", 12, -4.0, 8.0)); detector.addAxis(FixedBinAxis("y-axis", 6, -2.0, 4.0)); - std::vector<double> x = boost::assign::list_of(4.0)(-4.0)(-4.0)(4.0)(4.0); - std::vector<double> y = boost::assign::list_of(2.0)(2.0)(-2.0)(-2.0)(2.0); + std::vector<double> x = {4.0, -4.0, -4.0, 4.0, 4.0}; + std::vector<double> y = {2.0, 2.0, -2.0, -2.0, 2.0}; Geometry::Polygon polygon(x, y); detector.addMask(polygon, true); diff --git a/Tests/UnitTests/TestCore/Histogram1DTest.h b/Tests/UnitTests/TestCore/Histogram1DTest.h index 13ee8f02f9887f8f7de8f73cd63d0b7630cc4338..985e3f90d363575a3f3d273d228a13ad7e026f45 100644 --- a/Tests/UnitTests/TestCore/Histogram1DTest.h +++ b/Tests/UnitTests/TestCore/Histogram1DTest.h @@ -3,7 +3,6 @@ #include "Histogram1D.h" #include "Exceptions.h" -#include <boost/assign/list_of.hpp> #include <boost/scoped_ptr.hpp> #include "gtest/gtest.h" @@ -35,7 +34,7 @@ TEST_F(Histogram1DTest, FixedBinDefaultContent) Histogram1D hist(5, 0.0, 5.0); // bin centers - std::vector<double> bin_centers = boost::assign::list_of(0.5)(1.5)(2.5)(3.5)(4.5); + std::vector<double> bin_centers = {0.5, 1.5, 2.5, 3.5, 4.5}; std::vector<double> centers = hist.getBinCenters(); for(size_t index=0; index < bin_centers.size(); ++index) { EXPECT_EQ(centers[index], bin_centers[index]); @@ -80,7 +79,7 @@ TEST_F(Histogram1DTest, FixedBinFill) EXPECT_EQ(hist.getBinNumberOfEntries(4), 1); EXPECT_EQ(hist.getBinError(4), 0.0); - std::vector<double> values = boost::assign::list_of(88.0)(0.0)(0.0)(0.0)(99.0); + std::vector<double> values = {88.0, 0.0, 0.0, 0.0, 99.0}; for(size_t index=0; index<hist.getTotalNumberOfBins(); ++index) { EXPECT_EQ(hist.getBinValues()[index], values[index]); EXPECT_EQ(hist.getBinErrors()[index], 0.0); @@ -122,8 +121,8 @@ TEST_F(Histogram1DTest, FixedBinFill) TEST_F(Histogram1DTest, crop) { - std::vector<double> xedges = boost::assign::list_of(-1.0)(-0.5)(0.5)(1.0)(2.0); - std::vector<double> xvalues = boost::assign::list_of(-0.75)(0.0)(0.75)(1.5); + std::vector<double> xedges = {-1.0, -0.5, 0.5, 1.0, 2.0}; + std::vector<double> xvalues = {-0.75, 0.0, 0.75, 1.5}; Histogram1D hist(4, xedges); for(size_t i=0; i<xvalues.size(); ++i) { diff --git a/Tests/UnitTests/TestCore/Histogram2DTest.h b/Tests/UnitTests/TestCore/Histogram2DTest.h index e28911ebbef29c74173b3369f8995c739f192d85..78c5f8aa73bb971b8abda609b429b836469dab6d 100644 --- a/Tests/UnitTests/TestCore/Histogram2DTest.h +++ b/Tests/UnitTests/TestCore/Histogram2DTest.h @@ -2,7 +2,6 @@ #define HISTOGRAM2DTEST_H #include "Histogram2D.h" -#include <boost/assign/list_of.hpp> #include <boost/scoped_ptr.hpp> #include "gtest/gtest.h" @@ -29,8 +28,8 @@ class Histogram2DTest : public ::testing::Test Histogram2DTest::Histogram2DTest() { - std::vector<double> xbin_edges = boost::assign::list_of(-1.0)(-0.5)(0.5)(1.0)(2.0); - std::vector<double> ybin_edges = boost::assign::list_of(0.0)(1.0)(2.0)(4.0); + std::vector<double> xbin_edges = {-1.0, -0.5, 0.5, 1.0, 2.0}; + std::vector<double> ybin_edges = {0.0, 1.0, 2.0, 4.0}; hist = new Histogram2D(4, xbin_edges, 3, ybin_edges); } @@ -118,8 +117,10 @@ TEST_F(Histogram2DTest, VariableHistFill) hist->reset(); // values to fill all histogram - std::vector<double> xvalues = boost::assign::list_of(-0.75)(-0.75)(-0.75)(0.0)(0.0)(0.0)(0.75)(0.75)(0.75)(1.5)(1.5)(1.5); - std::vector<double> yvalues = boost::assign::list_of(0.5)(1.5)(3.0)(0.5)(1.5)(3.0)(0.5)(1.5)(3.0)(0.5)(1.5)(3.0); + std::vector<double> xvalues = {-0.75, -0.75, -0.75, 0.0, 0.0, 0.0, + 0.75, 0.75, 0.75, 1.5, 1.5, 1.5}; + std::vector<double> yvalues = {0.5, 1.5, 3.0, 0.5, 1.5, 3.0, + 0.5, 1.5, 3.0, 0.5, 1.5, 3.0}; // put in every histogram bin one double value proportional to globalbin (globalbin*10.0) for(size_t i=0; i<xvalues.size(); ++i) { @@ -160,9 +161,12 @@ TEST_F(Histogram2DTest, projectionX) hist->reset(); // values to fill all histogram - std::vector<double> xvalues = boost::assign::list_of(-0.75)(-0.75)(-0.75)(0.0)(0.0)(0.0)(0.75)(0.75)(0.75)(1.5)(1.5)(1.5); - std::vector<double> yvalues = boost::assign::list_of(0.5)(1.5)(3.0)(0.5)(1.5)(3.0)(0.5)(1.5)(3.0)(0.5)(1.5)(3.0); - std::vector<double> content = boost::assign::list_of(1.0)(2.0)(3.0)(1.0)(2.0)(3.0)(1.0)(2.0)(3.0)(1.0)(2.0)(3.0); + std::vector<double> xvalues = {-0.75, -0.75, -0.75, 0.0, 0.0, 0.0, + 0.75, 0.75, 0.75, 1.5, 1.5, 1.5}; + std::vector<double> yvalues = {0.5, 1.5, 3.0, 0.5, 1.5, 3.0, + 0.5, 1.5, 3.0, 0.5, 1.5, 3.0}; + std::vector<double> content = {1.0, 2.0, 3.0, 1.0, 2.0, 3.0, + 1.0, 2.0, 3.0, 1.0, 2.0, 3.0}; // put in every histogram bin the value from 'content' vector for(size_t i=0; i<xvalues.size(); ++i) { @@ -240,9 +244,12 @@ TEST_F(Histogram2DTest, projectionY) hist->reset(); // values to fill all histogram - std::vector<double> xvalues = boost::assign::list_of(-0.75)(-0.75)(-0.75)(0.0)(0.0)(0.0)(0.75)(0.75)(0.75)(1.5)(1.5)(1.5); - std::vector<double> yvalues = boost::assign::list_of(0.5)(1.5)(3.0)(0.5)(1.5)(3.0)(0.5)(1.5)(3.0)(0.5)(1.5)(3.0); - std::vector<double> content = boost::assign::list_of(1.0)(2.0)(3.0)(1.0)(2.0)(3.0)(1.0)(2.0)(3.0)(1.0)(2.0)(3.0); + std::vector<double> xvalues = {-0.75, -0.75, -0.75, 0.0, 0.0, 0.0, + 0.75, 0.75, 0.75, 1.5, 1.5, 1.5}; + std::vector<double> yvalues = {0.5, 1.5, 3.0, 0.5, 1.5, 3.0, + 0.5, 1.5, 3.0, 0.5, 1.5, 3.0}; + std::vector<double> content = {1.0, 2.0, 3.0, 1.0, 2.0, 3.0, + 1.0, 2.0, 3.0, 1.0, 2.0, 3.0}; // put in every histogram bin the value from 'content' vector for(size_t i=0; i<xvalues.size(); ++i) { @@ -327,9 +334,12 @@ TEST_F(Histogram2DTest, crop) hist->reset(); // values to fill all histogram - std::vector<double> xvalues = boost::assign::list_of(-0.75)(-0.75)(-0.75)(0.0)(0.0)(0.0)(0.75)(0.75)(0.75)(1.5)(1.5)(1.5); - std::vector<double> yvalues = boost::assign::list_of(0.5)(1.5)(3.0)(0.5)(1.5)(3.0)(0.5)(1.5)(3.0)(0.5)(1.5)(3.0); - std::vector<double> content = boost::assign::list_of(1.0)(2.0)(3.0)(1.0)(2.0)(3.0)(1.0)(2.0)(3.0)(1.0)(2.0)(3.0); + std::vector<double> xvalues = {-0.75, -0.75, -0.75, 0.0, 0.0, 0.0, + 0.75, 0.75, 0.75, 1.5, 1.5, 1.5}; + std::vector<double> yvalues = {0.5, 1.5, 3.0, 0.5, 1.5, 3.0, + 0.5, 1.5, 3.0, 0.5, 1.5, 3.0}; + std::vector<double> content = {1.0, 2.0, 3.0, 1.0, 2.0, 3.0, + 1.0, 2.0, 3.0, 1.0, 2.0, 3.0}; // put in every histogram bin the value from 'content' vector for(size_t i=0; i<xvalues.size(); ++i) { diff --git a/Tests/UnitTests/TestCore/IntensityDataFunctionsTest.h b/Tests/UnitTests/TestCore/IntensityDataFunctionsTest.h index e39105d512d8af2c5bc6ad287cc6e0ee97d4e601..503dde8fdb219c56c131a7b8bfaea6d08ff6c7fe 100644 --- a/Tests/UnitTests/TestCore/IntensityDataFunctionsTest.h +++ b/Tests/UnitTests/TestCore/IntensityDataFunctionsTest.h @@ -30,7 +30,7 @@ TEST_F(IntensityDataFunctionsTest, ClipDataSetFixed) } OutputData<double> *clip = IntensityDataFunctions::createClippedDataSet(data, -5.0, 0.0, -1.5, 1.5); - std::vector<double> vref = boost::assign::list_of(0.0)(1.0)(3.0)(4.0)(6.0)(7.0)(9.0)(10.0); + std::vector<double> vref = {0.0, 1.0, 3.0, 4.0, 6.0, 7.0, 9.0, 10.0}; EXPECT_EQ(clip->getAllocatedSize(), size_t(8)); int index(0); for(size_t i=0; i<clip->getAllocatedSize(); ++i) { @@ -56,7 +56,7 @@ TEST_F(IntensityDataFunctionsTest, ClipDataSetVariable) } OutputData<double> *clip = IntensityDataFunctions::createClippedDataSet(data, -0.5, 0.5, 0.99, 2.0); - std::vector<double> vref = boost::assign::list_of(6.0)(7.0)(10.0)(11.0); + std::vector<double> vref = {6.0, 7.0, 10.0, 11.0}; EXPECT_EQ(clip->getAllocatedSize(), size_t(4)); int index(0); for(size_t i=0; i<clip->getAllocatedSize(); ++i) { @@ -93,9 +93,9 @@ TEST_F(IntensityDataFunctionsTest, ClipDataSetVariable) // int index(0); -// std::vector<double> xref = boost::assign::list_of(-4.0)(-4.0)(-4.0)(-3.0)(-2.0)(-1.0)(0.0)(1.0)(2.0)(3.0); -// std::vector<double> yref = boost::assign::list_of(0.0)(1.0)(2.0)(2.0)(2.0)(2.0)(2.0)(2.0)(0.0)(0.0); -// std::vector<double> vref = boost::assign::list_of(0)(1)(2)(5)(8)(11)(14)(17)(18)(21); +// std::vector<double> xref = {-4.0, -4.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0); +// std::vector<double> yref = {0.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 0.0, 0.0); +// std::vector<double> vref = {0, 1, 2, 5, 8, 11, 14, 17, 18, 21); // for(OutputData<double>::iterator it = data.begin(); it!=data.end(); ++it) { // double x = data.getAxisValue(it.getIndex(), "x"); // double y = data.getAxisValue(it.getIndex(), "y"); @@ -127,9 +127,9 @@ TEST_F(IntensityDataFunctionsTest, ClipDataSetVariable) // int index(0); -// std::vector<double> xref = boost::assign::list_of(-4.0)(-4.0)(-4.0)(-3.0)(-2.0)(-1.0)(0.0)(1.0)(2.0)(3.0); -// std::vector<double> yref = boost::assign::list_of(0.0)(1.0)(2.0)(2.0)(2.0)(2.0)(2.0)(2.0)(0.0)(0.0); -// std::vector<double> vref = boost::assign::list_of(0)(1)(2)(5)(8)(11)(14)(17)(18)(21); +// std::vector<double> xref = {-4.0, -4.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0); +// std::vector<double> yref = {0.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 0.0, 0.0); +// std::vector<double> vref = {0, 1, 2, 5, 8, 11, 14, 17, 18, 21); // for(OutputData<double>::iterator it = data.begin(); it!=data.end(); ++it) { // double x = data.getValueOfAxis("x", it.getIndex()); // double y = data.getValueOfAxis("y", it.getIndex()); diff --git a/Tests/UnitTests/TestCore/OutputDataTest.h b/Tests/UnitTests/TestCore/OutputDataTest.h index b2fab501a4405cbd09fe7912bb2fb1ca9b26f782..3446cb7c47f2980bf6819fe91603d7d54e98aaa4 100644 --- a/Tests/UnitTests/TestCore/OutputDataTest.h +++ b/Tests/UnitTests/TestCore/OutputDataTest.h @@ -8,7 +8,6 @@ #include "VariableBinAxis.h" #include "FixedBinAxis.h" #include "ThreadInfo.h" -#include <boost/assign/list_of.hpp> #include "gtest/gtest.h" @@ -273,9 +272,9 @@ TEST_F(OutputDataTest, GetAxisBin) // int index(0); -// std::vector<double> xref = boost::assign::list_of(1.5)(1.5)(2.5)(2.5)(3.5)(3.5)(4.5)(4.5); -// std::vector<double> yref = boost::assign::list_of(1.5)(2.5)(1.5)(2.5)(1.5)(2.5)(1.5)(2.5); -// std::vector<double> vref = boost::assign::list_of(7)(8)(13)(14)(19)(20)(25)(26); +// std::vector<double> xref = {1.5, 1.5, 2.5, 2.5, 3.5, 3.5, 4.5, 4.5); +// std::vector<double> yref = {1.5, 2.5, 1.5, 2.5, 1.5, 2.5, 1.5, 2.5); +// std::vector<double> vref = {7, 8, 13, 14, 19, 20, 25, 26); // for(OutputData<double>::iterator it = data.begin(); it!=data.end(); ++it) { // double x = data.getAxisValue(it.getIndex(), "x"); // double y = data.getAxisValue(it.getIndex(), "y"); @@ -316,9 +315,9 @@ TEST_F(OutputDataTest, GetAxisBin) // int index(0); -// std::vector<double> xref = boost::assign::list_of(-4.0)(-4.0)(-4.0)(-3.0)(-2.0)(-1.0)(0.0)(1.0)(2.0)(2.0)(2.0)(3.0)(3.0)(3.0); -// std::vector<double> yref = boost::assign::list_of(0.0)(1.0)(2.0)(2.0)(2.0)(2.0)(2.0)(2.0)(0.0)(1.0)(2.0)(0.0)(1.0)(2.0); -// std::vector<double> vref = boost::assign::list_of(0)(1)(2)(5)(8)(11)(14)(17)(18)(19)(20)(21)(22)(23); +// std::vector<double> xref = {-4.0, -4.0, -4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0); +// std::vector<double> yref = {0.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 0.0, 1.0, 2.0, 0.0, 1.0, 2.0); +// std::vector<double> vref = {0, 1, 2, 5, 8, 11, 14, 17, 18, 19, 20, 21, 22, 23); // for(OutputData<double>::iterator it = data.begin(); it!=data.end(); ++it) { // double x = data.getAxisValue(it.getIndex(), "x"); // double y = data.getAxisValue(it.getIndex(), "y"); @@ -359,7 +358,7 @@ TEST_F(OutputDataTest, GetAxisBin) // int index(0); -// std::vector<double> vref = boost::assign::list_of(0)(1)(2)(3)(4)(5)(6)(8)(9)(11)(15)(17)(18)(20)(21)(22)(23); +// std::vector<double> vref = {0, 1, 2, 3, 4, 5, 6, 8, 9, 11, 15, 17, 18, 20, 21, 22, 23); // for(OutputData<double>::iterator it = data.begin(); it!=data.end(); ++it) { // EXPECT_EQ(*it, vref[index]); // ++index; @@ -392,9 +391,9 @@ TEST_F(OutputDataTest, GetAxisBin) // IntensityDataFunctions::setRectangularMask(data, -2.5, 1.5, 0.99, 4.99, true); // int index(0); -// std::vector<double> xref = boost::assign::list_of(-2.5)(-2.5)(-1.0)(-1.0)(0.25)(0.25)(0.75)(0.75); -// std::vector<double> yref = boost::assign::list_of(2.0)(4.0)(2.0)(4.0)(2.0)(4.0)(2.0)(4.0); -// std::vector<double> vref = boost::assign::list_of(5)(6)(9)(10)(13)(14)(17)(18); +// std::vector<double> xref = {-2.5, -2.5, -1.0, -1.0, 0.25, 0.25, 0.75, 0.75); +// std::vector<double> yref = {2.0, 4.0, 2.0, 4.0, 2.0, 4.0, 2.0, 4.0); +// std::vector<double> vref = {5, 6, 9, 10, 13, 14, 17, 18); // for(OutputData<double>::iterator it = data.begin(); it!=data.end(); ++it) { // double x = data.getAxisValue(it.getIndex(), "x"); // double y = data.getAxisValue(it.getIndex(), "y"); @@ -428,9 +427,9 @@ TEST_F(OutputDataTest, GetAxisBin) // IntensityDataHelper::setEllipticMask(data, 1.0, 1.0, 0.49, 0.49); // int index(0); -//// std::vector<double> xref = boost::assign::list_of(-2.5)(-2.5)(-1.0)(-1.0)(0.25)(0.25)(0.75)(0.75); -//// std::vector<double> yref = boost::assign::list_of(2.0)(4.0)(2.0)(4.0)(2.0)(4.0)(2.0)(4.0); -// std::vector<double> vref = boost::assign::list_of(8)(9)(12)(13); +//// std::vector<double> xref = {-2.5, -2.5, -1.0, -1.0, 0.25, 0.25, 0.75, 0.75}; +//// std::vector<double> yref = {2.0, 4.0, 2.0, 4.0, 2.0, 4.0, 2.0, 4.0}; +// std::vector<double> vref = {8, 9, 12, 13); // for(OutputData<double>::iterator it = data.begin(); it!=data.end(); ++it) { // double x = data.getValueOfAxis("x", it.getIndex()); // double y = data.getValueOfAxis("y", it.getIndex()); diff --git a/Tests/UnitTests/TestCore/PolygonTest.h b/Tests/UnitTests/TestCore/PolygonTest.h index 067725b4cbfed31d33b832397268f6143a08caee..7cceaa350d498e8955147341af0c90a50636a6d3 100644 --- a/Tests/UnitTests/TestCore/PolygonTest.h +++ b/Tests/UnitTests/TestCore/PolygonTest.h @@ -4,7 +4,6 @@ #include "Polygon.h" #include "gtest/gtest.h" #include <boost/scoped_ptr.hpp> -#include <boost/assign/list_of.hpp> class PolygonTest : public ::testing::Test { @@ -15,8 +14,8 @@ public: TEST_F(PolygonTest, SimpleRectangle) { // simple closed rectangle - std::vector<double> x = boost::assign::list_of(4.0)(-4.0)(-4.0)(4.0)(4.0); - std::vector<double> y = boost::assign::list_of(2.0)(2.0)(-2.0)(-2.0)(2.0); + std::vector<double> x = {4.0, -4.0, -4.0, 4.0, 4.0}; + std::vector<double> y = {2.0, 2.0, -2.0, -2.0, 2.0}; Geometry::Polygon polygon(x, y); EXPECT_DOUBLE_EQ(32.0, polygon.getArea()); EXPECT_TRUE(polygon.contains(0.0, 0.0)); @@ -27,8 +26,8 @@ TEST_F(PolygonTest, SimpleRectangle) EXPECT_FALSE(polygon.contains(4.0, -2.01)); // unclosed rectangle (should be closed automatically) - x = boost::assign::list_of(4.0)(-4.0)(-4.0)(4.0); - y = boost::assign::list_of(2.0)(2.0)(-2.0)(-2.0); + x = {4.0, -4.0, -4.0, 4.0}; + y = {2.0, 2.0, -2.0, -2.0}; Geometry::Polygon polygon2(x, y); EXPECT_DOUBLE_EQ(32.0, polygon2.getArea()); EXPECT_TRUE(polygon2.contains(0.0, 0.0)); @@ -49,8 +48,8 @@ TEST_F(PolygonTest, SimpleRectangle) TEST_F(PolygonTest, SandWatchShape) { - std::vector<double> x = boost::assign::list_of(2.0)(-2.0)(2.0)(-2.0)(2.0); - std::vector<double> y = boost::assign::list_of(2.0)(2.0)(-2.0)(-2.0)(2.0); + std::vector<double> x = {2.0, -2.0, 2.0, -2.0, 2.0}; + std::vector<double> y = {2.0, 2.0, -2.0, -2.0, 2.0}; Geometry::Polygon polygon(x, y); // std::cout << polygon << std::endl; @@ -70,8 +69,8 @@ TEST_F(PolygonTest, SandWatchShape) TEST_F(PolygonTest, ContainsBin) { // simple closed rectangle - std::vector<double> x = boost::assign::list_of(4.0)(-4.0)(-4.0)(4.0)(4.0); - std::vector<double> y = boost::assign::list_of(2.0)(2.0)(-2.0)(-2.0)(2.0); + std::vector<double> x = {4.0, -4.0, -4.0, 4.0, 4.0}; + std::vector<double> y = {2.0, 2.0, -2.0, -2.0, 2.0}; Geometry::Polygon polygon(x, y); Bin1D binx1(3.5, 4.5); @@ -86,8 +85,8 @@ TEST_F(PolygonTest, ContainsBin) TEST_F(PolygonTest, Clone) { - std::vector<double> x = boost::assign::list_of(4.0)(-4.0)(-4.0)(4.0)(4.0); - std::vector<double> y = boost::assign::list_of(2.0)(2.0)(-2.0)(-2.0)(2.0); + std::vector<double> x = {4.0, -4.0, -4.0, 4.0, 4.0}; + std::vector<double> y = {2.0, 2.0, -2.0, -2.0, 2.0}; Geometry::Polygon polygon(x, y); boost::scoped_ptr<Geometry::Polygon > clone(polygon.clone()); @@ -108,7 +107,7 @@ TEST_F(PolygonTest, ConstructFrom2DArray) std::vector<std::vector<double > > points; for(size_t i=0; i<npoints; ++i) { - std::vector<double> p = boost::assign::list_of(array[i][0])(array[i][1]); + std::vector<double> p = {array[i][0], array[i][1]}; points.push_back(p); } diff --git a/Tests/UnitTests/TestCore/Shape2DTest.h b/Tests/UnitTests/TestCore/Shape2DTest.h index 6b17c42182748fec61854e9f306f90f24f9f2dc1..1ffc5d1cbda502a228eb6db7ad817eab51cf7020 100644 --- a/Tests/UnitTests/TestCore/Shape2DTest.h +++ b/Tests/UnitTests/TestCore/Shape2DTest.h @@ -7,7 +7,6 @@ #include "Units.h" #include "gtest/gtest.h" #include <boost/scoped_ptr.hpp> -#include <boost/assign/list_of.hpp> class Shape2DTest : public ::testing::Test { diff --git a/Tests/UnitTests/TestCore/UtilsTest.h b/Tests/UnitTests/TestCore/UtilsTest.h index 1ab49d8282f4b697e37937ff4618953331b54c1d..88adc28db0d1f6b033bf6a1c60a9811ff791a184 100644 --- a/Tests/UnitTests/TestCore/UtilsTest.h +++ b/Tests/UnitTests/TestCore/UtilsTest.h @@ -6,7 +6,6 @@ #include "gtest/gtest.h" #include <map> #include <iostream> -#include <boost/assign/list_of.hpp> #include <boost/scoped_ptr.hpp> using namespace Utils; @@ -24,8 +23,8 @@ TEST_F(UtilsTest, OrderedMapInsert) OrderedMap<int, std::string> omap; EXPECT_EQ( size_t(0), omap.size()); - std::vector<int> keys = boost::assign::list_of(3)(2)(1); - std::vector<std::string> values = boost::assign::list_of("aaa")("bbb")("ccc"); + std::vector<int> keys = {3, 2, 1}; + std::vector<std::string> values = {"aaa", "bbb", "ccc"}; omap.insert(keys[0], values[0]); omap.insert(keys[1], values[1]); @@ -49,8 +48,8 @@ TEST_F(UtilsTest, OrderedMapErase) { OrderedMap<std::string, double> omap; - std::vector<std::string> keys = boost::assign::list_of("ccc")("bbb")("aaa"); - std::vector<double> values = boost::assign::list_of(2.0)(1.0)(3.0); + std::vector<std::string> keys = {"ccc", "bbb", "aaa"}; + std::vector<double> values = {2.0, 1.0, 3.0}; omap.insert(keys[0], values[0]); omap.insert(keys[1], values[1]); @@ -71,8 +70,8 @@ TEST_F(UtilsTest, OrderedMapErase) EXPECT_EQ(omap.erase("bbb"), size_t(1)); EXPECT_EQ(size_t(2), omap.size()); - keys = boost::assign::list_of("ccc")("aaa"); - values = boost::assign::list_of(2.0)(3.0); + keys = {"ccc", "aaa"}; + values = {2.0, 3.0}; npos = 0; for(OrderedMap<std::string, double>::const_iterator it = omap.begin(); it!= omap.end(); ++it) { EXPECT_EQ(keys[npos], it->first); diff --git a/ThirdParty/RootMinimizers/inc/TMVA/Types.h b/ThirdParty/RootMinimizers/inc/TMVA/Types.h index 9622f88fe9614e8d85f28fa5390072e5a4a5ce0e..789541c1b361e725006a82ac2c84fc2535dc892e 100644 --- a/ThirdParty/RootMinimizers/inc/TMVA/Types.h +++ b/ThirdParty/RootMinimizers/inc/TMVA/Types.h @@ -1,4 +1,4 @@ -// @(#)root/tmva $Id$ +// @(#)root/tmva $Id$ // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss /********************************************************************************** @@ -17,9 +17,9 @@ * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany * * * * Copyright (c) 2005: * - * CERN, Switzerland * - * U. of Victoria, Canada * - * MPI-K Heidelberg, Germany * + * CERN, Switzerland * + * U. of Victoria, Canada * + * MPI-K Heidelberg, Germany * * * * Redistribution and use in source and binary forms, with or without * * modification, are permitted according to the terms listed in LICENSE * @@ -38,9 +38,9 @@ ////////////////////////////////////////////////////////////////////////// //#include <map> -//#if __cplusplus > 199711L -//#include <atomic> -//#endif +#if __cplusplus > 199711L +#include <atomic> +#endif //#ifndef ROOT_Rtypes //#include "Rtypes.h" @@ -190,9 +190,9 @@ namespace BA_TMVA { enum ETreeType { kTraining = 0, kTesting, - kMaxTreeType, // also used as temporary storage for trees not yet assigned for testing;training... + kMaxTreeType, // also used as temporary storage for trees not yet assigned for testing;training... kValidation, // these are placeholders... currently not used, but could be moved "forward" if - kTrainingOriginal // ever needed + kTrainingOriginal // ever needed }; enum EBoostStage { @@ -222,11 +222,11 @@ namespace BA_TMVA { private: Types(); -//#if __cplusplus > 199711L -// static std::atomic<Types*> fgTypesPtr; -//#else +#if __cplusplus > 199711L + static std::atomic<Types*> fgTypesPtr; +#else static Types* fgTypesPtr; -//#endif +#endif private: diff --git a/ThirdParty/RootMinimizers/src/TMVA/Types.cxx b/ThirdParty/RootMinimizers/src/TMVA/Types.cxx index 406b5e443b2a4082c93e8f3041a4f484d5aa989f..3d2625d89686a45fb6fb2340bd4b9beb31b059c3 100644 --- a/ThirdParty/RootMinimizers/src/TMVA/Types.cxx +++ b/ThirdParty/RootMinimizers/src/TMVA/Types.cxx @@ -35,7 +35,7 @@ //#include "MsgLogger.h" #if __cplusplus > 199711L -std::atomic<TMVA::Types*> TMVA::Types::fgTypesPtr{0}; +std::atomic<BA_TMVA::Types*> BA_TMVA::Types::fgTypesPtr{0}; static std::mutex gTypesMutex; #else BA_TMVA::Types* BA_TMVA::Types::fgTypesPtr = 0; diff --git a/cmake/modules/SetUpLinux.cmake b/cmake/modules/SetUpLinux.cmake index 646ed5008e3093ed48250a29c8a218f329734724..7fe9db133fa942e9fc6771caeb3ebab479843ad3 100644 --- a/cmake/modules/SetUpLinux.cmake +++ b/cmake/modules/SetUpLinux.cmake @@ -21,6 +21,7 @@ set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g") set(CMAKE_C_FLAGS_RELEASE "-O2") set(CMAKE_C_FLAGS_DEBUG "-g") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${CMAKE_SOURCE_DIR}/Core/Tools/inc -include WinDllMacros.h") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe ${BIT_ENVIRONMENT} -Wall -W -Woverloaded-virtual -fPIC") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe ${BIT_ENVIRONMENT} -Wall -W -fPIC")