00001 // $Header: /nfs/slac/g/glast/ground/cvs/instrument/instrument/Instrument.h,v 1.7 2001/02/23 02:31:25 burnett Exp $ 00002 00003 #ifndef INSTRUMENT_H 00004 #define INSTRUMENT_H 00005 #include <string> 00006 00007 // forward declarations 00008 class ResponseFile; 00009 class GlastDetector; 00010 class DetectorConverter; 00011 namespace xml { 00012 class IFile; 00013 } 00014 00017 00022 class Instrument { 00023 public: 00024 // ! constructor 00025 Instrument(); 00026 00027 ~Instrument(); 00028 00031 int initialize (std::string ini="", std::string xml=""); 00032 00034 int openIRF(std::string filename); 00035 00037 int readIRF (); 00038 00040 std::string irfFileName()const; 00041 00043 int detector_count()const; 00044 00046 int detectors_with_data()const; 00047 00049 std::string iniFileName()const; 00050 00052 std::string xmlFileName()const; 00053 00055 GlastDetector* rootDetector() const; 00056 00059 void accept(DetectorConverter&) const; 00060 00062 const xml::IFile* iniFile()const; 00063 00065 void setDetector(GlastDetector* d); 00066 00067 protected: 00068 int loadPersFile (); 00069 int loadIniFile (); 00070 00071 private: 00072 GlastDetector* m_rootDetector; 00073 ResponseFile* m_respFile; 00074 std::string m_irfFile; 00075 std::string m_xmlFile; 00076 std::string m_iniFile; 00077 bool m_ownsDetector; 00078 }; 00079 00080 #endif
1.2.3 written by Dimitri van Heesch,
© 1997-2000