#include <InfoDumperInputFile.h>
Definition at line 23 of file InfoDumperInputFile.h.
art::detail::InfoDumperInputFile::InfoDumperInputFile |
( |
std::string const & |
filename | ) |
|
Definition at line 61 of file InfoDumperInputFile.cc.
66 std::unique_ptr<TTree>
md{
79 pHistMap_ = detail::readMetadata<ProcessHistoryMap>(
md.get());
void readFileIndex(TFile *file, TTree *metaDataTree, FileIndex *&findexPtr)
std::string const & metaDataTreeName()
T readMetadata(TTree *md, bool const requireDict=true)
Definition at line 210 of file InfoDumperInputFile.cc.
213 auto aux = std::make_unique<RunAuxiliary>();
214 auto pAux = aux.get();
217 auxBranch->SetAddress(&pAux);
218 tree->LoadTree(entry);
219 auxBranch->GetEntry(entry);
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const bt)
Definition at line 224 of file InfoDumperInputFile.cc.
230 auto resolve_info = [db, &
filename](
auto const id,
bool const compact) {
235 auto rangeSetInfo = resolve_info(auxResult.rangeSetID(), compactRanges);
237 for (
auto i = entries.cbegin() + 1,
e = entries.cend();
i !=
e; ++
i) {
239 rangeSetInfo.update(resolve_info(tmpAux.rangeSetID(), compactRanges),
RangeSetInfo resolveRangeSetInfo(sqlite3 *, std::string const &filename, BranchType, unsigned RangeSetID, bool compact)
RangeSet resolveRangeSet(RangeSetInfo const &rs)
void art::detail::InfoDumperInputFile::print_branchIDLists |
( |
std::ostream & |
os | ) |
const |
Definition at line 130 of file InfoDumperInputFile.cc.
133 std::ostringstream oss;
134 oss <<
" BranchIDLists are not stored for art/ROOT files with a format\n" 137 "InfoDumperInputFile::print_branchIDLists:\n"}
145 assert(processNames.size() == 1ull);
147 os <<
"\n List of BranchIDs produced for this file. The BranchIDs are\n" 148 <<
" grouped according to the process in which they were produced. The\n" 149 <<
" processes are presented in chronological order; however within each " 151 <<
" the order of listed BranchIDs is not meaningful.\n";
153 for (
auto const& process : processNames.front()) {
154 os <<
"\n Process " <<
i + 1 <<
": " << process <<
'\n';
156 os <<
" " << bid <<
'\n';
std::vector< std::vector< std::string > > orderedProcessNamesCollection(ProcessHistoryMap const &pHistMap)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
void art::detail::InfoDumperInputFile::print_event_list |
( |
std::ostream & |
os | ) |
const |
void art::detail::InfoDumperInputFile::print_file_index |
( |
std::ostream & |
os | ) |
const |
void art::detail::InfoDumperInputFile::print_process_history |
( |
std::ostream & |
os | ) |
const |
Definition at line 95 of file InfoDumperInputFile.cc.
98 bool printHistoryLabel{
false};
99 if (processNamesCollection.empty()) {
100 os <<
"\n No process history was recorded for this file.\n";
102 }
else if (processNamesCollection.size() > 1ull) {
103 printHistoryLabel =
true;
104 os <<
"\n This file was produced with multiple processing histories.\n";
114 for (
auto const& processNames : processNamesCollection) {
116 if (printHistoryLabel) {
117 os <<
"\n Chronological list of process names for process history: " 120 os <<
"\n Chronological list of process names for processes that\n" 121 <<
" produced this file.\n\n";
123 for (
auto const& process : processNames) {
124 os <<
' ' << std::setw(4) <<
std::right <<
i++ <<
". " << process <<
'\n';
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
std::vector< std::vector< std::string > > orderedProcessNamesCollection(ProcessHistoryMap const &pHistMap)
void art::detail::InfoDumperInputFile::print_range_sets |
( |
std::ostream & |
os, |
|
|
bool |
compactRanges |
|
) |
| const |
Definition at line 163 of file InfoDumperInputFile.cc.
170 std::string const rep{compactRanges ?
"compact" :
"full (default)"};
175 <<
"\" and therefore\n" 176 <<
"*** does not contain range-set information. The printout below is\n" 177 <<
"*** the range set art would assign to this file.\n\n" 178 <<
"Representation: " << rep <<
'\n' 179 << rule(
'-') <<
'\n';
185 fileIndex_, element.eventID_.runID(), compactRanges);
193 SQLite3Wrapper db{
file_.get(),
"RootFileDB"};
195 os <<
"Representation: " << rep <<
'\n' << rule(
'-') <<
'\n';
202 auto const& entries = getEntryNumbers(it, cend);
std::string const & BranchTypeToProductTreeName(BranchType const bt)
RangeSet rangeSetFromFileIndex(FileIndex const &fileIndex, RunID runID, bool compactRanges)
const_iterator cbegin() const
const_iterator cend() const
TFile* art::detail::InfoDumperInputFile::tfile |
( |
| ) |
const |
|
inline |
BranchIDLists art::detail::InfoDumperInputFile::branchIDLists_ {} |
|
private |
std::unique_ptr<TFile> art::detail::InfoDumperInputFile::file_ |
|
private |
FileIndex art::detail::InfoDumperInputFile::fileIndex_ |
|
private |
The documentation for this class was generated from the following files: