![]() |
![]() |
00001 #ifndef DataFormats_Provenance_FileID_h 00002 #define DataFormats_Provenance_FileID_h 00003 00004 /*---------------------------------------------------------------------- 00005 00006 Holds a unique file identifier in string form. 00007 00008 ----------------------------------------------------------------------*/ 00009 00010 #include <string> 00011 00012 namespace edm { 00013 00014 class FileID { 00015 public: 00016 FileID() : fid_() {} 00017 explicit FileID(std::string const& id) : fid_(id) {} 00018 bool isValid() const { return !fid().empty(); } 00019 std::string const& fid() const {return fid_;} 00020 private: 00021 std::string fid_; 00022 }; 00023 00024 inline 00025 bool operator==(FileID const& lh, FileID const& rh) {return lh.fid() == rh.fid();} 00026 00027 inline 00028 bool operator!=(FileID const& lh, FileID const& rh) {return !(lh == rh);} 00029 00030 std::ostream& 00031 operator<<(std::ostream& os, FileID const& id); 00032 } 00033 #endif 00034