void test() { TFile *f = new TFile("hsimple.root","READ"); TH2 *h; h = (TH2*)f->Get("hpxpy"); TCanvas *c1 = new TCanvas("c1","c1",10,10,700,500); h ->Draw(); cout << "The first cut..." <WaitPrimitive("CUTG","CutG"); cut1->SetName("cut1"); cout << "The second cut..."<< endl;; cut2=(TCutG*)gPad->WaitPrimitive("CUTG","CutG"); cut2->SetName("cut2"); h->ProjectionX("a",-1,-1,"[cut1]"); h->ProjectionX("b",-1,-1,"[cut2]"); h->ProjectionX("c",-1,-1,"[cut1,cut2]"); c->Draw(); cout <<"d histogram have zero events :-(" <