36{
39
41 string usr;
45 string inputFile;
49
50 try {
51
52 JParser<> zap(
"Auxiliary application to plot PMT parameters as a function of variant.");
53
59 zap[
'f'] =
make_field(inputFile,
"output of JPrintDB -q \"integration\" -c \";\" -W1") =
"";
61 zap[
'P'] =
make_field(parameters,
"PMT calibration data (or corresponding file name)");
63
65 }
66 catch(const exception &error) {
68 }
69
70
72
73 try {
75 }
78 }
79
81
83
84 string detid = "";
85
86 try {
87
89
91 }
92 catch(const exception& error) {
94 }
95
96 if (inputFile != "") {
97
99
100 } else {
101
103
104 try {
105
107
110 }
111 }
112 catch(const exception& error) {
114 }
115 }
116
118
120
122
123 JManager<string, TH1D>
H1(
new TH1D(
"TTS_ns[%]",
NULL, 100, 0.0, 4.0));
124 JManager<string, TH1D>
H2(
new TH1D(
"QE[%]",
NULL, 100, 0.0, 2.0));
125 JManager<string, TH1D>
H3(
new TH1D(
"gain[%]",
NULL, 100, 0.0, 2.0));
126 JManager<string, TH1D>
H4(
new TH1D(
"gainSpread[%]",
NULL, 100, 0.0, 1.0));
127
129
132
133 DEBUG(
"PMT " << left <<
setw(24) <<
upi.getVariant() << right <<
' ' << location <<
endl);
134
136
137 const JModule&
module = router.getModule(JLocation(location.string, location.floor));
139
140 H1[
upi.getVariant()]->Fill(buffer.TTS_ns);
141 H2[
upi.getVariant()]->Fill(buffer.QE);
142 H3[
upi.getVariant()]->Fill(buffer.gain);
143 H4[
upi.getVariant()]->Fill(buffer.gainSpread);
144 }
145 }
146
148
150
151 out.Write();
152 out.Close();
153}
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Router for direct addressing of location data in detector data structure.
Data structure for a composite optical module.
Auxiliary class for map of PMT parameters.
const JPMTParameters & getPMTParameters(const JPMTIdentifier &id) const
Get PMT parameters.
Data structure for PMT parameters.
Template definition of a multi-dimensional oscillation probability interpolation table.
void load()
Load oscillation probability table.
Utility class to parse command line options.
ResultSet & getResultSet(const std::string &query)
Get result set.
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
std::vector< JServer > getServernames()
Get list of names of available database servers.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
map_type::const_iterator range_const_iterator
Auxiliary data structure for location of product in detector.
bool is_valid() const
Check validity of location.
int position
position in floor
Auxiliary class to map UPI to location in detector.
Wrapper class for server name.
Universal product identifier (UPI).