Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JRegurgitate.cc File Reference

Auxiliary program to send objects to JLigier.cc server. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "JDAQ/JDAQTimesliceIO.hh"
#include "JDAQ/JDAQEventIO.hh"
#include "JDAQ/JDAQSummarysliceIO.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JSupport.hh"
#include "JROOT/JROOTClassSelector.hh"
#include "JLang/JPipe.hh"
#include "JLang/JValve.hh"
#include "JDAQ/JDAQTags.hh"
#include "JNet/JControlHostObjectOutput.hh"
#include "Jeep/JTimekeeper.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

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

Detailed Description

Auxiliary program to send objects to JLigier.cc server.

The option -H <hostname>[:port] correponds to the hostname and the port of the server, respectively.

Author
mdejong

Definition in file JRegurgitate.cc.

Function Documentation

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

Definition at line 91 of file JRegurgitate.cc.

92 {
93  using namespace std;
94  using namespace JPP;
95 
96  typedef JDAQTypes_t typelist;
97 
99  string hostname;
100  JROOTClassSelector selector;
101  double rate_Hz;
102  double time_s;
103  int debug;
104 
105  try {
106 
107  JParser<> zap("Auxiliary program to send objects to JLigier server.");
108 
109  zap['f'] = make_field(inputFile);
110  zap['H'] = make_field(hostname) = "localhost";
111  zap['C'] = make_field(selector) = getROOTClassSelection<typelist>();
112  zap['R'] = make_field(rate_Hz);
113  zap['T'] = make_field(time_s);
114  zap['d'] = make_field(debug) = 1;
115 
116  zap['C'] = JPARSER::not_initialised();
117 
118  zap(argc, argv);
119  }
120  catch(const exception &error) {
121  FATAL(error.what() << endl);
122  }
123 
124 
126 
127  for (JRegulator_t regulator(rate_Hz, time_s); regulator; inputFile.rewind()) {
128  inputFile | JValve<typelist>(selector) | regulator | out;
129  }
130 }
Utility class to parse command line options.
Definition: JParser.hh:1500
Auxiliary class to select ROOT class based on class name.
Auxiliary class for selection of data type.
Type list.
Definition: JTypeList.hh:22
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
int debug
debug level
Definition: JSirene.cc:63
#define FATAL(A)
Definition: JMessage.hh:67
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition: JParser.hh:72
General purpose class for object reading from a list of file names.
Implemenation of object output through ControlHost.