Jpp 21.0.0-rc.1-88-g0130508c4
the software that should make you happy
Loading...
Searching...
No Matches
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 <memory>
#include "km3net-dataformat/online/JDAQ.hh"
#include "JNet/JControlHost.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"
#include "Jeep/JParser.hh"
#include "Jeep/JProperties.hh"
#include "Jeep/JTimer.hh"
#include "Jeep/JTimekeeper.hh"

Go to the source code of this file.

Classes

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

Namespaces

namespace  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 216 of file JEventGenerator.cc.

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