#include <PndMQTopix4Sorter.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 runPndTopixSorter.cxx.
References filename.
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: ";