UniqueID.h

00001 #ifndef SCTDATA_UNIQUEID_H
00002 #define SCTDATA_UNIQUEID_H
00003 
00004 #include <string>
00005 
00006 using std::string;
00007 
00008 namespace Sct {
00009 
00016 class UniqueID {
00017 public:
00022     UniqueID(string uniqueID);
00023 
00028     UniqueID(unsigned int runNumber, unsigned int scanNumber, string module);
00029 
00034     Sct::UniqueID getUniqueID() const;
00035 
00040     operator string () const;
00041 
00046     string getModule() const;
00047 
00052     unsigned int getRunNumber() const;
00053 
00058     unsigned int getScanNumber() const;
00059 
00063     UniqueID& operator=(const UniqueID& other);
00067     bool operator==(const UniqueID& other) const;
00071     bool operator!= (const UniqueID& other) const;
00072 
00073 protected:
00074     UniqueID();
00075 private:
00076     // it is the responsibility of this class to make sure that all the 
00077     // private member data correspond to one-another, since there is redundant information here!
00078     unsigned int runNumber;
00079     unsigned int scanNumber;
00080     string nameAsString;
00081     string module;    
00082     friend class IOName;
00083 };
00084 }
00085 
00086 std::ostream& operator<<(std::ostream& os, const Sct::UniqueID& id);
00087 std::istream& operator>>(std::istream& is, Sct::UniqueID& id);
00088 
00089 #endif //SCTDATA_UNIQUEID_H

Generated on Mon Feb 6 14:01:37 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6