|
BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
|
#include "TBranch.h"#include "TClass.h"#include "TClonesArray.h"#include "TFile.h"#include "TKey.h"#include "TTree.h"#include <iostream>Go to the source code of this file.
Functions | |
| int | dump_object (const char *filePath="/home/igor/DATA/bmn/26.02.0/dst/rc_noa_rlerr.run_Top_9555_ev0_p0.root", const char *objectName="DstRunHeader", Long64_t entry=0, const char *treeName="bmndata") |
| Print all data members of an object read from a .root file. | |
| int dump_object | ( | const char * | filePath = "/home/igor/DATA/bmn/26.02.0/dst/rc_noa_rlerr.run_Top_9555_ev0_p0.root", |
| const char * | objectName = "DstRunHeader", | ||
| Long64_t | entry = 0, | ||
| const char * | treeName = "bmndata" ) |
The name is looked up as a key of the file first - run-level objects such as DstRunHeader - and then as a top-level class branch of the tree, read at the given entry - per-event objects such as DstEventHeader. or StsHit. A TClonesArray is dumped element by element.
| filePath | .root file to read |
| objectName | key or top-level branch name |
| entry | tree entry to read the branch at, ignored for a key |
| treeName | tree holding the branches |
Definition at line 41 of file dump_object.C.
References TObjArray::At(), TClonesArray::Class(), TObject::Class(), TObject::ClassName(), TClass::Dump(), TClass::DynamicCast(), TDirectoryFile::Get(), TTree::GetBranch(), TClass::GetClass(), TBranch::GetClassName(), TObjArray::GetEntriesFast(), TBranch::GetEntry(), TDirectoryFile::GetKey(), TBranch::GetMother(), TNamed::GetName(), i, TClass::InheritsFrom(), TObject::IsA(), TObject::IsZombie(), and TBranch::SetAddress().