FairRoot/PandaRoot
Typedefs | Functions
runTaskProcessor.cxx File Reference
#include <PndMvdMQTaskProcessor.h>
#include <csignal>
#include "FairMQLogger.h"
#include "GenericProcessor.h"
#include "runSimpleMQStateMachine.h"
#include "BoostSerializer.h"
#include "RootSerializer.h"
#include "PndMvdPixelClusterTask.h"
#include "PndMvdStripClusterTask.h"

Go to the source code of this file.

Typedefs

using PixelHitFinder = PndMvdMQTaskProcessor< PndMvdPixelClusterTask >
 std More...
 
using StripHitFinder = PndMvdMQTaskProcessor< PndMvdStripClusterTask >
 

Functions

int main (int argc, char **argv)
 

Typedef Documentation

std

FairRoot - FairMQ - base/MQ

Definition at line 17 of file runTaskProcessor.cxx.

Definition at line 18 of file runTaskProcessor.cxx.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 24 of file runTaskProcessor.cxx.

References PndMvdMQTaskProcessor< T >::SetDataToKeep().

24  {
25  try {
26  std::string taskname;
27  std::string keepdata;
28 
29  namespace po = boost::program_options;
30  po::options_description processor_options("Processor options");
31  processor_options.add_options()("task-name",
32  po::value<std::string>(&taskname)->required(),
33  "Name of task to run")("keep-data",
34  po::value<std::string>(&keepdata),
35  "Name of data to keep in stream");
36 
37  FairMQProgOptions config;
38  config.AddToCmdLineOptions(processor_options);
39 
40  config.ParseAll(argc, argv);
41 
42  if (strcmp(taskname.c_str(), "PndMvdPixelClusterTask") == 0) {
43  PixelHitFinder processor;
44  processor.SetDataToKeep(keepdata);
45  runStateMachine(processor, config);
46  } else if (strcmp(taskname.c_str(), "PndMvdStripClusterTask") == 0) {
47  StripHitFinder processor;
48  processor.SetDataToKeep(keepdata);
49  runStateMachine(processor, config);
50  } else {
51  LOG(INFO) << "TASK \"" << taskname << "\" UNKNOWN!!! " << strcmp(taskname.c_str(), "PndMvdStripClusterTask");
52  }
53 
54 
55  } catch (std::exception& e) {
56  LOG(ERROR) << "Unhandled Exception reached the top of main: "
57  << e.what() << ", application will now exit";
58  return 1;
59  }
60 
61  return 0;
62 }
void SetDataToKeep(std::string tStr)