68 |
|
|
69 |
|
bool delete_any_cached_scans() { |
70 |
|
//This should only be called via CRAB |
71 |
+ |
cout << " Deleting all cached files." << endl; |
72 |
|
char hostname[1023]; |
73 |
|
gethostname(hostname,1023); |
74 |
|
if((Contains(hostname,"t3ui")||Contains(hostname,"t3wn"))) return false; |
81 |
|
for(int ifile=0;ifile<all_files.size();ifile++) |
82 |
|
{ |
83 |
|
if(Contains(all_files[ifile],"_clean_splitup_")) { |
84 |
< |
dout << "About to delete " << all_files[ifile] << endl; |
84 |
> |
dout << " About to delete " << all_files[ifile] << endl; |
85 |
|
gSystem->Exec(((string)"rm "+all_files[ifile]).c_str()); |
86 |
|
} |
87 |
|
} |
135 |
|
if(scantype==GMSB) newfilename << "GMSB_clean_splitup_" << any2string(a) << "_" << any2string(b) << ".root"; |
136 |
|
|
137 |
|
if(!Contains(((scansample.collection)[(scansample.collection).size()-1]).filename,"_"+any2string(a)+"_"+any2string(b))||(a==0&&b==0)&&!initialized_t2) { |
137 |
– |
initialized_t2=true; |
138 |
|
dout << "The last sample is NOT the same one as the current one, possibly popping off last one and downloading as well as adding the new one." << endl; |
139 |
|
if((scansample.collection).size()>1) { |
140 |
|
scansample.RemoveLastSample(); |
146 |
|
dout << "Going to download the scan file with the following copy command: " << copyfile.str() << endl; |
147 |
|
gSystem->Exec(copyfile.str().c_str()); |
148 |
|
if(doesROOTFileExist(newfilename.str())) { |
149 |
+ |
initialized_t2=true; |
150 |
|
scansample.AddSample(newfilename.str(),"scansample",1,1,false,true,scanfileindex,kRed); |
151 |
|
} else { |
152 |
|
srmcpretries++; |