FairRoot/PandaRoot
anaGridDC02Data.C
Go to the documentation of this file.
1 int anaGridDC02Data(Int_t runNr, Int_t start = -1)
2 {
3  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
4  //gSystem->Load("libEve");
5  //gROOT->LoadMacro("DrawEveHisto.C");
6 
7 
8  PndMvdAnaRadDam radAna;
9 
10  Int_t startIndex, stopIndex;
11  if (start < 0){
12  startIndex = 1;
13  stopIndex = 501;
14  }
15  else {
16  startIndex = start * 100 + 1;
17  stopIndex = startIndex + 100;
18  }
19 
20  for (int i = startIndex; i < stopIndex; i++){
21  std::stringstream fileName;
22  fileName << "./radDamageData/run";
23  fileName << runNr;
24  fileName << "/Mvd_GridUrqmdAna_";
25  fileName << i;
26  fileName << ".root";
27  radAna.AddFile(fileName.str().c_str());
28  }
29 
30 
31  radAna.AnalyzeFiles();
32  std::stringstream outputName;
33  outputName << "./radDamageData/run" << runNr;
34  if (start < 0) outputName << "/Mvd_GridUrqmdAna_AnalyzedData.root";
35  else outputName << "/Mvd_GridUrqmdAna_AnalyzedData_" << startIndex << "-" << stopIndex-1 << ".root";
36  radAna.SaveHistos(outputName.str().c_str());
37  return 0;
38 }
Int_t i
Definition: run_full.C:25
void SaveHistos(TString fileName)
void AddFile(TString fileName)
int anaGridDC02Data(Int_t runNr, Int_t start=-1)