Jpp  15.0.3
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 202 of file JEventGenerator.cc.

203 {
204  using namespace std;
205 
206  string server;
207  string logger;
208  string client_name;
209  bool use_cout;
210  int debug;
211 
212  try {
213 
214  JParser<> zap("Program for real-time simulation of data.");
215 
216  zap['H'] = make_field(server) = "localhost";
217  zap['M'] = make_field(logger) = "localhost";
218  zap['u'] = make_field(client_name) = "%";
219  zap['c'] = make_field(use_cout);
220  zap['d'] = make_field(debug) = 3;
221 
222  zap(argc, argv);
223  }
224  catch(const exception &error) {
225  FATAL(error.what() << endl);
226  }
227 
228 
229  using namespace KM3NETDAQ;
230  using namespace JPP;
231 
232  JLogger* out = NULL;
233 
234  if (use_cout)
235  out = new JStreamLogger(cout);
236  else
237  out = new JControlHostLogger(logger);
238 
239  JEventGenerator enigma(getProcessName(client_name, argv[0]), server, out, debug);
240 
241  enigma.enter();
242  enigma.run();
243 }
Utility class to parse command line options.
Definition: JParser.hh:1500
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:1961
Runcontrol client to simulate data filter(s).
int debug
debug level
Definition: JSirene.cc:63
#define FATAL(A)
Definition: JMessage.hh:67