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);
 
   52     load(detectorFile, detector);
 
   54   catch(
const JException& error) {
 
   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());
 
   85     position.push_back(JModulePosition_t(module->getID(), 
getPosition(buffer, *module)));
 
   86     rotation.push_back(JModuleRotation_t(module->getID(), 
getRotation(buffer, *module)));
 
   88     for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
 
   89       calibration.push_back(JPMTCalibration_t(pmt->getID(), 
getCalibration(JCalibration(), *pmt)));
 
  102   DEBUG(setw(4) << js << endl);
 
  106     ostream* out = open<ostream>(
outputFile.c_str());
 
  
void close(std::istream *pf)
Close file.
 
std::vector< JModulePosition_t > JModulePosition
Module position.
 
JCalibration getCalibration(const JCalibration &first, const JCalibration &second)
Get calibration to go from first to second 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
 
std::vector< JPMTCalibration_t > JPMTCalibration
PMT calibration.
 
static const std::string Data_t
 
std::vector< JModuleRotation_t > JModuleRotation
Module rotation.
 
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
 
static const std::string OK_t
 
static const std::string Result_t
Detector calibration key words for JSON I/O.
 
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.
 
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.