Skip to content

Commit c3e881e

Browse files
authored
Merge pull request #47913 from makortel/edmFileUtilMap
Add `--map` option to `edmFileUtil`
2 parents cd48fe0 + 8496229 commit c3e881e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

IOPool/Common/bin/EdmFileUtil.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ int main(int argc, char* argv[]) {
4040
"uuid,u", "Print uuid")("adler32,a", "Print adler32 checksum.")("allowRecovery",
4141
"Allow root to auto-recover corrupted files")(
4242
"JSON,j", "JSON output format. Any arguments listed below are ignored")("ls,l", "list file content")(
43-
"print,P", "Print all")("verbose,v", "Verbose printout")("printBranchDetails,b",
44-
"Call Print()sc for all branches")(
43+
"map,m", "Print TFile::Map(\"extended\"). The output can be HUGE.")("print,P", "Print all")(
44+
"verbose,v", "Verbose printout")("printBranchDetails,b", "Call Print()sc for all branches")(
4545
"tree,t", boost::program_options::value<std::string>(), "Select tree used with -P and -b options")(
4646
"events,e",
4747
"Print list of all Events, Runs, and LuminosityBlocks in the file sorted by run number, luminosity block number, "
@@ -106,6 +106,7 @@ int main(int argc, char* argv[]) {
106106
bool events = more && (vm.count("events") > 0 ? true : false);
107107
bool eventsInLumis = more && (vm.count("eventsInLumis") > 0 ? true : false);
108108
bool ls = more && (vm.count("ls") > 0 ? true : false);
109+
bool printMap = vm.count("map");
109110
bool tree = more && (vm.count("tree") > 0 ? true : false);
110111
bool print = more && (vm.count("print") > 0 ? true : false);
111112
bool printBranchDetails = more && (vm.count("printBranchDetails") > 0 ? true : false);
@@ -244,8 +245,12 @@ int main(int argc, char* argv[]) {
244245

245246
// Look at the collection contents
246247
if (ls) {
247-
if (tfile != nullptr)
248-
tfile->ls();
248+
tfile->ls();
249+
}
250+
251+
// Print Map()
252+
if (printMap) {
253+
tfile->Map("extended");
249254
}
250255

251256
// Print out each tree

0 commit comments

Comments
 (0)