Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Instrument Class Reference

Creates and controls the the root GlastDetector object representing Glast. Provides interface to a ResponseFile object handling IRF input. More...

#include <Instrument.h>

List of all members.

Public Methods

 Instrument ()
 ~Instrument ()
int initialize (std::string ini="", std::string xml="")
 read standard ini and xml files describing the instrument, return non-zero if fail. If not specified, get default from package. More...

int openIRF (std::string filename)
 open an IRF file: return non-zero if fail. More...

int readIRF ()
 read the next event from the IRF file. Return non-zero if fail or EOF. More...

std::string irfFileName () const
 return the current file name. More...

int detector_count () const
 return the number of detectors. More...

int detectors_with_data () const
 return the number of detectors currently with data. More...

std::string iniFileName () const
 return ini file name used. More...

std::string xmlFileName () const
 return xml file name used. More...

GlastDetectorrootDetector () const
 return pointer to root detector (glast). More...

void accept (DetectorConverter&) const
 accept a visitor to traverse the structure. Note that must be on a const object. More...

const xml::IFile* iniFile () const
 access to the parsed inifile. More...

void setDetector (GlastDetector* d)
 set new root detector. More...


Protected Methods

int loadPersFile ()
int loadIniFile ()

Private Attributes

GlastDetectorm_rootDetector
ResponseFilem_respFile
std::string m_irfFile
std::string m_xmlFile
std::string m_iniFile
bool m_ownsDetector


Detailed Description

Creates and controls the the root GlastDetector object representing Glast. Provides interface to a ResponseFile object handling IRF input.

Designed for instantiation of all the detector objects via the xml geometry description, and reading an IRF file.

Definition at line 22 of file Instrument.h.


Constructor & Destructor Documentation

Instrument::Instrument ( )
 

Definition at line 14 of file Instrument.cxx.

Instrument::~Instrument ( )
 

Definition at line 17 of file Instrument.cxx.


Member Function Documentation

void Instrument::accept ( DetectorConverter & dc ) const
 

accept a visitor to traverse the structure. Note that must be on a const object.

Definition at line 142 of file Instrument.cxx.

Referenced by main().

int Instrument::detector_count ( ) const
 

return the number of detectors.

Definition at line 148 of file Instrument.cxx.

Referenced by main().

int Instrument::detectors_with_data ( ) const
 

return the number of detectors currently with data.

Definition at line 152 of file Instrument.cxx.

Referenced by main().

const xml::IFile * Instrument::iniFile ( ) const
 

access to the parsed inifile.

Definition at line 156 of file Instrument.cxx.

std::string Instrument::iniFileName ( ) const
 

return ini file name used.

Definition at line 161 of file Instrument.cxx.

int Instrument::initialize ( std::string iniFile = "",
std::string xmlFile = "" )
 

read standard ini and xml files describing the instrument, return non-zero if fail. If not specified, get default from package.

Definition at line 36 of file Instrument.cxx.

Referenced by main().

std::string Instrument::irfFileName ( ) const
 

return the current file name.

Definition at line 160 of file Instrument.cxx.

Referenced by main().

int Instrument::loadIniFile ( ) [protected]
 

Definition at line 101 of file Instrument.cxx.

Referenced by initialize().

int Instrument::loadPersFile ( ) [protected]
 

Definition at line 64 of file Instrument.cxx.

Referenced by initialize().

int Instrument::openIRF ( std::string filename )
 

open an IRF file: return non-zero if fail.

Definition at line 127 of file Instrument.cxx.

Referenced by main().

int Instrument::readIRF ( )
 

read the next event from the IRF file. Return non-zero if fail or EOF.

Definition at line 113 of file Instrument.cxx.

Referenced by main().

GlastDetector * Instrument::rootDetector ( ) const
 

return pointer to root detector (glast).

Definition at line 163 of file Instrument.cxx.

void Instrument::setDetector ( GlastDetector * d )
 

set new root detector.

Definition at line 28 of file Instrument.cxx.

std::string Instrument::xmlFileName ( ) const
 

return xml file name used.

Definition at line 162 of file Instrument.cxx.

Referenced by main().


Member Data Documentation

std::string Instrument::m_iniFile [private]
 

Definition at line 76 of file Instrument.h.

std::string Instrument::m_irfFile [private]
 

Definition at line 74 of file Instrument.h.

bool Instrument::m_ownsDetector [private]
 

Definition at line 77 of file Instrument.h.

ResponseFile * Instrument::m_respFile [private]
 

Definition at line 73 of file Instrument.h.

GlastDetector * Instrument::m_rootDetector [private]
 

Definition at line 72 of file Instrument.h.

std::string Instrument::m_xmlFile [private]
 

Definition at line 75 of file Instrument.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:22:41 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000