ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
HDF5Utils
Root
H5Print.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
HDF5Utils/H5Print.h
"
6
#include <iomanip>
7
8
namespace
H5Utils
{
namespace
Print
{
9
std::ostream&
operator<<
(std::ostream& os,
const
H5::DataSet& ds)
10
{
11
os << os.fill() << ds.getObjName();
12
return
os;
13
}
14
15
std::ostream&
operator<<
(std::ostream& os,
const
H5::Group& group)
16
{
17
std::size_t indent = os.width();
18
os << os.fill() << group.getObjName() <<
" {"
<< std::endl;
19
for
(std::size_t ii = 0; ii < group.getNumObjs(); ++ii) {
20
H5G_obj_t childType = group.getObjTypeByIdx(ii);
21
std::string childName = group.getObjnameByIdx(ii);
22
switch
(childType) {
23
case
H5G_GROUP:
24
os << std::setw(indent+2) << group.openGroup(childName) << std::endl;
25
break
;
26
case
H5G_DATASET:
27
os << std::setw(indent+2) << group.openDataSet(childName) << std::endl;
28
break
;
29
default
:
30
// For now do nothing with other types - maybe in the future rethink
31
// this?
32
break
;
33
}
34
}
35
os << std::setw(indent) << os.fill() <<
"}"
;
36
return
os;
37
}
38
} }
//> end namespace H5Utils::Print
H5Print.h
H5Utils::Print
Definition
H5Print.h:21
H5Utils::Print::operator<<
std::ostream & operator<<(std::ostream &os, const H5::DataSet &ds)
Print information about a dataset.
Definition
H5Print.cxx:9
H5Utils
HDF5 Tuple Writer.
Definition
CompressedTypes.h:16
Generated on
for ATLAS Offline Software by
1.17.0