Jpp
Classes | Namespaces | Functions
JEventGenerator.cc File Reference
#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 "JDAQ/JDAQ.hh"
#include "JDAQ/JDAQEvent.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

◆ main()

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 }
KM3NETDAQ::JEventGenerator
Runcontrol client to simulate data filter(s).
Definition: JEventGenerator.cc:34
JPARSER::JParser
Utility class to parse command line options.
Definition: JParser.hh:1493
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
debug
int debug
debug level
Definition: JSirene.cc:59
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
std
Definition: jaanetDictionary.h:36
KM3NETDAQ
KM3NeT DAQ data structures and auxiliaries.
Definition: DataQueue.cc:39
FATAL
#define FATAL(A)
Definition: JMessage.hh:67
KM3NETDAQ::getProcessName
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client.
Definition: JRuncontrolToolkit.hh:194