Jpp 21.0.0-rc.1-88-g0130508c4
the software that should make you happy
Loading...
Searching...
No Matches
JDataWriter.cc File Reference

Application for writing real-time data to disk. More...

#include <string>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <map>
#include "km3net-dataformat/online/JDAQ.hh"
#include "JNet/JControlHost.hh"
#include "JLang/JException.hh"
#include "JLang/JSharedPointer.hh"
#include "JLogger/JMessageScheduler.hh"
#include "JDAQ/JDAQTags.hh"
#include "JDAQ/JDAQEventIO.hh"
#include "JDAQ/JDAQTimesliceIO.hh"
#include "JDAQ/JDAQSummarysliceIO.hh"
#include "JTrigger/JTriggerParameters.hh"
#include "JRuncontrol/JDAQClient.hh"
#include "JRuncontrol/JRuncontrolToolkit.hh"
#include "JIO/JByteArrayIO.hh"
#include "JTools/JAutoMap.hh"
#include "JSupport/JMeta.hh"
#include "JSupport/JSupport.hh"
#include "JSupport/JAutoTreeWriter.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JProperties.hh"
#include "Jeep/JTimer.hh"
#include "Jeep/JTimekeeper.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JeepToolkit.hh"

Go to the source code of this file.

Classes

class  KM3NETDAQ::JDataWriter
 Runcontrol client to write data to disk. More...
 
struct  KM3NETDAQ::JDataWriter::JValue_t
 Auxiliary data structure for I/O of trigger parameters. More...
 
struct  KM3NETDAQ::JDataWriter::JRunDB
 Map run number to trigger parameters. More...
 

Namespaces

namespace  JSUPPORT
 Support classes and methods for experiment specific I/O.
 
namespace  KM3NETDAQ
 KM3NeT DAQ data structures and auxiliaries.
 

Typedefs

typedef JSUPPORT::JAutoTreeWriter< JNET::JTagJTreeWriter_t
 Type definition of auto map.
 

Functions

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

Detailed Description

Application for writing real-time data to disk.

Author
mdejong

Definition in file JDataWriter.cc.

Typedef Documentation

◆ JTreeWriter_t

Type definition of auto map.

Definition at line 36 of file JDataWriter.cc.

Function Documentation

◆ main()

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

Definition at line 552 of file JDataWriter.cc.

553{
554 using namespace std;
555 using namespace JPP;
556 using namespace KM3NETDAQ;
557
558 string server;
559 string logger;
560 string hostname;
561 string client_name;
562 bool use_cout;
563 string path;
564 int debug;
565
566 try {
567
568 JParser<> zap("Application for writing real-time data to disk.");
569
570 zap['H'] = make_field(server, "host name of server for command messages") = "localhost";
571 zap['M'] = make_field(logger, "host name of server for logger messages") = "localhost";
572 zap['D'] = make_field(hostname, "host name of server for incoming data from data filter") = "localhost";
573 zap['u'] = make_field(client_name, "client name") = "%";
574 zap['c'] = make_field(use_cout, "print to terminal");
575 zap['p'] = make_field(path, "directory for permanent archival of data") = "";
576 zap['d'] = make_field(debug, "debug level") = 0;
577
578
579 zap(argc, argv);
580 }
581 catch(const exception &error) {
582 FATAL(error.what() << endl);
583 }
584
585
586 JLogger* out = NULL;
587
588 if (use_cout)
589 out = new JStreamLogger(cout);
590 else
591 out = new JControlHostLogger(logger);
592
593 JDataWriter dwriter(getProcessName(client_name, argv[0]), server, hostname, out, debug, path);
594
595 dwriter.meta = JMeta(argc, argv);
596
597 dwriter.enter();
598 dwriter.run();
599}
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:74
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2140
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:1697
Runcontrol client to write data to disk.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client.
Auxiliary class for ROOT I/O of application specific meta data.
Definition JMeta.hh:72