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);
 
   57   catch(
const JException& error) {
 
   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) {
 
   74       JModule buffer = demo.
getModule(module->getID(), module->getLocation());
 
   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) {
 
  103         data.push_back(JPMTCalibration_t(pmt->getID(), 
getCalibration(JCalibration(), *pmt)));
 
  124     for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  126       const JModule& buffer = demo.getModule(module->getID(), module->getLocation());
 
  128       if (buffer.getFloor() == 0)
 
  129         data[0].push_back(JModulePosition_t(module->getID(), 
getPosition(buffer, *module)));
 
  131         data[1].push_back(JModulePosition_t(module->getID(), 
getPosition(buffer, *module)));
 
  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) {
 
  157         data.push_back(JModuleRotation_t(module->getID(), 
getRotation(buffer, *module)));
 
  178     for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  180       if (module->getFloor() == 0)
 
  181         data[0].push_back(JModuleCalibration_t(module->getID(), module->getT0()));
 
  183         data[1].push_back(JModuleCalibration_t(module->getID(), module->getT0()));
 
  204     for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  205       if (module->getFloor() == 0)
 
  206         data[0].push_back(JCompassRotation_t(module->getID(), module->getQuaternion()));
 
  208         data[1].push_back(JCompassRotation_t(module->getID(), module->getQuaternion()));
 
  232       for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  233         for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
 
  234           data.push_back(JPMTStatus_t(pmt->getID(), pmt->getStatus()));
 
  243       for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  244         if (module->getFloor() == 0)
 
  245           data[0].push_back(JModuleStatus_t(module->getID(), module->getStatus()));
 
  247           data[1].push_back(JModuleStatus_t(module->getID(), module->getStatus()));
 
static const std::string Arguments_t
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
static const std::string DOMStatusInfo_t
 
static const std::string Code_t
 
static const std::string ACAL
acoustic time offsets (piezo sensor or hydrophone) 
 
std::string getLabel(const JLocation &location)
Get module label for monitoring and other applications. 
 
static const std::string CCAL
compass alignment (a.k.a. quaternion calibration) 
 
static const std::string PMTT0s_t
 
bool hasDetectorAddressMap(const int id)
Check if detector address map is available. 
 
static const std::string Error_t
 
std::vector< JModuleRotation_t > JModuleRotation
Module rotation. 
 
static JRotation getRotation
Function object to get rotation matrix to go from first to second module. 
 
JCalibration getCalibration(const JCalibration &first, const JCalibration &second)
Get calibration to go from first to second calibration. 
 
Data structure for detector geometry and calibration. 
 
static const std::string BaseStatusInfo_t
 
std::vector< JCompassRotation_t > JCompassRotation
Compass rotation. 
 
static const std::string TCAL
PMT time offsets. 
 
static const std::string Comment_t
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
void store(const std::string &file_name, const JDetector &detector)
Store detector to output file. 
 
JPosition3D getPosition(const Vec &pos)
Get position. 
 
static const std::string DOMPositions_t
 
static const std::string RCAL
optical module orientations 
 
General purpose messaging. 
 
static const std::string DOMCompassRotations_t
 
static const std::string Message_t
 
std::string setWildCard(const std::string &file_name, const std::string &value)
Get file name by setting wild card to given value. 
 
std::vector< JModuleStatus_t > JModuleStatus
Module status. 
 
then JCookie sh JDataQuality D $DETECTOR_ID R
 
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
 
static const std::string Data_t
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file. 
 
Utility class to parse command line options. 
 
static const std::string SCAL
(module|PMT) status 
 
std::vector< JPMTStatus_t > JPMTStatus
PMT status. 
 
static const std::string BasePositions_t
 
static const std::string DOMRotations_t
 
static const std::string BaseCompassRotations_t
 
std::vector< JModulePosition_t > JModulePosition
Module position. 
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
static const std::string PMTStatusInfo_t
 
static const std::string PCAL
(optical|base) module positions 
 
JDetectorBuilder & getDetectorBuilder()
Get detector builder. 
 
static const char FILENAME_WILDCARD
wild card character for file name substitution 
 
static const std::string DetID_t
 
static const std::string DOMAcousticT0_t
 
std::vector< JPMTCalibration_t > JPMTCalibration
PMT time calibration. 
 
static const std::string BaseAcousticT0_t
 
std::vector< JModuleCalibration_t > JModuleCalibration
Module time calibration. 
 
const JModule & getModule(const int id=-1, const JLocation &location=JLocation()) const 
Get module. 
 
static const std::string OK_t
 
bool hasWildCard(const std::string &file_name)
Check presence of wild card.