Jpp test-rotations-new
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 "Jeep/JParser.hh"
#include "Jeep/JProperties.hh"
#include "Jeep/JTimer.hh"
#include "Jeep/JTimekeeper.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JeepToolkit.hh"
#include "JNet/JControlHost.hh"
#include "JLang/JException.hh"
#include "JLang/JSharedPointer.hh"
#include "JLogger/JMessageScheduler.hh"
#include "km3net-dataformat/online/JDAQ.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"

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 35 of file JDataWriter.cc.

Function Documentation

◆ main()

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

Definition at line 551 of file JDataWriter.cc.

552{
553 using namespace std;
554 using namespace JPP;
555 using namespace KM3NETDAQ;
556
557 string server;
558 string logger;
559 string hostname;
560 string client_name;
561 bool use_cout;
562 string path;
563 int debug;
564
565 try {
566
567 JParser<> zap("Application for writing real-time data to disk.");
568
569 zap['H'] = make_field(server, "host name of server for command messages") = "localhost";
570 zap['M'] = make_field(logger, "host name of server for logger messages") = "localhost";
571 zap['D'] = make_field(hostname, "host name of server for incoming data from data filter") = "localhost";
572 zap['u'] = make_field(client_name, "client name") = "%";
573 zap['c'] = make_field(use_cout, "print to terminal");
574 zap['p'] = make_field(path, "directory for permanent archival of data") = "";
575 zap['d'] = make_field(debug, "debug level") = 0;
576
577
578 zap(argc, argv);
579 }
580 catch(const exception &error) {
581 FATAL(error.what() << endl);
582 }
583
584
585 JLogger* out = NULL;
586
587 if (use_cout)
588 out = new JStreamLogger(cout);
589 else
590 out = new JControlHostLogger(logger);
591
592 JDataWriter dwriter(getProcessName(client_name, argv[0]), server, hostname, out, debug, path);
593
594 dwriter.meta = JMeta(argc, argv);
595
596 dwriter.enter();
597 dwriter.run();
598}
#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 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