1 char* getOutFileName(
const char* baseDir,
const char* jobName,
2 const char* type,
int icent = -1){
4 char* jobid=gSystem->Getenv(
"JOBID");
11 char* JobID=
new char[strlen(jobid)+1];
15 if(ptr=strstr(JobID,
"_")){
20 TString outArea(baseDir);
28 if (strstr(type,
"centralityDefs")) {
30 }
else if (strstr(type,
"EStruct")) {
37 TString createDir(
"mkdir -p ");
38 createDir+=outArea.Data();
39 system(createDir.Data());
41 char* exten[]={
".root",
".root",
".txt"};
44 const char* centTag=NULL;
49 centTag=TcentTag.Data();
52 TString outputFileFile(outArea.Data());
53 if(strstr(type,
"cuts")){
54 outputFileFile+=
"cutHists";
55 }
else if(strstr(type,
"data")){
56 outputFileFile+=
"dataHists";
57 }
else if(strstr(type,
"EStruct")){
58 outputFileFile+=
"EStructEvents";
59 }
else if(strstr(type,
"QA")){
61 }
else if(strstr(type,
"stats")){
62 outputFileFile+=
"stats";
64 }
else if(strstr(type,
"centralityDefs")){
65 outputFileFile+=
"centralityDefs";
67 outputFileFile+=
"data";
71 if(centTag)outputFileFile+=centTag;
73 if(ptr)outputFileFile+=ptr;
74 outputFileFile+=exten[iext];
77 char* retVal=
new char[strlen(outputFileFile.Data())+1];
78 strcpy(retVal,outputFileFile.Data());