Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
JDETECTOR::JGetPMTStatusBit Struct Reference

Auxiliary class to map key to PMT status bit. More...

#include <JPMT.hh>

Inheritance diagram for JDETECTOR::JGetPMTStatusBit:
std::map< std::string, JPMT::JPMTStatusBits_t >

Public Member Functions

 JGetPMTStatusBit ()
 Default constructor. More...
 
JPMT::JPMTStatusBits_t operator() (const std::string &key) const
 Get PMT status bit. More...
 

Detailed Description

Auxiliary class to map key to PMT status bit.

Definition at line 277 of file JPMT.hh.

Constructor & Destructor Documentation

JDETECTOR::JGetPMTStatusBit::JGetPMTStatusBit ( )
inline

Default constructor.

Definition at line 283 of file JPMT.hh.

284  {
285  using namespace JPP;
286 
287 #define MAKE_ENTRY(A) std::make_pair(getClassname(#A), A)
288 
289  this->insert(MAKE_ENTRY(JPMT::PMT_STATUS));
290 
291 #undef MAKE_ENTRY
292  }
General status.
Definition: JPMT.hh:65
#define MAKE_ENTRY(A)

Member Function Documentation

JPMT::JPMTStatusBits_t JDETECTOR::JGetPMTStatusBit::operator() ( const std::string &  key) const
inline

Get PMT status bit.

Parameters
keykey
Returns
bit

Definition at line 301 of file JPMT.hh.

302  {
303  const_iterator i = this->find(key);
304 
305  if (i != this->end()) {
306 
307  return i->second;
308 
309  } else {
310 
311  THROW(JTypeInformationException, "Invalid key <" << key << ">");
312  }
313  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:633

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