Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 0007b1d4 authored by Jérémie Dudouet's avatar Jérémie Dudouet
Browse files

up check run

parent 7b577d55
......@@ -159,7 +159,7 @@ void FSMainWindow::LoadRightSide()
fStatusBar->Draw3DCorner(kFALSE);
fVFRight->AddFrame(fStatusBar, new TGLayoutHints(kLHintsBottom | kLHintsLeft | kLHintsExpandX, 0, 0, 2, 0));
// NewTab();
// NewTab();
}
void FSMainWindow::NewTab(TString name, Int_t npx, Int_t npy)
......@@ -552,19 +552,19 @@ void FSMainWindow::ReadHistograms()
TString Command = Form("ls -ltr %s | grep ^- | tail -1 | awk '{ print $(NF) }'",DataDir.Data());
Run = GetStdoutFromCommand(Command.Data());
Run.ReplaceAll(".lst","");
FileName = Form("%s/%s",getenv("FSRawDataDir"),Run.Data());
FileName = Form("%s/%s",getenv("FSRawDataDir"),Run.Data());
}
else {
bool ok = true;
Int_t Test=fLastRun.Atoi();
while(ok){
Test++;
FileName = Form("%s/%.06d",getenv("FSRawDataDir"),Test);
ok = gSystem->IsFileInIncludePath(FileName);
}
Test=Test-1;
Run=Form("%.06d",Test);
FileName = Form("%s/%s",getenv("FSRawDataDir"),Run.Data());
bool ok = true;
Int_t Test=fLastRun.Atoi();
while(ok){
Test++;
FileName = Form("%s/%.06d",getenv("FSRawDataDir"),Test);
ok = gSystem->IsFileInIncludePath(FileName);
}
Test=Test-1;
Run=Form("%.06d",Test);
FileName = Form("%s/%s",getenv("FSRawDataDir"),Run.Data());
}
ifstream file(FileName.Data());
......@@ -577,15 +577,15 @@ void FSMainWindow::ReadHistograms()
struct stat result;
if(stat(FileName.Data(), &result)==0) {
TString date = Form("%s",asctime(localtime(&result.st_mtime)));
date.ReplaceAll("\n","");
INFO_MESS<<"Run date: "<<date<<ENDL;
date.ReplaceAll("\n","");
INFO_MESS<<"Run date: "<<date<<ENDL;
fCurrentDate = date;
}
else {
WARN_MESS<<"Unable to get file time modification"<<ENDL;
fCurrentDate = "Undef";
SetWindowName(Form("FIPPSSpy v%s: Run %s - %s !! Disk not Available !!", FIPPSSpy_version,Run.Data(),fCurrentDate.Data()));
return;
SetWindowName(Form("FIPPSSpy v%s: Run %s - %s !! Disk not Available !!", FIPPSSpy_version,Run.Data(),fCurrentDate.Data()));
return;
}
map<Int_t, TH1I*>::iterator itr;
......@@ -596,76 +596,89 @@ void FSMainWindow::ReadHistograms()
TString Buffer;
string line;
getline(file,line);getline(file,line);getline(file,line);
Buffer=line;
Buffer.ReplaceAll("FIPPintern ","");
while(Buffer.EndsWith(" ")) Buffer.Remove(Buffer.Length()-1);
//fCurrentDate = Buffer;
TObjArray *arr;
while(file) {
getline(file,line);Buffer=line;
while(!Buffer.BeginsWith("SSS") && file) {getline(file,line);Buffer=line;}
if(!file) break;
getline(file,line);Buffer=line;
arr = Buffer.ReplaceAll("\t"," ").Tokenize(" ");
Int_t adc = ((TString)arr->First()->GetName()).Atoi()-1;
delete arr;
if(!fDetectors[adc]) continue;
getline(file,line);getline(file,line);Buffer=line;
arr = Buffer.Tokenize(" ");
Int_t NBins = ((TString)arr->First()->GetName()).Atoi();
Int_t Array[NBins+2];
Int_t Val;
delete arr;
Array[0] = 0;
Array[NBins+1]=0;
for(int i=0 ; i<NBins ; i++) {
file>>Val; Array[i+1] = Val;
}
Int_t id = fDetectors[adc]->GlobId;
Int_t type=CanvasTypes::kUndef;
Int_t DetNum=-1;
DetDef *det = fDetectors[adc];
if(det->IsFIPPS()) {
type = CanvasTypes::kFIPPS;
DetNum = det->Id;
}
else if(det->IsIFIN()) {
type = CanvasTypes::kIFIN;
DetNum = det->Id;
}
else if(det->IsTAG()) {
type = CanvasTypes::kTAG;
DetNum = det->Id;
}
else if(det->IsAC()) {
if(det->Type == 3) {
type = CanvasTypes::kIFIN_AC;
Int_t test=0;
Bool_t ok=false;
while(ok == false && test<10) {
if(!file) file.open(FileName.Data());
Int_t NHistRead = 0;
getline(file,line);getline(file,line);getline(file,line);
Buffer=line;
Buffer.ReplaceAll("FIPPintern ","");
while(Buffer.EndsWith(" ")) Buffer.Remove(Buffer.Length()-1);
while(file) {
getline(file,line);Buffer=line;
while(!Buffer.BeginsWith("SSS") && file) {getline(file,line);Buffer=line;}
if(!file) break;
getline(file,line);Buffer=line;
arr = Buffer.ReplaceAll("\t"," ").Tokenize(" ");
Int_t adc = ((TString)arr->First()->GetName()).Atoi()-1;
delete arr;
if(fDetectors.count(adc)==0) continue;
getline(file,line);getline(file,line);Buffer=line;
arr = Buffer.Tokenize(" ");
Int_t NBins = ((TString)arr->First()->GetName()).Atoi();
Int_t Array[NBins+2];
Int_t Val;
delete arr;
Array[0] = 0;
Array[NBins+1]=0;
for(int i=0 ; i<NBins ; i++) {
file>>Val; Array[i+1] = Val;
}
Int_t id = fDetectors[adc]->GlobId;
Int_t type=CanvasTypes::kUndef;
Int_t DetNum=-1;
DetDef *det = fDetectors[adc];
if(det->IsFIPPS()) {
type = CanvasTypes::kFIPPS;
DetNum = det->Id;
}
else if(det->Type == 5) {
type = CanvasTypes::kFIPPS_ACB;
DetNum = det->Id/3;
else if(det->IsIFIN()) {
type = CanvasTypes::kIFIN;
DetNum = det->Id;
}
else if(det->Type == 6) {
type = CanvasTypes::kFIPPS_ACF;
DetNum = det->Id/3;
else if(det->IsTAG()) {
type = CanvasTypes::kTAG;
DetNum = det->Id;
}
else if(det->Type == 7) {
type = CanvasTypes::kFIPPS_ACS;
DetNum = det->Id/3;
else if(det->IsAC()) {
if(det->Type == 3) {
type = CanvasTypes::kIFIN_AC;
DetNum = det->Id;
}
else if(det->Type == 5) {
type = CanvasTypes::kFIPPS_ACB;
DetNum = det->Id/3;
}
else if(det->Type == 6) {
type = CanvasTypes::kFIPPS_ACF;
DetNum = det->Id/3;
}
else if(det->Type == 7) {
type = CanvasTypes::kFIPPS_ACS;
DetNum = det->Id/3;
}
}
}
TString HistName = Form("Hist_%s_%d",fNames[type].Data(),DetNum);
if(!fListOfSpectra[id]) fListOfSpectra[id] = new TH1I(HistName,HistName,NBins,0,NBins);
TString HistName = Form("Hist_%s_%d",fNames[type].Data(),DetNum);
if(fListOfSpectra.count(id)==0) fListOfSpectra[id] = new TH1I(HistName,HistName,NBins,0,NBins);
memcpy(((TH1I*)fListOfSpectra[id])->fArray,Array,sizeof(Array));
fListOfSpectra[id]->SetEntries(fListOfSpectra[id]->Integral());
memcpy(((TH1I*)fListOfSpectra[id])->fArray,Array,sizeof(Array));
fListOfSpectra[id]->SetEntries(fListOfSpectra[id]->Integral());
NHistRead++;
}
if(NHistRead == fDetectors.size()) ok = true;
else {
test++;
WARN_MESS<<"Unable to read the full file, retry "<<test<<endl;
}
file.close();
}
file.close();
fLastRun = Run;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment