1 #ifndef __JEEP__JSTATUS__
2 #define __JEEP__JSTATUS__
22 namespace JPP {
using namespace JEEP; }
88 return (this->
status & mask);
99 this->status =
status.status;
111 return this->status ==
status.status;
120 bool has(
const int bit)
const
122 return (this->
status & (1<<bit)) != 0;
144 this->
status &= ~(1<<bit);
157 return in >>
status.status;
170 return out <<
status.status;
183 return in >>
status.status;
196 return out <<
status.status;
218 return this->at(key);
238 for (JGetStatusBit::const_iterator i = input.begin(); i != input.end(); ++i) {
239 this->insert(make_pair(i->second, i->first));
252 return this->at(bit);
268 for (
const auto& i : helper) {
269 out << setw(24) << left << i.second << right << status.
has(i.first) << endl;
285 for (
const auto& i : helper) {
286 out << setw(24) << left << i.first << right << status.
has(i.second) << endl;
Auxiliary methods to convert data members or return values of member methods of a set of objects to a...
Interface for binary input.
Interface for binary output.
General puprpose classes and methods.
void print(std::ostream &out, const JStatus &status, const JGetStatusBit &helper)
Print status.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class to map key to status bit.
int operator()(const std::string &key) const
Get status bit.
Auxiliary class to map status bit to key.
const std::string & operator()(const int bit) const
Put status bit.
JPutStatusBit(const JGetStatusBit &input)
Constructor.
Auxiliary class for handling status.
friend std::ostream & operator<<(std::ostream &out, const JStatus &status)
Write status to output.
int getStatus() const
Get status.
friend std::istream & operator>>(std::istream &in, JStatus &status)
Read status from input.
JStatus & getStatus()
Get status.
void set(const int bit)
Set PMT status.
friend JWriter & operator<<(JWriter &out, const JStatus &status)
Write status to output.
bool equals(const JStatus &status) const
Equal method.
bool has(const int bit) const
Test PMT status.
int getStatus(const int mask) const
Get status.
JStatus(const int status)
Constructor.
void reset(const int bit)
Reset PMT status.
JStatus()
Default constructor.
void setStatus(const JStatus &status)
Set status.
friend JReader & operator>>(JReader &in, JStatus &status)
Read status from input.
Template definition of auxiliary base class for comparison of data structures.