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

DDSClientId.h

Go to the documentation of this file.
00001 #ifndef DDSCLIENTID_H
00002 #define DDSCLIENTID_H
00003 
00004 //                                                                          //
00005 // DDSClientID                                                              //
00006 //                                                                          //
00007 // Package: DDS (Data Dispatcher System).                                   //
00008 //                                                                          //
00009 // S. Kasahara 10/2006                                                      //
00010 //                                                                          //
00011 // Client identification information                                        //
00013 #ifndef __CINT__
00014 #include <sys/types.h> // defines pid_t type
00015 #endif
00016 #include <string> // data member
00017 using namespace std;
00018 
00019 #include <TObject.h>  // base class
00020 
00021 #include "Dispatcher/DDS.h" // data member
00022 #include "Validity/VldTimeStamp.h" // data member
00023 
00024 class DDSClientId;
00025 
00026 std::ostream& operator << (std::ostream& ms, const DDSClientId& cid);
00027 
00028 class DDSClientId : public TObject {
00029 
00030   friend class DDSParentServer; // parentserver has access to Connected method
00031   
00032  public:
00033 
00034   // Constructors and destructor.
00035   DDSClientId(DDS::EClientType type = DDS::kUnknownClientType,
00036               string clientname = "");   
00037   virtual ~DDSClientId(); // destructor       
00038 
00039   // State testing member functions.
00040   DDS::EClientType GetClientType() const { return fClientType; }
00041   string GetClientName() const { return fClientName; }
00042   string GetUserName() const { return fUserName; }
00043   string GetRealName() const { return fRealName; }
00044   string GetHostName() const { return fHostName; }
00045   const VldTimeStamp& GetStartTime() const { return fStartTime; }
00046   int GetChildPid() const { return fChildPid; }
00047        
00048   std::ostream& Print(std::ostream& ms) const;
00049   void Print(Option_t* option = "") const;
00050 
00051  protected:
00052 
00053   void Connected(int childpid); // invoked by parentserver when cs spawned  
00054 
00055  private:
00056 
00057   // Data members.
00058   DDS::EClientType fClientType;      // type (event display, om, dbu, etc.)
00059   string           fClientName;      // optional client name
00060   string           fUserName;        // username
00061   string           fRealName;        // full name of user
00062   string           fHostName;        // host name
00063   VldTimeStamp     fStartTime;       // start time of connection
00064   int              fChildPid;        // child pid
00065 
00066   ClassDef(DDSClientId,2)  // MINOS Data Dispatcher System Client Id
00067 };
00068 
00069 #endif  // DDSCLIENTID_H
00070 
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 

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