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

EventSource.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/flux/flux/EventSource.h,v 1.7 2001/10/18 03:30:16 srobinsn Exp $
00002 
00003 
00004 #ifndef EventSource_h
00005 #define EventSource_h 1
00006 
00007 #include <string>
00008 
00009 #include "GPS.h"
00010 
00011 
00012 class DOM_Element;
00013 class FluxSource;
00014 
00015 
00019 class EventSource
00020 {
00021   public:
00023       EventSource (double aFlux = 1.0, unsigned acode = 0);
00024       EventSource (const DOM_Element& xelem);
00025       virtual ~EventSource();
00026 
00028       GPStime interval ();
00029 
00031       virtual double  rate ( double solid_angle, double flux ); 
00032       virtual double  rate ()const;
00033       virtual void    rate ( double );
00034 
00036       virtual FluxSource* event () = 0;   
00037 
00039       virtual std::string fullTitle () const;
00040       virtual std::string displayTitle () const;
00041 
00043       virtual double    flux () const;
00044       virtual void      flux (double value);
00045 
00047       void      disable (){m_enabled=false;}
00048       void      enable(){m_enabled=true;}
00049       bool enabled()const{return m_enabled;}
00050 
00052       virtual double    solidAngle () const;
00053       void      solidAngle ( double );
00054 
00056       const std::string& name () const;
00057       void name (const std::string& value);
00058 
00060       unsigned  code () const;
00061       virtual void  code ( unsigned );
00062 
00064       static double     totalArea ();
00065       static void       totalArea ( double value );
00066 
00068       virtual Orbit*    makeOrbit () const;
00069 
00071       virtual int eventNumber()const{return -1;} 
00072 
00074       virtual std::string findSource()const{return "";}
00075 
00076 
00078       virtual int numSource()const{return -1;}
00079 
00080   private:                                                          
00081       bool m_enabled;           // toggle that it is enabled
00082       double m_flux;            // representative flux for this event source...
00083       double m_solid_angle;     // solid angle over which the rate is computed  (in steradians)
00084       std::string m_name;       // name of the event source (UI)
00085       unsigned  m_code;         // code id for this event source - for identification in the tuple.
00086 
00087       static unsigned int  s_id;    // id for new EventSources...
00088       static double s_total_area;   // total area for flux generation (in square meters)
00089 };
00090 
00091 // inline function declarations:
00092 
00093 inline  double EventSource::solidAngle () const { return m_solid_angle; }
00094 inline  void EventSource::solidAngle ( double value ) { m_solid_angle = value; }
00095 
00096 inline const std::string& EventSource::name () const    {   return m_name;  }
00097 inline void EventSource::name (const std::string& value)    { m_name = value;   }
00098 
00099 inline double    EventSource::totalArea () { return s_total_area; }
00100 inline void    EventSource::totalArea (double value) { s_total_area = value; }
00101 
00102 inline unsigned EventSource::code () const { return m_code; }
00103 inline void EventSource::code ( unsigned c ) { m_code = c; }
00104 
00105 #endif

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