Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JDQSimulator.cc File Reference

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

#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <limits>
#include <map>
#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"
#include "JTools/JRange.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

namespace  KM3NETDAQ
 KM3NeT DAQ data structures and auxiliaries.
 

Typedefs

typedef JRange< int > KM3NETDAQ::range_type
 
typedef std::map< int, range_typeKM3NETDAQ::map_type
 

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

◆ main()

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

Definition at line 502 of file JDQSimulator.cc.

503{
504 using namespace std;
505
506 string server;
507 string logger;
508 string client_name;
509 bool use_cout;
510 int debug;
511
512 try {
513
514 JParser<> zap("Program for real-time simulation of data queue.");
515
516 zap['H'] = make_field(server) = "localhost";
517 zap['M'] = make_field(logger) = "localhost";
518 zap['u'] = make_field(client_name) = "JDQSimulator";
519 zap['c'] = make_field(use_cout);
520 zap['d'] = make_field(debug) = 3;
521
522 zap(argc, argv);
523 }
524 catch(const exception &error) {
525 FATAL(error.what() << endl);
526 }
527
528
529 using namespace KM3NETDAQ;
530 using namespace JPP;
531
532 JLogger* out = NULL;
533
534 if (use_cout)
535 out = new JStreamLogger(cout);
536 else
537 out = new JControlHostLogger(logger);
538
539 JDQSimulator simbad(client_name, server, out, debug);
540
541 simbad.enter();
542 simbad.run();
543}
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
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:1698
Runcontrol client to simulate data queue.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39