Jpp 20.0.0-195-g190c9e876
the software that should make you happy
Loading...
Searching...
No Matches
putMechanics.cc
Go to the documentation of this file.
1#include <string>
2#include <iostream>
3#include <iomanip>
4
5#include "TROOT.h"
6#include "TFile.h"
7
8#include "JSupport/JMeta.hh"
11
13#include "JAcoustics/JEvt.hh"
15
16#include "Jeep/JParser.hh"
17#include "Jeep/JMessage.hh"
18
19
20/**
21 * \file
22 *
23 * Application to add mechanical model data to ROOT file.
24 * \author mdejong
25 */
26int main(int argc, char **argv)
27{
28 using namespace std;
29 using namespace JPP;
30
31
33 JLimit_t& numberOfEvents = inputFile.getLimit();
35 JDetectorMechanics mechanics; // mechanical model data
36 bool squash;
37 int debug;
38
39 try {
40
41 JParser<> zap("Application to add mechanical model data to ROOT file.");
42
43 zap['f'] = make_field(inputFile, "output of JKatoomba[.sh]");
44 zap['o'] = make_field(outputFile);
45 zap['n'] = make_field(numberOfEvents) = JLimit::max();
46 zap['M'] = make_field(mechanics, "mechanics data") = JPARSER::initialised();
47 zap['q'] = make_field(squash, "squash meta data");
48 zap['d'] = make_field(debug) = 1;
49
50 zap(argc, argv);
51 }
52 catch(const exception &error) {
53 FATAL(error.what() << endl);
54 }
55
56
57 outputFile.open();
58
59 outputFile.put(JMeta(argc, argv));
60 outputFile.put(mechanics);
61
62 inputFile >> outputFile;
63
64 if (!squash) {
65
66 JMultipleFileScanner<JMeta> io(inputFile);
67
68 io >> outputFile;
69 }
70
71 outputFile.close();
72}
Acoustic event fit.
ROOT TTree parameter settings.
string outputFile
Recording of objects on file according a format that follows from the file name extension.
Mechanical modelling of string.
General purpose messaging.
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:74
ROOT I/O of application specific meta data.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Utility class to parse command line options.
Definition JParser.hh:1698
Object writing to file.
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).
int main(int argc, char **argv)
Auxiliary data structure for mechanical model parameters with commented data.
Definition JMechanics.hh:38
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition JParser.hh:68
Auxiliary class for defining the range of iterations of objects.
Definition JLimit.hh:45
static counter_type max()
Get maximum counter value.
Definition JLimit.hh:128
Auxiliary class for ROOT I/O of application specific meta data.
Definition JMeta.hh:72