Example of script to loop on all the objects of a ROOT file directory and print on Postscript all TH1 derived objects.
This script uses the file generated by tutorial hsimple.C
3V
void loopdir11() {
for(
auto k : *
f1->GetListOfKeys()) {
}
}
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseGeneralPurpose, Int_t netopt=0)
Create / open a file.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
T * ReadObject()
To read an object (non deriving from TObject) from the file.
virtual const char * GetClassName() const
- Author
- Rene Brun
Definition in file loopdir11.C.