#include <PndMQTopix4OnlineHisto.h>
#include <iostream>
#include "boost/program_options.hpp"
#include "FairMQLogger.h"
#include "FairMQParser.h"
#include "FairMQProgOptions.h"
#include "FairMQProcessor.h"
#include "FairMQDevice.h"
#include "TApplication.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 37 of file runPndTopixOnlineHisto.cxx.
References filename, and PndMQTopix4OnlineHisto::Run().
40 processor.CatchSignals();
42 FairMQProgOptions config;
44 TApplication theApp(
"App",0,0);
48 config.ParseAll(argc, argv);
50 std::string
filename = config.GetValue<std::string>(
"config-json-file");
51 std::string
id = config.GetValue<std::string>(
"id");
54 config.UserParser<FairMQParser::JSON>(
filename, id);
56 processor.fChannels = config.GetFairMQMap();
58 LOG(INFO) <<
"PID: " << getpid();
59 LOG(INFO) <<
"ID: " << id ;
62 FairMQTransportFactory* transportFactory =
new FairMQTransportFactoryNN();
64 FairMQTransportFactory* transportFactory =
new FairMQTransportFactoryZMQ();
67 processor.SetTransport(transportFactory);
69 processor.SetProperty(FairMQDevice::Id,
id);
74 processor.ChangeState(
"INIT_DEVICE");
75 processor.WaitForEndOfState(
"INIT_DEVICE");
77 processor.ChangeState(
"INIT_TASK");
78 processor.WaitForEndOfState(
"INIT_TASK");
80 processor.ChangeState(
"RUN");
82 processor.InteractiveStateLoop();
84 catch (std::exception& e)
86 LOG(ERROR) << e.what();
87 LOG(INFO) <<
"Command line options are the following: ";