25 int main(
int argc, 
char **argv)
 
   37     JParser<> zap(
"Auxiliary program to decompose detector to separate calibrations.");
 
   39     zap[
'a'] = 
make_field(detectorFile, 
"detector file");
 
   42     zap[
'p'] = 
make_field(precision,    
"precision for match with reference module") = 1.0e-5;
 
   47   catch(
const exception &error) {
 
   48     FATAL(error.what() << endl);
 
   62     FATAL(
"No detector address map for detector identier " << 
detector.getID() << endl);
 
   70   for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
   72     if (module->getFloor() != 0) {
 
   80       if (!JModule::compare(buffer, *module, precision)) {
 
   81         FATAL(
"Module " << setw(10) <<  module->getID() << 
" at location " << 
getLabel(module->getLocation()) << 
" incompatible with " << (demo.
get(module->getID()) == demo.
getDefaultModuleAddressMap() ? 
"default" : 
"custom") << 
" reference." << endl);
 
  101     for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  102       for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
 
  124     for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  126       const JModule& buffer = demo.
getModule(module->getID(), module->getLocation());
 
  152     for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  154       const JModule& buffer = demo.
getModule(module->getID(), module->getLocation());
 
  156       if (module->getFloor() != 0) {
 
  178     for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  180       if (module->getFloor() == 0)
 
  204     for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  205       if (module->getFloor() == 0)
 
  232       for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  233         for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
 
  243       for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  244         if (module->getFloor() == 0)
 
int main(int argc, char **argv)
 
Data structure for detector geometry and calibration.
 
General purpose messaging.
 
Utility class to parse command line options.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
I/O formatting auxiliaries.
 
Data structure for time calibration.
 
virtual const JModuleAddressMap & getDefaultModuleAddressMap() const =0
Get default module address map.
 
const JModuleAddressMap & get(const int id) const
Get module address map.
 
int getFloor() const
Get floor number.
 
Data structure for a composite optical module.
 
void rotate(const JRotation3D &R)
Rotate module.
 
Utility class to parse command line options.
 
JPosition3D getPosition(const Vec &pos)
Get position.
 
std::string getLabel(const JLocation &location)
Get module label for monitoring and other applications.
 
static JRotation getRotation
Function object to get rotation matrix to go from first to second module.
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
 
JCalibration getCalibration(const JCalibration &first, const JCalibration &second)
Get calibration to go from first to second calibration.
 
void store(const std::string &file_name, const JDetector &detector)
Store detector to output file.
 
JDetectorBuilder & getDetectorBuilder()
Get detector builder.
 
bool hasDetectorAddressMap(const int id)
Check if detector address map is available.
 
std::string setWildCard(const std::string &file_name, const std::string &value)
Get file name by setting wild card to given value.
 
bool hasWildCard(const std::string &file_name)
Check presence of wild card.
 
static const char FILENAME_WILDCARD
wild card character for file name substitution
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
static const std::string BasePositions_t
 
static const std::string BaseStatusInfo_t
 
static const std::string BaseAcousticT0_t
 
static const std::string TCAL
PMT time offsets.
 
static const std::string PMTT0s_t
 
static const std::string Message_t
 
static const std::string PCAL
(optical|base) module positions
 
static const std::string DOMPositions_t
 
static const std::string SCAL
(module|PMT) status
 
static const std::string DetID_t
 
static const std::string RCAL
optical module orientations
 
static const std::string BaseCompassRotations_t
 
static const std::string Code_t
 
static const std::string Data_t
 
static const std::string OK_t
 
static const std::string Arguments_t
 
static const std::string PMTStatusInfo_t
 
static const std::string DOMRotations_t
 
static const std::string ACAL
acoustic time offsets (piezo sensor or hydrophone)
 
static const std::string DOMAcousticT0_t
 
static const std::string CCAL
compass alignment (a.k.a. quaternion calibration)
 
static const std::string DOMStatusInfo_t
 
static const std::string DOMCompassRotations_t
 
static const std::string Error_t
 
static const std::string Comment_t
 
Auxiliary data structure for compass rotation.
 
Auxiliary interface for building detector.
 
const JModule & getModule(const int id=-1, const JLocation &location=JLocation()) const
Get module.
 
Auxiliary data structure for module time calibration.
 
Auxiliary data structure for module position.
 
Auxiliary data structure for module rotation.
 
Auxiliary data structure for module status.
 
Auxiliary data structure for PMT time calibration.
 
Auxiliary data structure for PMT status.