// Some of the original files this macro was developed with // plane004 000deg 2008_11_06 09_26_26.root // plane999 999deg 2008_10_26 20_28_06.root // plane999 999deg 2008_10_30 22_43_12.root // plane999 999deg 2008_11_06 08_01_58.root // plane999 999deg 2008_11_06 08_31_51.root // plane999 999deg 2008_11_06 08_51_09.root //---------------- // cathode_granite //---------------- void cathode_granite(void) { gROOT->Reset(); gStyle->SetPalette(1); gStyle->SetPadRightMargin(0.125); // Open ROOT file and get pointer to scan TTree TFile *fcath = new TFile("plane004 000deg 2008_11_06 09_26_26.root"); TTree *scan_cath = (TTree*)gROOT->FindObject("scan"); TFile *fgran = new TFile("plane999 999deg 2008_11_06 08_51_09.root"); TTree *scan_gran = (TTree*)gROOT->FindObject("scan"); // Create a canvas to draw in later TCanvas *c1 = new TCanvas("c1", "", 400, 400); c1->SetTickx(); c1->SetTicky(); // Draw both data sets scan_cath->SetMarkerColor(kRed); scan_gran->Draw("depth:y:x"); scan_cath->Draw("depth:y:x","", "same"); TView *view = c1->GetView(); double lat = view->GetLatitude(); double lon = view->GetLongitude(); double psi = view->GetPsi(); for(int i=0;i<100; i++){ lat += 0.5*sin(2.0*TMath::Pi()*(double)i/100.0); lon -= 360.0/100.0; //psi += 1.0; view->SetLatitude(lat); view->SetLongitude(lon); view->SetPsi(psi); c1->Update(); const char fname[256]; sprintf(fname,"cathode_granite_anim%03d.gif", i); c1->SaveAs(fname); } //c1->SaveAs("cathode_granite.gif"); }