Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

PisaServer.h

Go to the documentation of this file.
00001 #ifndef __PISASERVER_H__
00002 #define __PISASERVER_H__
00003 
00004 #include "TVirtualMCApplication.h"
00005 
00006 #include <vector>
00007 
00008 class PisaDevice;
00009 class TMCVerbose;
00010 class PHCompositeNode;
00011 
00017 class PisaServer : public TVirtualMCApplication
00018 {
00019  public:
00020 
00023   static PisaServer* instance();
00024 
00025   int verbosity() const;
00026   void verbosity(int level);
00027 
00031   void registerDevice(PisaDevice* device);
00032 
00035   bool hasSubsystem(const char* subsystemname) const;
00036 
00038   void Init(PHCompositeNode* topnode);
00039 
00041   void process_event(PHCompositeNode* topnode);
00042   
00044   void FinishRun();
00045 
00047   void ConstructGeometry();
00048 
00050   void InitGeometry();
00051 
00053   void GeneratePrimaries();
00054 
00056   void BeginEvent();
00057 
00059   void BeginPrimary();
00060 
00062   void PreTrack();
00063 
00065   void Stepping();
00066 
00068   void PostTrack();
00069 
00071   void FinishPrimary();
00072 
00074   void FinishEvent();
00075 
00077   void Field(const Double_t* x, Double_t* b) const;
00078 
00079  private:
00080 
00081   PisaServer();
00082   virtual ~PisaServer();
00083 
00084   void makeStack(PHCompositeNode* pisanode);
00085 
00086   void readPhnxPar(PHCompositeNode* pisanode);
00087 
00088  private:
00089 
00090   TMCVerbose* fVerbose;
00091   std::vector<PisaDevice*> fDevices;
00092   int fVerbosity;
00093   PHCompositeNode* fTopNode;
00094 
00095   ClassDef(PisaServer,1)
00096 };
00097 
00098 #endif