30 int main(
int argc,
char **argv)
44 JParser<> zap(
"Auxiliary program to write base module data.");
50 zap[
'a'] =
make_field(detectorFile,
"detector file");
55 catch(
const exception &error) {
56 FATAL(error.what() << endl);
78 if (! (rs >> clbmap)) {
84 catch(
const exception& error) {
85 FATAL(error.what() << endl);
91 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
92 if (module->getFloor() <= 2) {
93 zmap[module->getString()][module->getFloor()] = *module;
102 if (i->FLOORID == 0) {
104 const double z0 = 0.0;
105 const double z1 = zmap[i->DUID][1].getZ();
106 const double z2 = zmap[i->DUID][2].getZ();
107 const double t1 =
getT0(zmap[i->DUID][1]);
108 const double t2 =
getT0(zmap[i->DUID][2]);
112 const double t0 = t1 + (z0 - z1) * (t2 - t1) / (z2 - z1);
114 out << setw(9) << i->DOMID <<
' '
115 << setw(3) << i->DUID <<
' '
116 << setw(2) << i->FLOORID <<
' '
117 <<
FIXED(9,3) << zmap[i->DUID][1].getX() <<
' '
118 <<
FIXED(9,3) << zmap[i->DUID][1].getY() <<
' '
119 <<
FIXED(9,3) << z0 <<
' '
120 <<
FIXED(12,3) << t0 << endl;
Utility class to parse command line options.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Auxiliary data structure for floating point format specification.
Data structure for detector geometry and calibration.
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for base module.
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
General purpose messaging.
double getT0(const JModule &module)
Get time offset of optical module.
static const JDetectorsHelper & getDetector
Function object for mapping serial number and object identifier of detectors.
Utility class to parse command line options.
ResultSet & getResultSet(const std::string &query)
Get result set.
Template definition for getting table specific selector.
int main(int argc, char *argv[])