Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:12

0001 {
0002   // You should run "cmsRun testCaloGeometryTools.cfg" first
0003   TH2F* frame = new TH2F("h2","h2",100,-1.6,1.6,100,-3.2,3.2);
0004   frame->Draw();
0005   TFile * = new TFile("Grid.root");
0006   TIter nextkey( gDirectory->GetListOfKeys() );
0007   TKey *key, *oldkey=0;;
0008   unsigned cont=0;
0009   while ( (key = (TKey*)nextkey()))
0010     {      
0011       //keep only the highest cycle number for each key
0012       if (oldkey && !strcmp(oldkey->GetName(),key->GetName()) || !TString(key->GetName()).BeginsWith("iM")) continue;
0013       TObject *obj = key->ReadObj();
0014       if ( obj->IsA()==TMarker().Class()  ) 
0015     {
0016       //      cout << key->GetName() << endl;
0017       //      (TText*)obj->Print() ;
0018       TMarker * myMarker=(TMarker*)obj->Clone();
0019       myMarker->Draw();
0020       ++cont;
0021     }
0022       oldkey=key;
0023     }
0024 }