#include <iostream>
#include "boost/program_options.hpp"
#include "FairMQLogger.h"
#include "FairMQParser.h"
#include "FairMQProgOptions.h"
#include "PndMQFileSamplerHits.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 32 of file runPndTopixHitSampler.cxx.
References fe, filename, PndMQFileSamplerHits::InputFile, and PndMQFileSamplerHits::SetProperty().
   35     sampler.CatchSignals();
 
   37     FairMQProgOptions config;
 
   45         options_description samplerOptions(
"Sampler options");
 
   46         samplerOptions.add_options()
 
   47             (
"InputFile", value<std::string>(&text)->default_value(
"HitsFE1.root"), 
"FileName of data to read");
 
   50         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");
 
   57         config.UserParser<FairMQParser::JSON>(
filename, id);
 
   59         sampler.fChannels = config.GetFairMQMap();
 
   61         LOG(INFO) << 
"PID: " << getpid();
 
   64         FairMQTransportFactory* transportFactory = 
new FairMQTransportFactoryNN();
 
   66         FairMQTransportFactory* transportFactory = 
new FairMQTransportFactoryZMQ();
 
   69         sampler.SetTransport(transportFactory);
 
   73         sampler.ChangeState(
"INIT_DEVICE");
 
   74         sampler.WaitForEndOfState(
"INIT_DEVICE");
 
   76         sampler.ChangeState(
"INIT_TASK");
 
   77         sampler.WaitForEndOfState(
"INIT_TASK");
 
   79         sampler.ChangeState(
"RUN");
 
   80         sampler.InteractiveStateLoop();
 
   82     catch (std::exception& e)
 
   84         LOG(ERROR) << e.what();
 
   85         LOG(INFO) << 
"Command line options are the following: ";
 
void SetProperty(const int key, const std::string &value)