Jpp
Classes | Namespaces | Typedefs | Functions
JDataWriter.cc File Reference
#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 "JDAQ/JDAQ.hh"
#include "JDAQ/JDAQTags.hh"
#include "JDAQ/JDAQEvent.hh"
#include "JDAQ/JDAQTimeslice.hh"
#include "JDAQ/JDAQSummaryslice.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

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

Typedefs

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

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

513 {
514  using namespace std;
515  using namespace JPP;
516  using namespace KM3NETDAQ;
517 
518  string server;
519  string logger;
520  string hostname;
521  string client_name;
522  bool use_cout;
523  string path;
524  int debug;
525 
526  try {
527 
528  JParser<> zap("Application for writing real-time data to disk.");
529 
530  zap['H'] = make_field(server) = "localhost";
531  zap['M'] = make_field(logger) = "localhost";
532  zap['D'] = make_field(hostname) = "localhost";
533  zap['u'] = make_field(client_name) = "%";
534  zap['c'] = make_field(use_cout);
535  zap['p'] = make_field(path) = "";
536  zap['d'] = make_field(debug) = 3;
537 
538  zap(argc, argv);
539  }
540  catch(const exception &error) {
541  FATAL(error.what() << endl);
542  }
543 
544 
545  JLogger* out = NULL;
546 
547  if (use_cout)
548  out = new JStreamLogger(cout);
549  else
550  out = new JControlHostLogger(logger);
551 
552  JDataWriter dwriter(getProcessName(client_name, argv[0]), server, hostname, out, debug, path);
553 
554  dwriter.meta = JMeta(argc, argv);
555 
556  dwriter.enter();
557  dwriter.run();
558 }
KM3NETDAQ::JDataWriter
Runcontrol client to write data to disk.
Definition: JDataWriter.cc:61
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
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
JSUPPORT::JMeta
Auxiliary class for ROOT I/O of application specific meta data.
Definition: JMeta.hh:71
std
Definition: jaanetDictionary.h:36
KM3NETDAQ
KM3NeT DAQ data structures and auxiliaries.
Definition: DataQueue.cc:39
FATAL
#define FATAL(A)
Definition: JMessage.hh:67
KM3NETDAQ::getProcessName
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client.
Definition: JRuncontrolToolkit.hh:194