Jpp
Classes | Namespaces | Functions
JDOMSimulator.cc File Reference
#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 "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

◆ main()

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

Definition at line 486 of file JDOMSimulator.cc.

487 {
488  using namespace std;
489 
490  string server;
491  string logger;
492  string client_name;
493  bool use_cout;
494  int debug;
495 
496  try {
497 
498  JParser<> zap("Program for real-time simulation of optical modules.");
499 
500  zap['H'] = make_field(server) = "localhost";
501  zap['M'] = make_field(logger) = "localhost";
502  zap['u'] = make_field(client_name) = "JDOMSimulator";
503  zap['c'] = make_field(use_cout);
504  zap['d'] = make_field(debug) = 3;
505 
506  zap(argc, argv);
507  }
508  catch(const exception &error) {
509  FATAL(error.what() << endl);
510  }
511 
512 
513  using namespace KM3NETDAQ;
514  using namespace JPP;
515 
516  JLogger* out = NULL;
517 
518  if (use_cout)
519  out = new JStreamLogger(cout);
520  else
521  out = new JControlHostLogger(logger);
522 
523  JDOMSimulator simbad(client_name, server, out, debug);
524 
525  simbad.enter();
526  simbad.run();
527 }
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
KM3NETDAQ::JDOMSimulator
Runcontrol client to simulate DOM.
Definition: JDOMSimulator.cc:166
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