LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
GeometryConfigurationInfo.cxx
Go to the documentation of this file.
1 
12 
13 // C/C++ standard library
14 #include <ostream>
15 
16 // -----------------------------------------------------------------------------
17 std::ostream& sumdata::operator<<(std::ostream& out, sumdata::GeometryConfigurationInfo const& info)
18 {
19 
20  if (!info.isDataValid()) return out << "Invalid geometry configuration information" << std::endl;
21 
22  out << "Geometry information version: " << info.dataVersion;
23 
25  out << "\nDetector name: '" << info.detectorName << "'";
26  } // version >= 1
27 
28  if (info.dataVersion >= sumdata::GeometryConfigurationInfo::DataVersion_t{2}) {
29  out << "\nFull configuration:"
30  << "\n"
31  << std::string(80, '-') << "\n"
32  << info.geometryServiceConfiguration << "\n"
33  << std::string(80, '-');
34  }
35 
36  if (info.dataVersion > sumdata::GeometryConfigurationInfo::DataVersion_t{2}) {
37  out << "\n[this version of code can't fully decode further information]";
38  }
39 
40  return out;
41 } // sumdata::operator<< (GeometryConfigurationInfo const&)
42 
43 // -----------------------------------------------------------------------------
DataVersion_t dataVersion
Version of the data in this object (0 is invalid version).
std::ostream & operator<<(std::ostream &, GeometryConfigurationInfo const &)
bool isDataValid() const noexcept
Protocol: whether the data content is valid.
Description of the current configuration of detector geometry.
unsigned int DataVersion_t
Type used for the version of data.
Description of the current configuration of detector geometry.