Hi,
I have many histos to scale with the same factor. I’m thought I could scale them all with something like :
TIter next (gDirectory->GetListOfKeys());
TKey *key;
while((key=(TKey*)next())) if(strstr(key->GetClassName(),"TH1F"))((TH1F*)(gDirectory->Get(key->GetName())))->Scale(N);
or
TIter next (gDirectory->GetListOfKeys());
TKey *key;
while((key=(TKey*)next())) if(strstr(key->GetClassName(),"TH1F"))((TH1F*)(gDirectory->FindObjectAny(key->GetName())))->Scale(N);
but unfortunatly the scale seems to apply only on a temporarly histo (I guess) and not on the stored ones…
Is there any simpler way to do this or do I really have to write all my histos names in the program ?
Thanks.