Jpp  master_rocky-43-ge265d140c
the software that should make you happy
Classes | Functions | Variables
JDAQTimesliceSelector.cc File Reference

Example program to histogram KM3NETDAQ::JDAQTimeslice. More...

#include <string>
#include <iostream>
#include <iomanip>
#include <limits>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "JDAQ/JDAQTimesliceIO.hh"
#include "km3net-dataformat/online/JDAQPMTIdentifier.hh"
#include "JSupport/JMultipleFileScanner.hh"
#include "JSupport/JSupport.hh"
#include "JROOT/JROOTClassSelector.hh"
#include "JLang/JTypeSelector.hh"
#include "JLang/JObjectMultiplexer.hh"
#include "JLang/JPipe.hh"
#include "JLang/JObjectOutput.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Classes

struct  JAnalysis
 Example class for data analysis. More...
 

Functions

int main (int argc, char **argv)
 

Variables

JDAQPMTIdentifier PMT
 Command line options. More...
 
int debug
 debug level More...
 
string outputFile
 

Detailed Description

Example program to histogram KM3NETDAQ::JDAQTimeslice.

Author
mdejong

Definition in file JDAQTimesliceSelector.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 117 of file JDAQTimesliceSelector.cc.

118 {
119  using namespace std;
120  using namespace JPP;
121  using namespace KM3NETDAQ;
122 
124  JLimit_t& numberOfEvents = inputFile.getLimit();
125  JROOTClassSelector selector;
126 
127  try {
128 
129  JParser<> zap("Example program to histogram timeslice data.");
130 
131  zap['f'] = make_field(inputFile);
132  zap['o'] = make_field(outputFile) = "timeslice.root";
133  zap['n'] = make_field(numberOfEvents) = JLimit::max();
134  zap['P'] = make_field(PMT) = JDAQPMTIdentifier(-1, -1);
135  zap['C'] = make_field(selector) = getROOTClassSelection<JDAQTimesliceTypes_t>();
136  zap['d'] = make_field(debug) = 1;
137 
138  zap(argc, argv);
139  }
140  catch(const exception& error) {
141  FATAL(error.what() << endl);
142  }
143 
144 
145  JAnalysis analysis;
146 
147  inputFile | JValve<JDAQTimesliceTypes_t>(selector) | JType<JDAQTimeslice>() | analysis;
148 }
JDAQPMTIdentifier PMT
Command line options.
string outputFile
int debug
debug level
#define FATAL(A)
Definition: JMessage.hh:67
#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
Utility class to parse command line options.
Definition: JParser.hh:1698
General purpose class for object reading from a list of file names.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
Definition: DataQueue.cc:39
Definition: JSTDTypes.hh:14
Example class for data analysis.
Auxiliary class for a type holder.
Definition: JType.hh:19
Auxiliary class to select ROOT class based on class name.
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:45

Variable Documentation

◆ PMT

Command line options.

Definition at line 35 of file JDAQTimesliceSelector.cc.

◆ debug

int debug

debug level

Definition at line 36 of file JDAQTimesliceSelector.cc.

◆ outputFile

string outputFile

Definition at line 37 of file JDAQTimesliceSelector.cc.