//------------------------------------------------------------------------ // // Description: // Class HepID : // This class allows ID numbers, ID strings or both to be used // to uniquely identify histograms. The actual use of this // class depends on the concrete package that implements HepTuple // // // Environment: // Software developed for the BaBar Detector at the SLAC B-Factory. // // Author List: // Scott Metzler Original author // Philippe Canal Add access to a manager dependent part // //------------------------------------------------------------------------ #ifndef HEPID_H #define HEPID_H #ifndef ZMENVIRONMENT_H #include "ZMutility/ZMenvironment.h" #endif #include class HepID { public: // constructors HepID(int theNumber); // constructor with number HepID(const std::string theString); // constructor with string HepID(int theNumber,const std::string theString); // constructor with both number and string // accessors inline bool isIDnumberSet() const { return _numSet; }; // number used in constructor inline bool isIDstringSet() const { return _stringSet; }; // string used in constructor inline int IDnumber() const { return _idNumber; }; // the id number std::string IDstring() const { return _idString; }; // the id string inline operator int() const { return _idNumber; }; inline operator std::string() const { return _idString; }; private: bool _numSet; bool _stringSet; int _idNumber; std::string _idString; }; #endif