LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
FileFormatVersion.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_FileFormatVersion_h
2 #define canvas_Persistency_Provenance_FileFormatVersion_h
3 
4 #include <iosfwd>
5 #include <string>
6 
7 namespace art {
8 
10  FileFormatVersion() = default;
11  explicit FileFormatVersion(int const vers) : FileFormatVersion{vers, {}} {}
12  FileFormatVersion(int const vers, std::string const& era)
13  : value_{vers}, era_{era}
14  {}
15  bool
16  isValid() const
17  {
18  return value_ >= 0;
19  }
20 
21  int value_{-1};
22  std::string era_{};
23  };
24 
25  // Note for backward compatibility and efficiency reasons, comparison
26  // operators do not take era into account. This must be checked explicitly.
27  inline bool
29  {
30  return a.value_ == b.value_;
31  }
32 
33  inline bool
35  {
36  return !(a == b);
37  }
38 
39  std::ostream& operator<<(std::ostream& os, FileFormatVersion const& ff);
40 }
41 
42 #endif /* canvas_Persistency_Provenance_FileFormatVersion_h */
43 
44 // Local Variables:
45 // mode: c++
46 // End:
bool operator==(Provenance const &a, Provenance const &b) noexcept
Definition: Provenance.cc:141
bool operator!=(ScheduleID const left, ScheduleID const right) noexcept
Definition: ScheduleID.cc:41
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
FileFormatVersion(int const vers, std::string const &era)
FileFormatVersion(int const vers)
Definition: MVAAlg.h:12
TFile ff[ntarg]
Definition: Style.C:26