void DumpColors() { std::string files[4] = {"my_output_4Cores_60kEvents.root", "my_output_4Cores_6kEvents.root", "my_output_AllCores_60kEvents.root", "my_output_AllCores_6kEvents.root" }; for (auto fn : files) { cout << "Processing ..." << fn << endl; TFile *f = TFile::Open(fn.c_str()); if (f) { TList *keys = f->GetListOfKeys(); TIter nxk(keys); TKey *k = 0; while ((k = (TKey *)nxk())) { TH1F *h = dynamic_cast(f->Get(k->GetName())); if (h) { cout << k->GetName() << ": fill color is: " << h->GetFillColor() << endl; } else { cout << k->GetName() << ": not a TH1F" << endl; } } delete f; } } }