JANA2
C++ framework for multi-threaded data processing
Loading...
Searching...
No Matches
JStatusBits< T > Class Template Reference

Public Member Functions

void SetStatus (uint64_t status)
 
uint64_t GetStatus () const
 
bool GetStatusBit (T bit) const
 
bool SetStatusBit (T bit, bool val=true)
 
bool ClearStatusBit (T bit)
 
void ClearStatus ()
 
std::string ToString () const
 

Static Public Member Functions

static void SetStatusBitDescription (T bit, std::string description)
 
static std::string GetStatusBitDescription (T bit)
 
static void GetStatusBitDescriptions (std::map< uint32_t, std::string > &status_bit_descriptions)
 

Member Function Documentation

◆ ClearStatus()

template<typename T >
void JStatusBits< T >::ClearStatus ( )
inline

Clear all bits in the status word. This is equivalent to calling SetStatus(0).

◆ ClearStatusBit()

template<typename T >
bool JStatusBits< T >::ClearStatusBit ( bit)
inline

Clear the specified status bit. The value of "bit" should be from 0-63. This is equivalent to calling SetStatusBit(bit, false). The value of the status bit prior to this call is returned.

◆ GetStatusBit()

template<typename T >
bool JStatusBits< T >::GetStatusBit ( bit) const
inline

Return the present value of the specified status bit. The value of "bit" should be from 0-63.

◆ GetStatusBitDescription()

template<typename T >
static std::string JStatusBits< T >::GetStatusBitDescription ( bit)
inlinestatic

Get the description of the specified status bit. The value of "bit" should be from 0-63.

◆ GetStatusBitDescriptions()

template<typename T >
static void JStatusBits< T >::GetStatusBitDescriptions ( std::map< uint32_t, std::string > &  status_bit_descriptions)
inlinestatic

Get the full list of descriptions of status bits. Note that the meaning of the bits is implementation specific and so descriptions are optional. It may be that some or none of the bits used have an associated description.

◆ SetStatusBit()

template<typename T >
bool JStatusBits< T >::SetStatusBit ( bit,
bool  val = true 
)
inline

Set the value of the specified status bit. If the second argument is passed, the bit will be set to that value. Otherwise, the bit will be set to "true". The value of "bit" should be from 0-63. The value of the status bit prior to this call is returned.

◆ SetStatusBitDescription()

template<typename T >
static void JStatusBits< T >::SetStatusBitDescription ( bit,
std::string  description 
)
inlinestatic

Set the description of the specified bit. The value of "bit" should be from 0-63.

◆ ToString()

template<typename T >
std::string JStatusBits< T >::ToString ( ) const
inline

Generate a formatted string suitable for printing to the screen, including the entire word in both hexadecimal and binary along with descriptions.


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