Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JGizmo
getAAnetFiles.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
#include <map>
6
7
#include "
km3net-dataformat/offline/Head.hh
"
8
#include "
JLang/JVectorize.hh
"
9
#include "
JAAnet/JHead.hh
"
10
#include "
JAAnet/JHeadToolkit.hh
"
11
#include "
JSupport/JMultipleFileScanner.hh
"
12
#include "
JSupport/JMonteCarloFileSupportkit.hh
"
13
#include "
JSupport/JSupport.hh
"
14
#include "
Jeep/JParser.hh
"
15
#include "
Jeep/JMessage.hh
"
16
17
namespace
{
18
19
using
JAANET::JHead
;
20
21
struct
JWeight_t :
22
public
std::map
<std::string, JHead>
23
{
24
/**
25
* Default constructor.
26
*/
27
JWeight_t()
28
{
29
using namespace
JPP;
30
31
(*this)[
"MUPAGE"
] =
getMUPAGEHeader
();
32
(*this)[
"GENHEN"
] =
getGenhenHeader
();
33
(*this)[
"GENIE"
] =
getGenieHeader
();
34
(*this)[
"SIRENE"
] =
getSireneHeader
();
35
(*this)[
"KM3"
] =
getKM3Header
();
36
(*this)[
"KM3SIM"
] =
getKM3SimHeader
();
37
(*this)[
"CORSIKA_P"
] =
getCorsikaHeader
( 0,14);
// proton is single nucleon
38
(*this)[
"CORSIKA_HE"
] =
getCorsikaHeader
( 4, 2);
39
(*this)[
"CORSIKA_C"
] =
getCorsikaHeader
(12, 6);
40
(*this)[
"CORSIKA_0"
] =
getCorsikaHeader
(16, 8);
41
(*this)[
"CORSIKA_FE"
] =
getCorsikaHeader
(56,26);
42
(*this)[
"DAQ"
] =
getDAQHeader
();
43
}
44
};
45
}
46
47
48
/**
49
* \file
50
* Auxiliary program to select Monte Carlo files according generator.
51
*
52
* \author mdejong
53
*/
54
int
main
(
int
argc,
char
**argv)
55
{
56
using namespace
std;
57
using namespace
JPP;
58
59
JWeight_t
weight
;
60
61
JMultipleFileScanner_t
inputFile;
62
string
header;
63
bool
option;
64
int
debug
;
65
66
try
{
67
68
JParser<>
zap(
"Auxiliary program to select Monte Carlo files according generator."
);
69
70
zap[
'f'
] =
make_field
(inputFile);
71
zap[
'H'
] =
make_field
(header) =
get_keys
(
weight
);
72
zap[
'O'
] =
make_field
(option);
73
zap[
'd'
] =
make_field
(
debug
) = 1;
74
75
zap[
'H'
] =
JPARSER::not_initialised
();
76
77
zap(argc, argv);
78
}
79
catch
(
const
exception &error) {
80
FATAL
(error.what() << endl);
81
}
82
83
DEBUG
(
weight
[header]);
84
85
cout <<
getAAnetFiles
(inputFile,
weight
[header], option);
86
}
87
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1493
JSupport.hh
ROOT TTree parameter settings.
JSUPPORT::getAAnetFiles
JMultipleFileScanner_t getAAnetFiles(const JMultipleFileScanner_t &input, const JHead &header, const bool option=false)
Get list of files compatible with geven header.
Definition:
JMonteCarloFileSupportkit.hh:474
std::map
Definition:
JSTDTypes.hh:16
JLANG::get_keys
const std::vector< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
Definition:
JVectorize.hh:141
JAANET::getGenieHeader
Match header for genie.
Definition:
JHeadToolkit.hh:61
JAANET::getCorsikaHeader
Match header for Corsika.
Definition:
JHeadToolkit.hh:156
JAANET::getGenhenHeader
Match header for genhen.
Definition:
JHeadToolkit.hh:42
JAANET::getKM3SimHeader
Match header for km3.
Definition:
JHeadToolkit.hh:137
JAANET::getDAQHeader
Match header for DAQ.
Definition:
JHeadToolkit.hh:178
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1954
JAANET::getSireneHeader
Match header for JSirene.cc.
Definition:
JHeadToolkit.hh:99
debug
int debug
debug level
Definition:
JSirene.cc:61
JVectorize.hh
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
JMessage.hh
General purpose messaging.
JAANET::JHead
Monte Carlo run header.
Definition:
JHead.hh:836
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JMultipleFileScanner.hh
Scanning of objects from multiple files according a format that follows from the extension of each fi...
JMonteCarloFileSupportkit.hh
JPARSER::not_initialised
Empty structure for specification of parser element that is not initialised (i.e. does require input)...
Definition:
JParser.hh:69
JSUPPORT::JMultipleFileScanner_t
Auxiliary base class for list of file names.
Definition:
JMultipleFileScanner.hh:44
JParser.hh
Utility class to parse command line options.
JAANET::getMUPAGEHeader
Match header for MUPAGE.
Definition:
JHeadToolkit.hh:24
JHeadToolkit.hh
Head.hh
JAANET::getKM3Header
Match header for km3.
Definition:
JHeadToolkit.hh:118
JTRIGGER::weight
std::vector< double > weight
Definition:
JAlgorithm.hh:428
JHead.hh
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5