Jpp  17.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
JDETECTOR::JModuleStatus_t Struct Reference

Auxiliary data structure for module status. More...

#include <JDetectorCalibration.hh>

Inheritance diagram for JDETECTOR::JModuleStatus_t:
JLANG::JObjectID JEEP::JStatus JLANG::JComparable< JObjectID > JLANG::JComparable< JObjectID, int > JLANG::JEquals< JFirst_t, JSecond_t >

Public Member Functions

 JModuleStatus_t ()
 Default constructor. More...
 
 JModuleStatus_t (const JObjectID &id, const JStatus &status)
 Constructor. More...
 
int getID () const
 Get identifier. More...
 
int & getID ()
 Get identifier. More...
 
void setID (const int id)
 Set identifier. More...
 
bool less (const JObjectID &object) const
 Less than method. More...
 
bool less (const int id) const
 Less than method. More...
 
bool more (const int id) const
 More than method. More...
 
int getStatus () const
 Get status. More...
 
JStatusgetStatus ()
 Get status. More...
 
int getStatus (const int mask) const
 Get status. More...
 
void setStatus (const JStatus &status)
 Set status. More...
 
bool equals (const JStatus &status) const
 Equal method. More...
 
bool has (const int bit) const
 Test PMT status. More...
 
void set (const int bit)
 Set PMT status. More...
 
void reset (const int bit)
 Reset PMT status. More...
 

Protected Attributes

int __id
 
int status
 

Detailed Description

Auxiliary data structure for module status.

Definition at line 673 of file JDetectorCalibration.hh.

Constructor & Destructor Documentation

JDETECTOR::JModuleStatus_t::JModuleStatus_t ( )
inline

Default constructor.

Definition at line 680 of file JDetectorCalibration.hh.

681  {}
JDETECTOR::JModuleStatus_t::JModuleStatus_t ( const JObjectID id,
const JStatus status 
)
inline

Constructor.

Parameters
idmodule identifier
statusmodule status

Definition at line 690 of file JDetectorCalibration.hh.

691  :
692  JObjectID(id),
693  JStatus (status)
694  {}
JStatus()
Default constructor.
Definition: JStatus.hh:43
JObjectID()
Default constructor.
Definition: JObjectID.hh:30

Member Function Documentation

int JLANG::JObjectID::getID ( ) const
inlineinherited

Get identifier.

Returns
identifier

Definition at line 50 of file JObjectID.hh.

51  {
52  return __id;
53  }
int& JLANG::JObjectID::getID ( )
inlineinherited

Get identifier.

Returns
identifier

Definition at line 61 of file JObjectID.hh.

62  {
63  return __id;
64  }
void JLANG::JObjectID::setID ( const int  id)
inlineinherited

Set identifier.

Parameters
ididentifier

Definition at line 72 of file JObjectID.hh.

73  {
74  this->__id = id;
75  }
bool JLANG::JObjectID::less ( const JObjectID object) const
inlineinherited

Less than method.

Parameters
objectobject identifier
Returns
true if this identifier less than given identifier; else false

Definition at line 84 of file JObjectID.hh.

85  {
86  return this->getID() < object.getID();
87  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50
bool JLANG::JObjectID::less ( const int  id) const
inlineinherited

Less than method.

Parameters
ididentifier
Returns
true if this identifier less than given identifier; else false

Definition at line 96 of file JObjectID.hh.

97  {
98  return this->getID() < id;
99  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50
bool JLANG::JObjectID::more ( const int  id) const
inlineinherited

More than method.

Parameters
ididentifier
Returns
true if this identifier greater than given identifier; else false

Definition at line 108 of file JObjectID.hh.

109  {
110  return this->getID() > id;
111  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50
int JEEP::JStatus::getStatus ( ) const
inlineinherited

Get status.

Returns
status

Definition at line 63 of file JStatus.hh.

64  {
65  return this->status;
66  }
JStatus& JEEP::JStatus::getStatus ( )
inlineinherited

Get status.

Returns
status

Definition at line 74 of file JStatus.hh.

75  {
76  return *this;
77  }
int JEEP::JStatus::getStatus ( const int  mask) const
inlineinherited

Get status.

Parameters
maskmask
Returns
status

Definition at line 86 of file JStatus.hh.

87  {
88  return (this->status & mask);
89  }
void JEEP::JStatus::setStatus ( const JStatus status)
inlineinherited

Set status.

Parameters
statusstatus

Definition at line 97 of file JStatus.hh.

98  {
99  this->status = status.status;
100  }
bool JEEP::JStatus::equals ( const JStatus status) const
inlineinherited

Equal method.

Parameters
statusstatus
Returns
true if this status equal to given status; else false

Definition at line 109 of file JStatus.hh.

110  {
111  return this->status == status.status;
112  }
bool JEEP::JStatus::has ( const int  bit) const
inlineinherited

Test PMT status.

Parameters
bitbit

Definition at line 120 of file JStatus.hh.

121  {
122  return (this->status & (1<<bit)) != 0;
123  }
void JEEP::JStatus::set ( const int  bit)
inlineinherited

Set PMT status.

Parameters
bitbit

Definition at line 131 of file JStatus.hh.

132  {
133  this->status |= (1<<bit);
134  }
void JEEP::JStatus::reset ( const int  bit)
inlineinherited

Reset PMT status.

Parameters
bitbit

Definition at line 142 of file JStatus.hh.

143  {
144  this->status &= ~(1<<bit);
145  }

Member Data Documentation

int JLANG::JObjectID::__id
protectedinherited

Definition at line 140 of file JObjectID.hh.

int JEEP::JStatus::status
protectedinherited

Definition at line 200 of file JStatus.hh.


The documentation for this struct was generated from the following file: