diff --git a/macros/CCEScan/deplVphiN_normalized.C b/macros/CCEScan/deplVphiN_normalized.C index 453de89..542120a 100644 --- a/macros/CCEScan/deplVphiN_normalized.C +++ b/macros/CCEScan/deplVphiN_normalized.C @@ -85,6 +85,7 @@ TString lay("TTaU"); int set = 0; int val = 3; + bool notSave = false; for (int i=1; iDrawLatex(0.30,baseY,Form("Hamburg Model (#it{V}_{depl} = %3.0f V)",startV)); mg_frame->GetHistogram()->Draw("axissame"); Printf("=========================================\n"); + + // Directory and file name for output graph + TString dn_graph(Form("%s/data/ST/graphics/%s/%s", + diskVar, det.Data(), lay.Data(), sector)); + TString fn_graph(Form("%s/deplVphiN_normalized_v%s", + dn_graph.Data(), val)); + fn_graph += ".pdf"; + if (!notSave) { + // Save picture + gSystem->Exec(Form("mkdir -p %s", dn_graph.Data())); + gSystem->Exec(Form("rm %s &> /dev/null", fn_graph.Data())); + c_frame->SaveAs(fn_graph.Data()); + } + return EXIT_SUCCESS; }