17 #include <TApplication.h> 
   19 #include "boost/program_options.hpp" 
   21 #include "FairMQLogger.h" 
   22 #include "FairMQParser.h" 
   23 #include "FairMQProgOptions.h" 
   26 #include "FairMQTransportFactoryNN.h" 
   28 #include "FairMQTransportFactoryZMQ.h" 
   31 using namespace boost::program_options;
 
   33 int main(
int argc, 
char** argv)
 
   36     sorter.CatchSignals();
 
   38     FairMQProgOptions config;
 
   42         config.ParseAll(argc, argv);
 
   44         std::string 
filename = config.GetValue<std::string>(
"config-json-file");
 
   45         std::string 
id = config.GetValue<std::string>(
"id");
 
   47         config.UserParser<FairMQParser::JSON>(
filename, id);
 
   49         sorter.fChannels = config.GetFairMQMap();
 
   51         LOG(INFO) << 
"PID: " << getpid();
 
   54         FairMQTransportFactory* transportFactory = 
new FairMQTransportFactoryNN();
 
   56         FairMQTransportFactory* transportFactory = 
new FairMQTransportFactoryZMQ();
 
   59         sorter.SetTransport(transportFactory);
 
   61         sorter.SetProperty(PndMQTopix4Sorter::Id, 
id);
 
   63         sorter.ChangeState(
"INIT_DEVICE");
 
   64         sorter.WaitForEndOfState(
"INIT_DEVICE");
 
   66         sorter.ChangeState(
"INIT_TASK");
 
   67         sorter.WaitForEndOfState(
"INIT_TASK");
 
   69         sorter.ChangeState(
"RUN");
 
   70         sorter.InteractiveStateLoop();
 
   73     catch (std::exception& e)
 
   75         LOG(ERROR) << e.what();
 
   76         LOG(INFO) << 
"Command line options are the following: ";
 
int main(int argc, char **argv)