#include <PndMQSorterMerger.h>
#include <iostream>
#include <TApplication.h>
#include "boost/program_options.hpp"
#include "FairMQLogger.h"
#include "FairMQParser.h"
#include "FairMQProgOptions.h"
#include "FairMQTransportFactoryZMQ.h"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 33 of file runPndTopixSorterMerger.cxx.
References filename.
36 sorter.CatchSignals();
38 FairMQProgOptions config;
42 config.ParseAll(argc, argv);
43 std::string
filename = config.GetValue<std::string>(
"config-json-file");
44 std::string
id = config.GetValue<std::string>(
"id");
46 config.UserParser<FairMQParser::JSON>(
filename, id);
48 sorter.fChannels = config.GetFairMQMap();
50 LOG(INFO) <<
"PID: " << getpid();
53 FairMQTransportFactory* transportFactory =
new FairMQTransportFactoryNN();
55 FairMQTransportFactory* transportFactory =
new FairMQTransportFactoryZMQ();
58 sorter.SetTransport(transportFactory);
60 sorter.SetProperty(PndMQSorterMerger::Id,
id);
62 sorter.ChangeState(
"INIT_DEVICE");
63 sorter.WaitForEndOfState(
"INIT_DEVICE");
65 sorter.ChangeState(
"INIT_TASK");
66 sorter.WaitForEndOfState(
"INIT_TASK");
68 sorter.ChangeState(
"RUN");
69 sorter.InteractiveStateLoop();
72 catch (std::exception& e)
74 LOG(ERROR) << e.what();
75 LOG(INFO) <<
"Command line options are the following: ";