18 int main(
int argc, 
char **argv)
 
   24   string    detectorFile_a;
 
   25   string    detectorFile_b;
 
   32     JParser<> zap(
"Auxiliary program to attach PMTs to detector.");
 
   34     zap[
'a'] = 
make_field(detectorFile_a, 
"detector file w/o  PMTs");
 
   35     zap[
'f'] = 
make_field(detectorFile_b, 
"detector file with PMTs");
 
   37     zap[
'q'] = 
make_field(squash,         
"squash meta data");
 
   42   catch(
const exception &error) {
 
   43     FATAL(error.what() << endl);
 
   50     load(detectorFile_a, detector_a);
 
   51     load(detectorFile_b, detector_b);
 
   53   catch(
const JException& error) {
 
   58     detector_a.comment.clear();
 
   61   detector_a.comment.add(JMeta(argc,argv));
 
   63   if (detector_a.setToLatestVersion()) {
 
   64     NOTICE(
"Set detector version to " << detector_a.getVersion() << endl);
 
   67   for (JDetector::iterator module_b = detector_b.begin(); module_b != detector_b.end(); ++module_b) {
 
   69     for (JDetector::iterator module_a = detector_a.begin(); module_a != detector_a.end(); ++module_a) {
 
   71       if (module_a->getID() == module_b->getID()) {
 
   73         DEBUG(
"Attach PMTs in module " << setw(10) << module_a->getID() << endl);
 
   75         module_b->set ( module_a->getPosition());
 
   76         module_b->swap(*module_a);
 
   86   catch(
const JException& error) {
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
Data structure for detector geometry and calibration. 
 
#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. 
 
General purpose messaging. 
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file. 
 
Utility class to parse command line options. 
 
#define DEBUG(A)
Message macros.