#include <PndMQSorterDistributor.h>
#include <iostream>
#include "boost/program_options.hpp"
#include "FairMQLogger.h"
#include "FairMQParser.h"
#include "FairMQProgOptions.h"
#include "FairMQProcessor.h"
#include "FairMQDevice.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 35 of file runPndTopixSorterDistributor.cxx.
References fe, and filename.
   38     processor.CatchSignals();
 
   40     FairMQProgOptions config;
 
   44     options_description samplerOptions(
"Sampler options");
 
   45         samplerOptions.add_options()
 
   46                 (
"FE", value<int>(&
fe)->default_value(-1), 
"Front-End ID");
 
   48         config.AddToCmdLineOptions(samplerOptions);
 
   52         config.ParseAll(argc, argv);
 
   54         std::string 
filename = config.GetValue<std::string>(
"config-json-file");
 
   55         std::string 
id = config.GetValue<std::string>(
"id");
 
   58         config.UserParser<FairMQParser::JSON>(
filename, id);
 
   60         processor.fChannels = config.GetFairMQMap();
 
   62         LOG(INFO) << 
"PID: " << getpid();
 
   63         LOG(INFO) << 
"ID: " << id ;
 
   64         LOG(INFO) << 
"FE: " << 
fe;
 
   65         LOG(INFO) << 
"Processor::Id Kes: " << FairMQDevice::Id;
 
   66         processor.ListProperties();
 
   69         FairMQTransportFactory* transportFactory = 
new FairMQTransportFactoryNN();
 
   71         FairMQTransportFactory* transportFactory = 
new FairMQTransportFactoryZMQ();
 
   74         processor.SetTransport(transportFactory);
 
   76         processor.SetProperty(FairMQDevice::Id, 
id);
 
   81         processor.ChangeState(
"INIT_DEVICE");
 
   82         processor.WaitForEndOfState(
"INIT_DEVICE");
 
   84         processor.ChangeState(
"INIT_TASK");
 
   85         processor.WaitForEndOfState(
"INIT_TASK");
 
   87         processor.ChangeState(
"RUN");
 
   88         processor.InteractiveStateLoop();
 
   90     catch (std::exception& e)
 
   92         LOG(ERROR) << e.what();
 
   93         LOG(INFO) << 
"Command line options are the following: ";