Example program to create PMT parameters map.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "JDetector/JDetector.hh"
#include "JDetector/JDetectorToolkit.hh"
#include "JDetector/JPMTParametersMap.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Example program to create PMT parameters map.
- Author
- mdejong
Definition in file JPMTParametersMap.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 20 of file JPMTParametersMap.cc.
31 JParser<> zap(
"Example program to create PMT parameters map.");
39 catch(
const exception &error) {
40 FATAL(error.what() << endl);
44 if (detectorFile !=
"") {
49 load(detectorFile, detector);
51 catch(
const JException& error) {
55 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
57 for (
unsigned int pmt = 0; pmt != module->size(); ++pmt) {
59 const JPMTIdentifier id(module->getID(), pmt);
61 parameters[id] = parameters.getDefaultPMTParameters();
Utility class to parse command line options.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
do set_variable DETECTOR_TXT $WORKDIR detector