Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions
JDOMSimulator.cc File Reference

Program for real-time simulation of optical modules. More...

#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <limits>
#include "Jeep/JParser.hh"
#include "Jeep/JProperties.hh"
#include "Jeep/JTimer.hh"
#include "Jeep/JTimekeeper.hh"
#include "JDAQ/JDAQ.hh"
#include "JDAQ/JDAQHeader.hh"
#include "JDAQ/JDAQTimeslice.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 JDOMSimulator. More...
 
class  KM3NETDAQ::JTarget
 Data structure for configuration of JDataFilter. More...
 
class  KM3NETDAQ::JDOMSimulator
 Runcontrol client to simulate DOM. More...
 
class  KM3NETDAQ::JDOMSimulator::JData
 

Namespaces

 KM3NETDAQ
 KM3NeT DAQ data structures and auxiliaries.
 

Functions

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

Detailed Description

Program for real-time simulation of optical modules.

Author
rbruijn

Definition in file JDOMSimulator.cc.

Function Documentation

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

Definition at line 453 of file JDOMSimulator.cc.

454 {
455  using namespace std;
456 
457  string server;
458  string logger;
459  string client_name;
460  bool use_cout;
461  int debug;
462 
463  try {
464 
465  JParser<> zap("Program for real-time simulation of optical modules.");
466 
467  zap['H'] = make_field(server) = "localhost";
468  zap['M'] = make_field(logger) = "localhost";
469  zap['u'] = make_field(client_name) = "JDOMSimulator";
470  zap['c'] = make_field(use_cout);
471  zap['d'] = make_field(debug) = 3;
472 
473  zap(argc, argv);
474  }
475  catch(const exception &error) {
476  FATAL(error.what() << endl);
477  }
478 
479 
480  using namespace KM3NETDAQ;
481  using namespace JPP;
482 
483  JLogger* out = NULL;
484 
485  if (use_cout)
486  out = new JStreamLogger(cout);
487  else
488  out = new JControlHostLogger(logger);
489 
490  JDOMSimulator simbad(client_name, server, out, debug);
491 
492  simbad.enter();
493  simbad.run();
494 }
Utility class to parse command line options.
Definition: JParser.hh:1410
Runcontrol client to simulate DOM.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1836
int debug
debug level
Definition: JSirene.cc:59
#define FATAL(A)
Definition: JMessage.hh:65