File indexing completed on 2024-04-06 12:05:01
0001 #ifndef DataFormats_Provenance_FileID_h
0002 #define DataFormats_Provenance_FileID_h
0003
0004
0005
0006
0007
0008
0009
0010 #include <string>
0011
0012 namespace edm {
0013
0014 class FileID {
0015 public:
0016 FileID() : fid_() {}
0017 explicit FileID(std::string const& id) : fid_(id) {}
0018 bool isValid() const { return !fid().empty(); }
0019 std::string const& fid() const { return fid_; }
0020
0021 private:
0022 std::string fid_;
0023 };
0024
0025 inline bool operator==(FileID const& lh, FileID const& rh) { return lh.fid() == rh.fid(); }
0026
0027 inline bool operator!=(FileID const& lh, FileID const& rh) { return !(lh == rh); }
0028
0029 std::ostream& operator<<(std::ostream& os, FileID const& id);
0030 }
0031 #endif