Jpp  19.1.0
the software that should make you happy
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

◆ main()

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

Definition at line 90 of file JRegurgitate.cc.

91 {
92  using namespace std;
93  using namespace JPP;
94 
95  typedef JDAQTypes_t typelist;
96 
98  string hostname;
99  JROOTClassSelector selector;
100  double rate_Hz;
101  double time_s;
102  int debug;
103  bool eof;
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  zap['C'] = JPARSER::not_initialised();
116  zap['e'] = make_field(eof);
117 
118  zap(argc, argv);
119  }
120  catch(const exception &error) {
121  FATAL(error.what() << endl);
122  }
123 
125 
126  for (JRegulator_t regulator(rate_Hz, time_s); regulator; inputFile.rewind()) {
127  inputFile | JValve<typelist>(selector) | regulator | out;
128  if (eof) {
129  break;
130  }
131  }
132 
133 }
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level
Definition: JSirene.cc:69
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:2142
Auxiliary class for selection of data type.
Definition: JValve.hh:23
Implemenation of object output through ControlHost.
Utility class to parse command line options.
Definition: JParser.hh:1698
General purpose class for object reading from a list of file names.
virtual void rewind() override
Rewind.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14
Type list.
Definition: JTypeList.hh:23
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition: JParser.hh:74
Auxiliary class to select ROOT class based on class name.