1#ifndef __JDETECTOR__JDETECTORVERSION__
2#define __JDETECTOR__JDETECTORVERSION__
82 return (!this->
version.empty() && (this->version[0] ==
'v' || this->version[0] ==
'V'));
143 public std::map<std::string, JDetectorVersion::JVersion_t>
152#define MAKE_ENTRY(A) std::make_pair(to_upper(getClassname(#A)), A)
174 const_iterator i = this->find(to_upper(version));
176 if (i != this->end()) {
207 const_iterator i = this->find(to_upper(version));
209 if (i != this->end())
238 for (const_iterator i = this->begin(); i != this->end(); ++i) {
239 if (i->second == value) {
253 public std::map<JDetectorVersion::JVersion_t, std::string>
264 for (JGetDetectorVersion::const_iterator i = input.begin(); i != input.end(); ++i) {
265 this->insert(make_pair(i->second, i->first));
278 const_iterator i = this->find(value);
280 if (i != this->end()) {
298 const_iterator i = this->find(value);
300 if (i != this->end())
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
STD extensions for binary I/O.
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Interface for binary input.
Interface for binary output.
file Auxiliary data structures and methods for detector calibration.
static const JGetDetectorVersion getDetectorVersion
Function object to map detector version to numerical value.
T getLatestDetectorVersion()
Get latest detector version.
static const JPutDetectorVersion putDetectorVersion(getDetectorVersion)
Function object to map numerical value to detector version.
std::vector< T > getDetectorVersions()
Get detector versions.
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool hasVersion() const
Check validity of version.
JDetectorVersion()
Default constructor.
friend std::ostream & operator<<(std::ostream &out, const JDetectorVersion &version)
Write version to output.
JDetectorVersion(const JVersion &version)
Constructor.
friend std::istream & operator>>(std::istream &in, JDetectorVersion &version)
Read version from input.
friend JReader & operator>>(JReader &in, JDetectorVersion &version)
Read version from input.
friend JWriter & operator<<(JWriter &out, const JDetectorVersion &version)
Write version to output.
JVersion_t
Enumeration of version types.
@ V2
Version with UTC time and UTM position data.
@ V5
Version with module status field.
@ V4
Version with quaternion and time offset per module.
@ V3
Version with PMT status field and comments.
Auxiliary class to map detector version to numerical value.
JDetectorVersion::JVersion_t operator()(const std::string &version) const
Get numerical value.
int operator[](const JDetectorVersion::JVersion_t &value) const
Get index of detector version.
JDetectorVersion::JVersion_t operator()(const JDetectorVersion &version) const
Get numerical value.
JGetDetectorVersion()
Default constructor.
int operator[](const std::string &version) const
Get index of detector version.
int operator[](const JDetectorVersion &version) const
Get index of detector version.
Auxiliary class to map numerical value to detector version.
const std::string & operator()(const JDetectorVersion::JVersion_t &value) const
Put detector version.
JPutDetectorVersion(const JGetDetectorVersion &input)
Constructor.
int operator[](const JDetectorVersion::JVersion_t &value) const
Get index of version.
Auxiliary class for version identifier.
const std::string & getVersion() const
Get version.
Auxiliary class for a type holder.