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");
47 catch(
const exception &error) {
48 FATAL(error.what() << endl);
66 FATAL(
"No detector address map for detector identier " <<
detector.getID() << endl);
74 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
76 if (module->getFloor() != 0) {
78 JModule buffer =
getModule(demo.get(module->getID()), module->getID(), module->getLocation());
85 FATAL(
"Module " << setw(10) << module->getID() <<
' ' << module->getLocation() <<
" incompatible with reference." << endl);
98 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
104 for (
size_t i = 0; i != module->size(); ++i) {
108 data.push_back(buffer);
122 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
123 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
139 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
141 const JModule& buffer =
getModule(demo.get(module->getID()), module->getID(), module->getLocation());
161 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
163 const JModule& buffer =
getModule(demo.get(module->getID()), module->getID(), module->getLocation());
165 if (module->getFloor() == 0)
183 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
198 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
215 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
216 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
217 data.push_back(
JPMTStatus_t(pmt->getID(), pmt->getStatus()));
226 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
227 if (module->getFloor() == 0)
228 data[0].push_back(
JModuleStatus_t(module->getID(), module->getStatus()));
230 data[1].push_back(
JModuleStatus_t(module->getID(), module->getStatus()));
static const std::string PMTStatusInfo_t
Utility class to parse command line options.
static const std::string DetID_t
static const std::string RCAL
(optical|base) module orientations
int main(int argc, char *argv[])
int getFloor() const
Get floor number.
Data structure for a composite optical module.
static const std::string DOMPositions_t
static const std::string OK_t
bool hasDetectorAddressMap(const int id)
Check if detector address map is available.
static const std::string TCAL
PMT time offsets.
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.
Lookup table for PMT addresses in detector.
static const std::string CCAL
compass alignment (a.k.a. quaternion calibration)
Data structure for time calibration.
Data structure for detector geometry and calibration.
Auxiliary data structure for module time calibration.
Lookup table for PMT addresses in optical module.
static const std::string Arguments_t
I/O formatting auxiliaries.
Auxiliary data structure for module address map.
Auxiliary data structure for compass rotation.
static const std::string SCAL
PMT status.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
static const std::string DOMRotations_t
int getID() const
Get identifier.
static const std::string PCAL
(optical|base) module positions
static const std::string ACAL
acoustic time offsets (piezo sensor or hydrophone)
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 Code_t
static struct JACOUSTICS::@4 compare
Auxiliary data structure to sort transmissions.
static const std::string Message_t
static const std::string DOMAcousticT0_t
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.
void rotate(const JRotation3D &R)
Rotate module.
then usage $script[distance] fi case set_variable R
General purpose messaging.
static const std::string BaseRotations_t
static const std::string Comment_t
Data structure for unit quaternion in three dimensions.
std::string setWildCard(const std::string &file_name, const std::string &value)
Get file name by setting wild card to given value.
static const std::string DOMMap_t
static const std::string DOMCompassRotations_t
Auxiliary data structure for PMT status.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Utility class to parse command line options.
std::string toString() const
Convert PMT physical address to string.
Auxiliary data structure for module rotation.
static const char FILENAME_WILD_CARD
wild card character for file name substitution
const JPMTPhysicalAddress & getPMTPhysicalAddress(const int tdc) const
Get PMT physical address.
Auxiliary data structure for module position.
static const std::string DOMStatusInfo_t
static const std::string PMTT0s_t
static const std::string Error_t
do set_variable DETECTOR_TXT $WORKDIR detector
static const std::string Data_t
Auxiliary data structure for PMT time calibration.
Auxiliary data structure for module status.
static const std::string BaseStatusInfo_t
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
static const std::string BasePositions_t
static const std::string MMAP
module address map
bool hasWildCard(const std::string &file_name)
Check presence of wild card.