27 int main(
int argc,
char **argv)
32 const char*
const short_t =
"short";
33 const char*
const long_t =
"long";
43 JParser<> zap(
"Example program to print dynamic detector calibration.");
48 zap[
'F'] =
make_field(format) = short_t, long_t;
53 catch(
const exception &error) {
54 FATAL(error.what() << endl);
73 dynamics.
load(calibrationFile);
80 comment.
add(
"documentation: https://common.pages.km3net.de/jpp/Position_calibration.PDF");
82 if (format == short_t)
83 comment.
add(
"format: string number; UTC [s]; Tx; Ty");
85 comment.
add(
"format: https://indico.cern.ch/event/1014814/contributions/4259426/attachments/2201529/3724129/KM3NeT_position_file_format.pdf");
90 comment.
add(*
in.next());
96 if (format == short_t) {
100 out << setw(4) <<
string->first <<
';'
101 <<
FIXED(20,5) << i->getX() <<
';'
102 <<
FIXED( 9,6) << i->getY().tx <<
';'
103 <<
FIXED( 9,6) << i->getY().ty << endl;
109 if (format == long_t) {
115 const double t1 = i->getX();
119 out <<
FIXED(20,5) << t1 <<
' '
120 <<
FIXED(20,5) << t1 <<
' '
121 << setw(4) <<
detector.size() << endl;
123 for (JDetector::const_iterator module = dynamics.begin(); module != dynamics.end(); ++module) {
125 out << setw(4) << module->getString() <<
' '
126 << setw(2) << module->getFloor() <<
' '
127 << setw(10) << module->getID() << endl;
129 out <<
FIXED(9,2) << module->getX() <<
' '
130 <<
FIXED(9,2) << module->getY() <<
' '
131 <<
FIXED(9,2) << module->getZ() <<
' '
132 <<
FIXED(9,2) << -1.0 <<
' '
133 <<
FIXED(9,2) << -1.0 <<
' '
134 <<
FIXED(9,2) << -1.0 << endl;
Utility class to parse command line options.
int main(int argc, char *argv[])
static JDetectorMechanics getMechanics
Function object to get string mechanics.
ROOT TTree parameter settings.
JPosition position
position calibration
Auxiliary data structure for floating point format specification.
const JDetector & update(const double t1_s)
Get detector calibrated at given time.
Data structure for detector geometry and calibration.
void load(JObjectIterator_t &input)
Load calibration data.
data_type::const_iterator const_iterator
const_iterator end() const
end of calibration data
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Dynamic detector calibration.
void load(const std::string &file_name)
Load mechanical model parameters from file.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Dynamic detector calibration.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
const_iterator begin() const
begin of calibration data
do set_variable DETECTOR_TXT $WORKDIR detector
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in