LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 vers) : FileFormatVersion{vers, {}} {}
12  FileFormatVersion(int 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:
std::ostream & operator<<(std::ostream &os, EDAnalyzer::Table< T > const &t)
Definition: EDAnalyzer.h:184
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
TFile ff[ntarg]
Definition: Style.C:26
HLT enums.
bool operator==(Provenance const &a, Provenance const &b)
Definition: Provenance.h:168
FileFormatVersion(int vers, std::string const &era)