Skip to content
Snippets Groups Projects
Commit b21a93ab authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

UUID from boost is used for Genetic minimizer

parent da37b936
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,7 @@ FitSuite *GeneticTest::createFitSuite()
result->initPrint(200);
IMinimizer *minimizer = MinimizerFactory::createMinimizer(m_minimizer_name, m_minimizer_algorithm);
minimizer->getOptions().setMaxIterations(1);
minimizer->getOptions().setValue("RandomSeed",1);
// minimizer->getOptions().setValue("RandomSeed",1);
result->setMinimizer(minimizer);
for (size_t i = 0; i < m_parameters.size(); ++i) {
result->addFitParameter(m_parameters[i].m_name, m_parameters[i].m_start_value,
......
......@@ -53,3 +53,6 @@ target_link_libraries(${library_name} ${GSL_LIBRARIES})
# include_directories(${ROOT_INCLUDE_DIR})
#endif()
include_directories(
${Boost_INCLUDE_DIRS}
)
#include "TMVA/TUUID.h"
#include <string.h>
#include <iostream>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
//#include <boost/uuid/uuid_io.hpp>
TUUID::TUUID() : fTimeLow(0)
{
}
// ROOT's implementation is removed in the favor of boost implementation
void TUUID::GetUUID(UChar_t uuid[16]) const
{
// Return uuid in specified buffer (16 byte = 128 bits).
memcpy(uuid, &fTimeLow, 16);
// memcpy(uuid, fTimeLow, 16);
boost::uuids::random_generator generator;
boost::uuids::uuid boost_uuid = generator();
memcpy(uuid, boost_uuid.begin(), 16);
// std::cout << boost_uuid << "aaa" << uuid[0] << std::endl;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment