1 #ifndef __JDB__JPBS_T__
2 #define __JDB__JPBS_T__
14 namespace JDATABASE {}
15 namespace JPP {
using namespace JDATABASE; }
31 static const char DOT =
'.';
68 if (i0 >= 0) { push_back(i0); }
else {
return; }
69 if (i1 >= 0) { push_back(i1); }
else {
return; }
70 if (i2 >= 0) { push_back(i2); }
else {
return; }
71 if (i3 >= 0) { push_back(i3); }
else {
return; }
72 if (i4 >= 0) { push_back(i4); }
else {
return; }
73 if (i5 >= 0) { push_back(i5); }
else {
return; }
74 if (i6 >= 0) { push_back(i6); }
else {
return; }
75 if (i7 >= 0) { push_back(i7); }
else {
return; }
76 if (i8 >= 0) { push_back(i8); }
else {
return; }
77 if (i9 >= 0) { push_back(i9); }
else {
return; }
88 std::istringstream
is(input);
101 return static_cast<const JPBS_t&
>(*this);
112 return !this->empty();
125 if (first.size() == second.size()) {
127 for (const_iterator p = first.begin(), q = second.begin(); p != first.end(); ++p, ++q) {
149 for (const_iterator p = first.begin(), q = second.begin(); p != first.end() && q != second.end(); ++p, ++q) {
155 return first.size() < second.size();
176 object.push_back(pbs);
179 if (in.ignore() && in >> pbs)
180 object.push_back(pbs);
182 in.setstate(ios::failbit);
187 in.setstate(ios::failbit);
208 if (!
object.empty()) {
210 const_iterator i =
object.begin();
214 while (++i !=
object.end()) {
219 return out << os.str();
static const JPBS_t POWER_BOARD(3, 4, 3, 5)
PBS of power board
static const JPBS_t BASE(3, 2)
PBS of detection unit base
static const JPBS_t NANO_BEACON(3, 4, 3, 7)
PBS of nano-beacon
static const JPBS_t DOM(3, 4)
PBS of optical module
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT)
friend std::ostream & operator<<(std::ostream &out, const JPBS_t &object)
Write PBS to output stream.
JPBS_t()
Default constructor.
static const JPBS_t H_SENSOR(3, 4, 3, 2, 1, 2)
PBS of magnetic field sensor
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
static const JPBS_t CLB(3, 4, 3, 2)
PBS of central-logic board
const JPBS_t & getPBS() const
Get PBS.
static const JPBS_t ACOUSTIC_SENSOR(3, 4, 3, 6, 2)
PBS of pizeo sensor
friend bool operator==(const JPBS_t &first, const JPBS_t &second)
Equality operator.
JPBS_t(const int i0, const int i1=-1, const int i2=-1, const int i3=-1, const int i4=-1, const int i5=-1, const int i6=-1, const int i7=-1, const int i8=-1, const int i9=-1)
Constructor.
JPBS_t(const std::string &input)
Constructor.
bool is_valid() const
Check validity.
static const JPBS_t BASE_CONTAINER(3, 2, 2)
PBS of detection unit base container
friend std::istream & operator>>(std::istream &in, JPBS_t &object)
Read PBS from input stream.
static const JPBS_t DETECTION_UNIT(3)
PBS of detection unit
static const JPBS_t HYDROPHONE(4, 5)
PBS of hydrophone
bool is_string(const JPBS_t &pbs)
Test if given PBS corresponds to a string.
Product breakdown structure (PBS).
bool is_base_module(const JPBS_t &pbs)
Test if given PBS corresponds to a base module.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
static const char DOT
Separator between PBS values.
friend bool operator<(const JPBS_t &first, const JPBS_t &second)
Less-than operator.
static const JPBS_t FPGA(3, 4, 3, 2, 2)
PBS of FPGA
bool is_detector(const JPBS_t &pbs)
Test if given PBS corresponds to a detector.
static const JPBS_t T_SENSOR(3, 4, 3, 2, 1, 1)
PBS of temperature sensor
static const JPBS_t AHRS(3, 4, 3, 4)
PBS of compass
bool is_optical_module(const JPBS_t &pbs)
Test if given PBS corresponds to a optical module.