26{
28
29 string inputFile;
31
32 try {
33
34 JParser<> zap(
"Auxiliary program to print JSirene job statistics.");
35
38
39 zap(argc, argv);
40 }
41 catch(const exception &error) {
42 FATAL(error.what() << endl);
43 }
44
45
46 gErrorIgnoreLevel = kError;
47
48 TFile* in = TFile::Open(inputFile.c_str(), "exist");
49
50 if (in == NULL || !in->IsOpen()) {
51 FATAL(
"File: " << inputFile <<
" not opened." << endl);
52 }
53
54
55 TH1D* job = dynamic_cast<TH1D*>(in->Get("job"));
56
57 if (job == NULL) {
58 FATAL(
"No job statistics.");
59 }
60
62
64 DIRECT_LIGHT_FROM_MUON,
65 SCATTERED_LIGHT_FROM_MUON,
66 DIRECT_LIGHT_FROM_DELTARAYS,
67 SCATTERED_LIGHT_FROM_DELTARAYS,
68 DIRECT_LIGHT_FROM_EMSHOWER,
69 SCATTERED_LIGHT_FROM_EMSHOWER,
70
71 DIRECT_LIGHT_FROM_MUON + 20,
72 SCATTERED_LIGHT_FROM_MUON + 20,
73 DIRECT_LIGHT_FROM_DELTARAYS + 20,
74 SCATTERED_LIGHT_FROM_DELTARAYS + 20,
75
76 DIRECT_LIGHT_FROM_EMSHOWER + 40,
77 SCATTERED_LIGHT_FROM_EMSHOWER + 40,
78
79 -1
80 };
81
82
84
85 map_type zmap;
86
87 zmap[100] = "Number of photons";
88 zmap[200] = "Number of errors";
89 zmap[300] = "Number of misses";
90
91
93
98 NOTICE(
LEFT(40) <<
"Number of decayed particles (i.e. tau) " <<
FIXED(13,0) <<
job->GetBinContent( 6) <<
endl);
99 NOTICE(
LEFT(40) <<
"Number of detectable decayed particles " <<
FIXED(13,0) <<
job->GetBinContent( 7) <<
endl);
101 NOTICE(
LEFT(40) <<
"Number of detectable electrons/hadrons " <<
FIXED(13,0) <<
job->GetBinContent( 9) <<
endl);
104
105 for (map_type::const_iterator
entry = zmap.begin();
entry != zmap.end(); ++
entry) {
107 for (
const int* i =
hit_types; *i != -1; ++i) {
113 }
114 }
115
116 in->Close();
117}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for sequence of same character.
Auxiliary data structure for floating point format specification.
Auxiliary data structure for alignment of data.
Auxiliary data structure for alignment of data.