#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "JDAQ/JDAQ.hh"
#include "JDetector/JDetector.hh"
#include "JDetector/JDetectorToolkit.hh"
#include "JDetector/JPMTParametersMap.hh"
#include "JDetector/JPMTParametersToolkit.hh"
#include "JGizmo/JManager.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Auxiliary application to plot PMT parameters.
- Author
- mdejong
Definition in file JPlotPMTParameters.cc.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 27 of file JPlotPMTParameters.cc.
34 JPMTParametersMap parameters;
40 JParser<> zap(
"Auxiliary application to plot PMT parameters.");
42 zap[
'a'] =
make_field(detectorFile,
"detector file.");
44 zap[
'P'] =
make_field(parameters,
"PMT calibration data (or corresponding file name)");
49 catch(
const exception &error) {
50 FATAL(error.what() << endl);
56 load(detectorFile, detector);
58 catch(
const JException& error) {
62 if (detector.empty()) {
63 FATAL(
"Empty detector." << endl);
68 for (JDetector::iterator module = detector.begin(); module != detector.end(); ++module) {
70 DEBUG(
"Module " << setw(10) << module->getID() << endl);
74 const JProperties properties = parameters.getPMTParameters(JPMTIdentifier(module->getID(), pmt)).getProperties();
76 for (JProperties::const_iterator p = properties.begin(); p != properties.end(); ++p) {
79 manager[
MAKE_CSTRING(module->getID() <<
"." << p->first)]->Fill((Double_t) pmt, p->second.getValue<
const double>());
81 catch(
const exception& error) {}
84 manager[
MAKE_CSTRING(module->getID() <<
"." << p->first)]->Fill((Double_t) pmt, p->second.getValue<
const bool>() ? 1.0 : 0.0);
86 catch(
const exception& error) {}
89 const JPMTParameters buffer = parameters.getPMTParameters(JPMTIdentifier(module->getID(), pmt));