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

FluxMgr.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/flux/flux/FluxMgr.h,v 1.8 2001/10/18 03:30:16 srobinsn Exp $
00002 
00003 #ifndef FLUX_MGR_H
00004 #define FLUX_MGR_H
00005 
00006 #include "flux/CompositeSource.h"
00007 
00008 #include "flux/FluxSource.h"
00009 
00010 #include "dom/DOM_Document.hpp"
00011 #include "dom/DOM_Element.hpp"
00012 #include "xml/XmlParser.h"
00013 #include "ISpectrumFactory.h"
00014 #include <map>
00015 #include <list>
00016 #include <string>
00018 
00023 class FluxMgr 
00024 {
00025     
00026 public:
00028     FluxMgr(std::string fileName="");
00029     
00031     FluxMgr(const std::vector<std::string>& fileList);
00032     
00033     ~FluxMgr();
00034     
00036     EventSource* source(std::string name);
00037     
00039     std::list<std::string> sourceList() const;
00040     
00042     void setArea(double area);
00043     
00045     void test(std::ostream& out, std::string source_name, int count);
00046     
00048     void setGlastAngles(std::pair<double,double> ang);
00049     
00051     void setGlastPosition(std::pair<double,double> pos);
00052     
00053     void addFactory(std::string name, const ISpectrumFactory* factory );
00054     
00056     void setExpansion (double p);
00057     
00059     void pass ( double t);
00060     
00062     void synch ();
00063     
00065     void sampleintvl ( /*GPStime*/double t );
00066     
00068     std::pair<double,double> location();
00069     
00070 private:
00071     
00072     // source library lookup.  Each source is uniquely identified
00073     // by its "name" attribute because "name" is of type ID
00074     DOM_Element  getLibrarySource(const DOMString& id);
00075     
00076     
00077     
00078     void defaultFile();
00079     void init(const std::vector<std::string>& fileList);
00080     
00081     EventSource* getSourceFromXML(const DOM_Element& src);
00082     
00083     DOM_Document m_library_doc;
00084     
00085     DOM_Element     s_library;
00086     
00087     std::vector<DOM_Document> m_library_doclist;
00088     
00089     std::vector<DOM_Element>     s_librarylist;
00090     
00091     // list of sources for easy lookup
00092     std::map<std::string, DOM_Element > m_sources;
00093     
00094     void writeXmlFile(std::string *fileStr, const std::vector<std::string>& fileList);
00095     
00096 };
00097 #endif

Generated at Wed Nov 21 12:20:34 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000