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 "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 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 479 of file JDOMSimulator.cc.

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