Jpp  18.6.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions
JEventGenerator.cc File Reference

Program for real-time simulation of data. More...

#include <string>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <limits>
#include "Jeep/JParser.hh"
#include "Jeep/JProperties.hh"
#include "Jeep/JTimer.hh"
#include "Jeep/JTimekeeper.hh"
#include "JLang/JSharedPointer.hh"
#include "JNet/JControlHost.hh"
#include "km3net-dataformat/online/JDAQ.hh"
#include "JDAQ/JDAQEventIO.hh"
#include "JTrigger/JTriggerParameters.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JSupport.hh"
#include "JSupport/JTriggerParametersSupportkit.hh"
#include "JRuncontrol/JDAQClient.hh"
#include "JIO/JByteArrayIO.hh"

Go to the source code of this file.

Classes

class  KM3NETDAQ::JEventGenerator
 Runcontrol client to simulate data filter(s). More...
 

Namespaces

 KM3NETDAQ
 KM3NeT DAQ data structures and auxiliaries.
 

Functions

int main (int argc, char *argv[])
 

Detailed Description

Program for real-time simulation of data.

Author
mdejong

Definition in file JEventGenerator.cc.

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 215 of file JEventGenerator.cc.

216 {
217  using namespace std;
218 
219  string server;
220  string logger;
221  string client_name;
222  bool use_cout;
223  int debug;
224 
225  try {
226 
227  JParser<> zap("Program for real-time simulation of data.");
228 
229  zap['H'] = make_field(server) = "localhost";
230  zap['M'] = make_field(logger) = "localhost";
231  zap['u'] = make_field(client_name) = "%";
232  zap['c'] = make_field(use_cout);
233  zap['d'] = make_field(debug) = 3;
234 
235  zap(argc, argv);
236  }
237  catch(const exception &error) {
238  FATAL(error.what() << endl);
239  }
240 
241 
242  using namespace KM3NETDAQ;
243  using namespace JPP;
244 
245  JLogger* out = NULL;
246 
247  if (use_cout)
248  out = new JStreamLogger(cout);
249  else
250  out = new JControlHostLogger(logger);
251 
252  JEventGenerator enigma(getProcessName(client_name, argv[0]), server, out, debug);
253 
254  enigma.enter();
255  enigma.run();
256 }
Utility class to parse command line options.
Definition: JParser.hh:1711
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client.
Message logging based on std::ostream.
Interface for logging messages.
Definition: JLogger.hh:22
Message logging based on ControlHost.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:2158
Runcontrol client to simulate data filter(s).
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level