1 #ifndef __JDETECTOR__JDETECTOR__
2 #define __JDETECTOR__JDETECTOR__
30 namespace JDETECTOR {}
31 namespace JPP {
using namespace JDETECTOR; }
85 public JMultiEquals<JDetector, JTYPELIST<JObjectID, JVersion>::typelist>,
164 for (iterator i = begin(); i != end(); ++i) {
180 for (iterator i = begin(); i != end(); ++i) {
196 return at(address.
first);
208 return at(address.
first);
220 for (JDetector::const_iterator module = this->begin(); module != this->end(); ++module) {
221 if (*module == location) {
238 for (JDetector::iterator module = this->begin(); module != this->end(); ++module) {
239 if (*module == location) {
289 >> static_cast<JObjectID&>(detector)
298 catch(std::exception&) {}
313 istringstream(buffer) >>
n;
317 for (
JModule module; n != 0 && in >> module; --
n) {
318 detector.push_back(module);
337 const ios::fmtflags format = out.flags();
338 const streamsize precision = out.precision();
340 out.setf(ios::fixed);
344 out << static_cast<const JObjectID&>(
detector);
351 out << static_cast<const JDetectorVersion&>(
detector) << endl;
352 out << static_cast<const JDetectorHeader&> (
detector) << endl;
360 out << detector.size() << endl;
364 for (const_iterator i = detector.begin(); i != detector.end(); ++i) {
369 out.precision(precision);
415 out << static_cast<const JObjectID&> (*this);
416 out << static_cast<const JDetectorVersion&>(*this);
417 out << static_cast<const JDetectorHeader&> (*this);
420 for (const_iterator i = begin(); i != end(); ++i) {
Interface for binary output.
Data structure for a composite optical module.
JUTMPosition & sub(const JUTMPosition &pos)
Subtract UTM position.
JDetectorVersion()
Default constructor.
JVersion_t
Enumeration of version types.
friend std::ostream & operator<<(std::ostream &out, const JDetector &detector)
Write detector to output.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
virtual JWriter & write(JWriter &out) const
Write to output.
int second
index of PMT in module data structure.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
friend std::istream & operator>>(std::istream &in, JDetector &detector)
Read detector from input.
virtual JReader & read(JReader &in)
Read from input.
void setVersion(const JVersion &version)
Set version.
const JPMT & getPMT(const JPMTAddress &address) const
Get PMT parameters.
void setVersion(const JVersion &version)
Set version.
JModule & getModule(const JLocation &location)
Get module parameters.
Template definition of auxiliary base class for data structures composed of multiple base classes wit...
JDetector()
Default constructor.
int first
index of module in detector data structure
Forward declaration of binary output.
Version with UTC time and UTM position data.
Version with PMT status field and comments.
Data structure for vector in three dimensions.
Logical location of module.
Auxiliary class for recursive type list generation.
Data structure for PMT geometry and calibration.
Data structure for detector version.
JDetector(const JObjectID &id, const JVersion &version, const JDetectorHeader &header)
Constructor.
bool setVersion(const JDetectorVersion::JVersion_t &version, const bool force=false)
Set version.
Address of module in detector data structure.
Interface for binary input.
const std::string & getVariant() const
Get variant.
static const JGetDetectorVersion getDetectorVersion
Function object to map detector variant to detector version.
const JModule & getModule(const JModuleAddress &address) const
Get module parameters.
static const JPutDetectorVersion putDetectorVersion(getDetectorVersion)
Function object to map detector version to detector variant.
static void setVersion(const JVersion &version)
Set detector version.
Address of PMT in detector data structure.
Data structure for PMT geometry and calibration.
Auxiliary class for object identification.
JPMT & getPMT(const JPMTAddress &address)
Get PMT parameters.
alias put_queue eval echo n
JDetector & operator+=(const JVector3D &pos)
Move detector elements.
JUTMPosition & add(const JUTMPosition &pos)
Add UTM position.
const JModule & getModule(const JLocation &location) const
Get module parameters.
Exception for accessing an index in a collection that is outside of its range.
Auxiliary class for version identifier.
JDetector & operator-=(const JVector3D &pos)
Move detector elements.
JModule & getModule(const JModuleAddress &address)
Get module parameters.
const JVersion & getVersion() const
Get version.
Data structure for a composite optical module.