Jpp  16.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Typedefs | Functions
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

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

Typedefs

typedef
JSUPPORT::JAutoTreeWriter
< JNET::JTag
JTreeWriter_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

Type definition of auto map.

Definition at line 35 of file JDataWriter.cc.

Function Documentation

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

Definition at line 513 of file JDataWriter.cc.

514 {
515  using namespace std;
516  using namespace JPP;
517  using namespace KM3NETDAQ;
518 
519  string server;
520  string logger;
521  string hostname;
522  string client_name;
523  bool use_cout;
524  string path;
525  int debug;
526 
527  try {
528 
529  JParser<> zap("Application for writing real-time data to disk.");
530 
531  zap['H'] = make_field(server) = "localhost";
532  zap['M'] = make_field(logger) = "localhost";
533  zap['D'] = make_field(hostname) = "localhost";
534  zap['u'] = make_field(client_name) = "%";
535  zap['c'] = make_field(use_cout);
536  zap['p'] = make_field(path) = "";
537  zap['d'] = make_field(debug) = 3;
538 
539  zap(argc, argv);
540  }
541  catch(const exception &error) {
542  FATAL(error.what() << endl);
543  }
544 
545 
546  JLogger* out = NULL;
547 
548  if (use_cout)
549  out = new JStreamLogger(cout);
550  else
551  out = new JControlHostLogger(logger);
552 
553  JDataWriter dwriter(getProcessName(client_name, argv[0]), server, hostname, out, debug, path);
554 
555  dwriter.meta = JMeta(argc, argv);
556 
557  dwriter.enter();
558  dwriter.run();
559 }
Auxiliary class for ROOT I/O of application specific meta data.
Definition: JMeta.hh:70
Utility class to parse command line options.
Definition: JParser.hh:1500
Runcontrol client to write data to disk.
Definition: JDataWriter.cc:61
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client.
Message logging based on std::ostream.
Interface for logging messages.
Definition: JLogger.hh:22
Message logging based on ControlHost.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
int debug
debug level
Definition: JSirene.cc:63
$WORKDIR driver txt done cat $WORKDIR driver txt<< EOFprocess ${DATAFILTER}$FILTER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataFilter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAFILTER}-P $PORT</dev/null > &/dev/null &))';process ${DATAWRITER}$WRITER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataWriter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAWRITER}</dev/null > &/dev/null &))';print enterevent ev_init{RC_CMD}event ev_reset{RC_CMD}event ev_init{RC_CMD}event ev_configure{RC_DFLTR%<$WORKDIR/ev_configure_datafilter.txt > RC_DOM<$WORKDIR/ev_configure_domsimulator.txt > RC_DWRT path
#define FATAL(A)
Definition: JMessage.hh:67