Jpp
 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 "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::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 33 of file JDataWriter.cc.

Function Documentation

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

Definition at line 511 of file JDataWriter.cc.

512 {
513  using namespace std;
514 
515  string server;
516  string logger;
517  string hostname;
518  string client_name;
519  bool use_cout;
520  string path;
521  int debug;
522 
523  try {
524 
525  JParser<> zap("Application for writing real-time data to disk.");
526 
527  zap['H'] = make_field(server) = "localhost";
528  zap['M'] = make_field(logger) = "localhost";
529  zap['D'] = make_field(hostname) = "localhost";
530  zap['u'] = make_field(client_name) = "%";
531  zap['c'] = make_field(use_cout);
532  zap['p'] = make_field(path) = "";
533  zap['d'] = make_field(debug) = 3;
534 
535  zap(argc, argv);
536  }
537  catch(const exception &error) {
538  FATAL(error.what() << endl);
539  }
540 
541 
542  using namespace KM3NETDAQ;
543  using namespace JPP;
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 }
Auxiliary class for ROOT I/O of application specific meta data.
Definition: JMeta.hh:71
Utility class to parse command line options.
Definition: JParser.hh:1410
Runcontrol client to write data to disk.
Definition: JDataWriter.cc:59
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1836
int debug
debug level
Definition: JSirene.cc:59
#define FATAL(A)
Definition: JMessage.hh:65