GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GSPIInstDir Class Reference

INTEGRAL/SPI instrument direction class. More...

#include <GSPIInstDir.hpp>

Inheritance diagram for GSPIInstDir:
GInstDir GBase

Public Member Functions

 GSPIInstDir (void)
 Void constructor. More...
 
 GSPIInstDir (const GSkyDir &dir, const int &detid)
 SPI instrument direction constructor. More...
 
 GSPIInstDir (const GSPIInstDir &dir)
 Copy constructor. More...
 
virtual ~GSPIInstDir (void)
 Destructor. More...
 
GSPIInstDiroperator= (const GSPIInstDir &dir)
 Assignment operator. More...
 
virtual void clear (void)
 Clear INTEGRAL/SPI instrument direction. More...
 
virtual GSPIInstDirclone (void) const
 Clone INTEGRAL/SPI instrument direction. More...
 
virtual std::string classname (void) const
 Return class name. More...
 
virtual u_int64_t hash (void) const
 Return instrument direction hash value. More...
 
virtual std::string print (const GChatter &chatter=NORMAL) const
 Print INTEGRAL/SPI instrument direction information. More...
 
void dir (const GSkyDir &dir)
 Set pointing direction. More...
 
const GSkyDirdir (void) const
 Return pointing direction. More...
 
void detid (const int &detid)
 Set detector identifier. More...
 
const int & detid (void) const
 Return detector identifier. More...
 
- Public Member Functions inherited from GInstDir
 GInstDir (void)
 Void constructor. More...
 
 GInstDir (const GInstDir &dir)
 Copy constructor. More...
 
virtual ~GInstDir (void)
 Destructor. More...
 
virtual GInstDiroperator= (const GInstDir &dir)
 Assignment operator. More...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GSPIInstDir &dir)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
- Protected Member Functions inherited from GInstDir
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GInstDir &dir)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Protected Attributes

GSkyDir m_dir
 
int m_detid
 

Detailed Description

INTEGRAL/SPI instrument direction class.

The INTEGRAL/SPI instrument direction defines the spatial information associated to an event.

Definition at line 52 of file GSPIInstDir.hpp.

Constructor & Destructor Documentation

GSPIInstDir::GSPIInstDir ( void  )

Void constructor.

Creates an empty INTEGRAL/SPI instrument direction.

Definition at line 56 of file GSPIInstDir.cpp.

References init_members().

Referenced by clone().

GSPIInstDir::GSPIInstDir ( const GSkyDir dir,
const int &  detid 
)

SPI instrument direction constructor.

Parameters
[in]dirPointing direction.
[in]detidDetector identifier.

Definition at line 72 of file GSPIInstDir.cpp.

References detid(), dir(), init_members(), m_detid, and m_dir.

GSPIInstDir::GSPIInstDir ( const GSPIInstDir dir)

Copy constructor.

Parameters
[in]dirINTEGRAL/SPI instrument direction.

Definition at line 91 of file GSPIInstDir.cpp.

References copy_members(), and init_members().

GSPIInstDir::~GSPIInstDir ( void  )
virtual

Destructor.

Definition at line 107 of file GSPIInstDir.cpp.

References free_members().

Member Function Documentation

std::string GSPIInstDir::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GSPIInstDir").

Implements GInstDir.

Definition at line 95 of file GSPIInstDir.hpp.

void GSPIInstDir::clear ( void  )
virtual

Clear INTEGRAL/SPI instrument direction.

Clears INTEGRAL/SPI instrument direction by resetting all class members to an initial state. Any information that was present before will be lost.

Implements GInstDir.

Definition at line 165 of file GSPIInstDir.cpp.

References GInstDir::free_members(), free_members(), GInstDir::init_members(), and init_members().

Referenced by GSPIEventCube::alloc_data(), and GSPIEventBin::init_members().

GSPIInstDir * GSPIInstDir::clone ( void  ) const
virtual

Clone INTEGRAL/SPI instrument direction.

Returns
Pointer to deep copy of INTEGRAL/SPI instrument direction.

Implements GInstDir.

Definition at line 185 of file GSPIInstDir.cpp.

References GSPIInstDir().

void GSPIInstDir::copy_members ( const GSPIInstDir dir)
protected

Copy class members.

Parameters
[in]dirINTEGRAL/SPI instrument direction.

Definition at line 271 of file GSPIInstDir.cpp.

References m_detid, and m_dir.

Referenced by GSPIInstDir(), and operator=().

void GSPIInstDir::detid ( const int &  detid)
inline

Set detector identifier.

Parameters
[in]detidDetector identifier.

Set the detector identifier.

Definition at line 138 of file GSPIInstDir.hpp.

References detid(), and m_detid.

Referenced by GSPIResponse::irf_value(), GSPIEventCube::read_pnt(), GSPIResponse::set_detids(), and GSPIModelDataSpace::setup_evtclass().

const int & GSPIInstDir::detid ( void  ) const
inline

Return detector identifier.

Returns
Detector identifier.

Returns the detector identifier.

Definition at line 153 of file GSPIInstDir.hpp.

References m_detid.

Referenced by detid(), and GSPIInstDir().

void GSPIInstDir::dir ( const GSkyDir dir)
inline

Set pointing direction.

Parameters
[in]dirPointing direction.

Set the pointing direction.

Definition at line 109 of file GSPIInstDir.hpp.

References dir(), and m_dir.

Referenced by GSPIEventCube::read_pnt().

const GSkyDir & GSPIInstDir::dir ( void  ) const
inline

Return pointing direction.

Returns
Pointing direction.

Returns the pointing direction.

Definition at line 124 of file GSPIInstDir.hpp.

References m_dir.

Referenced by dir(), and GSPIInstDir().

void GSPIInstDir::free_members ( void  )
protected

Delete class members.

Definition at line 285 of file GSPIInstDir.cpp.

Referenced by clear(), operator=(), and ~GSPIInstDir().

u_int64_t GSPIInstDir::hash ( void  ) const
virtual

Return instrument direction hash value.

Returns
Hash value.

Returns a hash value that can be used in the response cache.

Implements GInstDir.

Definition at line 198 of file GSPIInstDir.cpp.

References GSkyDir::dec(), m_detid, m_dir, and GSkyDir::ra().

void GSPIInstDir::init_members ( void  )
protected

Initialise class members.

Definition at line 255 of file GSPIInstDir.cpp.

References GSkyDir::clear(), m_detid, and m_dir.

Referenced by clear(), GSPIInstDir(), and operator=().

GSPIInstDir & GSPIInstDir::operator= ( const GSPIInstDir dir)

Assignment operator.

Parameters
[in]dirINTEGRAL/SPI instrument direction.
Returns
INTEGRAL/SPI instrument direction.

Definition at line 129 of file GSPIInstDir.cpp.

References copy_members(), free_members(), init_members(), and GInstDir::operator=().

std::string GSPIInstDir::print ( const GChatter chatter = NORMAL) const
virtual

Print INTEGRAL/SPI instrument direction information.

Parameters
[in]chatterChattiness.
Returns
String containing INTEGRAL/SPI instrument direction information.

Implements GInstDir.

Definition at line 225 of file GSPIInstDir.cpp.

References GSkyDir::dec_deg(), m_detid, m_dir, GSkyDir::ra_deg(), SILENT, and gammalib::str().

Member Data Documentation

int GSPIInstDir::m_detid
protected

Definition at line 85 of file GSPIInstDir.hpp.

Referenced by copy_members(), detid(), GSPIInstDir(), hash(), init_members(), and print().

GSkyDir GSPIInstDir::m_dir
protected

Definition at line 84 of file GSPIInstDir.hpp.

Referenced by copy_members(), dir(), GSPIInstDir(), hash(), init_members(), and print().


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