#include <iostream>
#include <HEPfit.h>
#include <boost/bind.hpp>
#include "myModel.h"
#include "myObservables.h"
#ifdef _MPI
#include <mpi.h>
#endif
int main(
int argc,
char** argv)
{
#ifdef _MPI
MPI_Init(&argc, &argv);
int rank;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
#else
int rank = 0;
#endif
try {
if(argc != 3){
if (rank == 0) std::cout << "\nusage: " << argv[0] << " ModelConf.conf MonteCarlo.conf\n" << std::endl;
return EXIT_SUCCESS;
}
std::string ModelConf = argv[1];
std::string MCMCConf = argv[2];
std::string FileOut = "";
std::string JobTag = "";
ThObsF.
addObsToFactory(
"BIN1", boost::bind(boost::factory<yield*>(), _1, 1) );
ThObsF.
addObsToFactory(
"BIN2", boost::bind(boost::factory<yield*>(), _1, 2) );
ThObsF.
addObsToFactory(
"BIN3", boost::bind(boost::factory<yield*>(), _1, 3) );
ThObsF.
addObsToFactory(
"BIN4", boost::bind(boost::factory<yield*>(), _1, 4) );
ThObsF.
addObsToFactory(
"BIN5", boost::bind(boost::factory<yield*>(), _1, 5) );
ThObsF.
addObsToFactory(
"BIN6", boost::bind(boost::factory<yield*>(), _1, 6) );
MonteCarlo MC(ModelF, ThObsF, ModelConf, MCMCConf, FileOut, JobTag);
#ifdef _MPI
MPI_Finalize();
#endif
return EXIT_SUCCESS;
} catch (const std::runtime_error& e) {
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}
}