1 #ifndef __JDETECTOR__JDETECTOR__
2 #define __JDETECTOR__JDETECTOR__
30 namespace JDETECTOR {}
31 namespace JPP {
using namespace JDETECTOR; }
82 public JMultiEquals<JDetector, JTYPELIST<JObjectID, JVersion>::typelist>,
150 for (iterator i = begin(); i != end(); ++i) {
166 for (iterator i = begin(); i != end(); ++i) {
182 return at(address.
first);
194 return at(address.
first);
206 for (JDetector::const_iterator module = this->begin(); module != this->end(); ++module) {
207 if (*module == location) {
224 for (JDetector::iterator module = this->begin(); module != this->end(); ++module) {
225 if (*module == location) {
275 >> static_cast<JObjectID&>(detector)
284 catch(std::exception&) {}
299 istringstream(buffer) >> n;
303 for (
JModule module; n != 0 && in >> module; --n) {
304 detector.push_back(module);
323 const ios::fmtflags format = out.flags();
324 const streamsize precision = out.precision();
326 out.setf(ios::fixed);
330 out << static_cast<const JObjectID&>(detector);
337 out << static_cast<const JDetectorVersion&>(detector) << endl;
338 out << static_cast<const JDetectorHeader&> (detector) << endl;
346 out << detector.size() << endl;
350 for (const_iterator i = detector.begin(); i != detector.end(); ++i) {
355 out.precision(precision);
380 for (
JModule module; n != 0; --n) {
401 out << static_cast<const JObjectID&> (*this);
402 out << static_cast<const JDetectorVersion&>(*this);
403 out << static_cast<const JDetectorHeader&> (*this);
406 for (const_iterator i = begin(); i != end(); ++i) {
Interface for binary output.
Data structure for a composite optical module.
JVersion_t
Enumeration of version types.
void setVersion(const JDetectorVersion::JVersion_t &version)
Set version.
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.
friend std::istream & operator>>(std::istream &in, JDetector &detector)
Read detector from input.
virtual JReader & read(JReader &in)
Read from input.
const JPMT & getPMT(const JPMTAddress &address) const
Get PMT parameters.
void setVersion(const JVersion &version)
Set version.
void setVersion(const JVersion &version)
Set version.
Template definition of auxiliary base class for composite data structures composed of base classes wi...
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.
const std::string & getVariant() const
Get variant.
Version with PMT status field and comments.
Data structure for vector in three dimensions.
Auxiliary class for recursive type list generation.
JModule & getModule(const JModuleLocation &location)
Get module parameters.
Data structure for PMT geometry and calibration.
Data structure for detector version.
JDetector(const JObjectID &id, const JVersion &version, const JDetectorHeader &header)
Constructor.
Address of module in detector data structure.
Interface for binary input.
static const JGetDetectorVersion getDetectorVersion
Function object to map detector variant to detector version.
const JModule & getModule(const JModuleAddress &address) const
Get module parameters.
Auxiliary class for version identifier.
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.
const JModule & getModule(const JModuleLocation &location) const
Get module parameters.
JDetector & operator+=(const JVector3D &pos)
Move detector elements.
Exception for accessing an index in a collection that is outside of its range.
JDetector & operator-=(const JVector3D &pos)
Move detector elements.
JModule & getModule(const JModuleAddress &address)
Get module parameters.
Logical location of module.
Data structure for a composite optical module.
const JVersion & getVersion() const
Get version.