Go to the documentation of this file.
23 int main(
int argc,
char **argv)
35 JParser<> zap(
"Auxiliary program to decompose detector to separate calibrations.");
37 zap[
'a'] =
make_field(detectorFile,
"detector file");
44 catch(
const exception &error) {
45 FATAL(error.what() << endl);
59 FATAL(
"No detector address map for detector identier " <<
detector.getID() << endl);
67 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
69 const JModule& buffer =
getModule(demo.
get(module->getID()), module->getID(), module->getLocation());
71 if (!JModule::compare(buffer, *module, precision)) {
72 ERROR(
"Module " << setw(10) << module->getID() <<
" incompatible with reference." << endl);
81 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
83 const JModule& buffer =
getModule(demo.
get(module->getID()), module->getID(), module->getLocation());
88 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
102 DEBUG(setw(4) << js << endl);
106 ostream* out = open<ostream>(
outputFile.c_str());
void close(std::istream *pf)
Close file.
JCalibration getCalibration(const JCalibration &first, const JCalibration &second)
Get calibration to go from first to second calibration.
Auxiliary data structure for module position.
Data structure for PMT calibration.
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
int main(int argc, char **argv)
static const std::string PMTT0s_t
static const std::string Data_t
Data structure for a composite optical module.
static const std::string DOMRotations_t
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
JPosition3D getPosition(const Vec &v)
Get position.
#define DEBUG(A)
Message macros.
static const std::string DOMPositions_t
Auxiliary data structure for PMT calibration.
static const std::string OK_t
static const std::string Result_t
Detector calibration key words for JSON I/O.
Lookup table for PMT addresses in detector.
Auxiliary data structure for module rotation.
bool hasDetectorAddressMap(const int id)
Check if detector address map is available.
static JRotation getRotation
Function object to get rotation matrix to go from first to second module.
const JModuleAddressMap & get(const int id) const
Get module address map.
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.