TCutG* MGetCut(TString cutname) {
    TCutG *mycutg;
    mycutg = (TCutG*)gROOT->GetListOfSpecials()->FindObject("CUTG");
    mycutg->SetName(cutname);
    return mycutg;
}

TCutG* MGetCut() {
    TCutG *mycutg;
    mycutg = (TCutG*)gROOT->GetListOfSpecials()->FindObject("CUTG");
    mycutg->SetName("mycutg");
    return mycutg;
}

void MPrintCut(TCutG *mycutg) {

  //mycutg = (TCutG*)gROOT->GetListOfSpecials()->FindObject(cutname);
  TString cutname = mycutg->GetName();
  Double_t*fX = mycutg->GetX();
  Double_t*fY = mycutg->GetY();
  TString out = "";

  cout << "TCutG *" << cutname << " = new TCutG(\"" << cutname <<
            "\", " << mycutg->GetN() << ");" <<endl;
  cout << cutname << "->SetVarX(\"" << mycutg->GetVarX() << "\");" << endl;
  cout << cutname << "->SetVarY(\"" << mycutg->GetVarY() << "\");" << endl;
  cout << cutname << "->SetTitle(\"" << cutname << "\");" << endl;
  for (Int_t i=0;i<mycutg->GetN();i++) {
    cout << cutname << "->SetPoint(" << i << "," << fX[i] << "," << fY[i] << ");" << endl;
   }

}
gcuts.txt · Last modified: 2013/06/27 15:01 by mwoods
Recent changes RSS feed CC Attribution-Share Alike 3.0 Unported Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki |