Jpp
Classes | Functions | Variables
JDAQTimesliceSelector.cc File Reference
#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  cout.tie(&cerr);
146 
147  JAnalysis analysis;
148 
149  inputFile | JValve<JDAQTimesliceTypes_t>(selector) | JType<JDAQTimeslice>() | analysis;
150 }

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.

debug
int debug
debug level
Definition: JDAQTimesliceSelector.cc:36
JSUPPORT::JLimit
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
JLANG::JType
Auxiliary class for a type holder.
Definition: JType.hh:19
JPARSER::JParser
Utility class to parse command line options.
Definition: JParser.hh:1493
JAnalysis
Example class for data analysis.
Definition: JDAQTimesliceSelector.cc:43
PMT
JDAQPMTIdentifier PMT
Command line options.
Definition: JDAQTimesliceSelector.cc:35
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JROOT::JROOTClassSelector
Auxiliary class to select ROOT class based on class name.
Definition: JROOTClassSelector.hh:32
JLANG::JValve
Auxiliary class for selection of data type.
Definition: JObjectIterator.hh:32
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
KM3NETDAQ::JDAQPMTIdentifier
PMT identifier.
Definition: JDAQPMTIdentifier.hh:20
JSUPPORT::JMultipleFileScanner
General purpose class for object reading from a list of file names.
Definition: JMultipleFileScanner.hh:167
std
Definition: jaanetDictionary.h:36
KM3NETDAQ
KM3NeT DAQ data structures and auxiliaries.
Definition: DataQueue.cc:39
FATAL
#define FATAL(A)
Definition: JMessage.hh:67
outputFile
string outputFile
Definition: JDAQTimesliceSelector.cc:37