47{
50
51 string inputFile;
54 string variant;
57 string option;
59
60
61
67
68 try {
69
70 JParser<> zap(
"Auxiliary program to generate detector files.");
71
73
82
84 }
85 catch(const exception &error) {
87 }
88
89
91
97 ;
99 ;
100 else
101 FATAL(
"Invalid option " << option <<
endl);
102
103
105
107 FATAL(
"No detector address map for detector identifier " <<
detector.getID() <<
endl);
108 }
109
111
113
114
116
117 if (inputFile != "") {
118
120
121 NOTICE(
"Reading file " << file_name <<
".. " << flush);
122
123 ifstream in(file_name.c_str());
124
125 if (in) {
126
129 }
130
131 in.close();
132
134
135 } else {
136
137 FATAL(
"Error opening file " << inputFile);
138 }
139
140 } else {
141
142
143
298
299
300
303 }
304
306 FATAL(
"Available footprint inconsistent with specified number of lines "
308 }
309
310
311
313
317 }
318 } else {
321 }
322 }
323
324
325
328 }
329 }
330
331
333 DEBUG(i->getID() <<
' ' << i->getX() <<
' ' << i->getY() <<
endl);
334 }
335
336
337
338
340
342
343 {
346 option ==
ARCA_t ? ARCA_TBARZ_M :
347 option ==
ORCA_t ? ORCA_TBARZ_M :
348 0.0);
349
351
352 const int id =
demo.getModuleID(location);
353
355
356 module.set(position);
357
358 module.compile();
359
361 }
362
363 for (
unsigned int floor = 1; floor <= parameters.
numberOfFloors; ++floor) {
364
368
370
371 const int id =
demo.getModuleID(location);
372
374
376 module = getModule<JKM3NeT_t> (id, location);
378 module = getModule<JAntares_t>(id, location);
380 module = JModule(id, location);
381 else
382 FATAL(
"Invalid option " << option <<
endl);
383
384 module.add(position);
385
386 for (JModule::iterator pmt =
module.begin(); pmt !=
module.end(); ++pmt, ++
PMT) {
388
389 }
390
392 }
393 }
394
395
396
397 try {
399 }
402 }
403
404 return 0;
405}
JDAQPMTIdentifier PMT
Command line options.
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for anchor position on sea bed.
Lookup table for PMT addresses in detector.
Auxiliary class for I/O of JDetectorParameters data structure.
Data structure for parameters for detector geometry.
JParameter< unsigned int > numberOfLines
JParameter< double > floorDistance_m
JParameter< int > detectorType
JParameter< unsigned int > numberOfFloors
JParameter< double > lineDistance_m
Logical location of module.
Data structure for a composite optical module.
Data structure for vector in three dimensions.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
JDetectorHeader getARCADetectorHeader()
Get detector header for ARCA.
void store(const std::string &file_name, const JDetector &detector)
Store detector to output file.
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.
JDetectorHeader getORCADetectorHeader()
Get detector header for ORCA.
bool hasDetectorAddressMap(const int id)
Check if detector address map is available.
std::string getFullFilename(const std::string &variable, const std::string &file_name)
Get full file name (see JEEP::getPath).
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Empty structure for specification of parser element that is initialised (i.e. does not require input)...