Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DDSPSStatus.h

Go to the documentation of this file.
00001 #ifndef DDSPSSTATUS_H
00002 #define DDSPSSTATUS_H
00003 
00004 //                                                                          //
00005 // DDSPSStatus                                                              //
00006 //                                                                          //
00007 // Package: DDS (Data Dispatcher System).                                   //
00008 //                                                                          //
00009 // S. Kasahara 10/2006                                                      //
00010 //                                                                          //
00011 // Parent Server Status.  This class maintains a map of child process id's  //
00012 //                        and their associated DDSClientId's.               //
00013 //                        DDSParentServer has a DDSPSStatus data member.    //
00014 //                        One use is that a "ddscomm -r" request for DDS    //
00015 //                        parent server status report will have the parent  //
00016 //                        server ship its DDSPSStatus object to the ddscomm //
00017 //                        client.                                           //
00019 
00020 #include <iosfwd> // ostream forward decl.
00021 #ifndef __CINT__
00022 #include <sys/types.h> // defines pid_t type
00023 #endif
00024 #include <map> // data member
00025 using namespace std;
00026 
00027 #include <TObject.h> // base class
00028 
00029 class DDSClientId;
00030 class DDSPSStatus;
00031 
00032 std::ostream& operator << (std::ostream& ms, const DDSPSStatus& pss);
00033 
00034 class DDSPSStatus : public TObject {
00035 
00036  public:
00037 
00038   // Typedefs and enumerations
00039   typedef map<int, DDSClientId*>::iterator ClientMapItr;
00040   typedef map<int, DDSClientId*>::const_iterator ClientMapConstItr;
00041   
00042   // Constructors and destructor.
00043   DDSPSStatus();   
00044   virtual ~DDSPSStatus(); // destructor       
00045 
00046   // State testing member functions.
00047   const DDSClientId* GetClientId(int pid) const;
00048   std::ostream& Print(std::ostream& ms) const;
00049   void Print(Option_t* option = "") const;
00050 
00051   // State changing method
00052   void SetClientId(int pid, DDSClientId*);
00053   void RemoveClientId(int pid);
00054   
00055  private:
00056 
00057   // Data members.
00058   std::map<int, DDSClientId*> fClientMap; // active childpid/DDSClientId 
00059 
00060   ClassDef(DDSPSStatus,1)  // MINOS Parent Server Status
00061 };
00062 
00063 #endif  // DDSPSStatus_H
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 

Generated on Mon Feb 15 11:06:36 2010 for loon by  doxygen 1.3.9.1