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

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

#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <limits>
#include "TRandom3.h"
#include "JMath/JRandom.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JProperties.hh"
#include "Jeep/JTimer.hh"
#include "Jeep/JTimekeeper.hh"
#include "km3net-dataformat/online/JDAQ.hh"
#include "JDAQ/JDAQHeaderIO.hh"
#include "JDAQ/JDAQTimesliceIO.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JSupport.hh"
#include "JLang/JException.hh"
#include "JLang/JRedirectStream.hh"
#include "JRuncontrol/JDAQClient.hh"
#include "JIO/JByteArrayIO.hh"
#include "JNet/JSocket.hh"
#include "JNet/JHostname.hh"
#include "JNet/JSocketBlocking.hh"

Go to the source code of this file.

Classes

class  KM3NETDAQ::JSource
 Data structure for configuration of JDQSimulator. More...
 
class  KM3NETDAQ::JTarget
 Data structure for configuration of JDataFilter. More...
 
class  KM3NETDAQ::JDQSimulator
 Runcontrol client to simulate data queue. More...
 
class  KM3NETDAQ::JDQSimulator::JData
 

Namespaces

 KM3NETDAQ
 KM3NeT DAQ data structures and auxiliaries.
 

Functions

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

Detailed Description

Program for real-time simulation of data queue.

Author
rbruijn

Definition in file JDQSimulator.cc.

Function Documentation

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

Definition at line 477 of file JDQSimulator.cc.

478 {
479  using namespace std;
480 
481  string server;
482  string logger;
483  string client_name;
484  bool use_cout;
485  int debug;
486 
487  try {
488 
489  JParser<> zap("Program for real-time simulation of data queue.");
490 
491  zap['H'] = make_field(server) = "localhost";
492  zap['M'] = make_field(logger) = "localhost";
493  zap['u'] = make_field(client_name) = "JDQSimulator";
494  zap['c'] = make_field(use_cout);
495  zap['d'] = make_field(debug) = 3;
496 
497  zap(argc, argv);
498  }
499  catch(const exception &error) {
500  FATAL(error.what() << endl);
501  }
502 
503 
504  using namespace KM3NETDAQ;
505  using namespace JPP;
506 
507  JLogger* out = NULL;
508 
509  if (use_cout)
510  out = new JStreamLogger(cout);
511  else
512  out = new JControlHostLogger(logger);
513 
514  JDQSimulator simbad(client_name, server, out, debug);
515 
516  simbad.enter();
517  simbad.run();
518 }
Utility class to parse command line options.
Definition: JParser.hh:1514
Message logging based on std::ostream.
Interface for logging messages.
Definition: JLogger.hh:22
Message logging based on ControlHost.
Runcontrol client to simulate data queue.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1989
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level