Commit 1200391c authored by Qiunan Zhang's avatar Qiunan Zhang
Browse files

Merge branch 'master' of https://git.cbm.gsi.de/computing/cbmroot

parents 58a497d1 3d20c3d5
......@@ -1367,10 +1367,11 @@ void CbmCheckDataFormatGdpb2018::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmCheckDataFormatGdpb2018::ResetAllHistos() {
......
......@@ -646,10 +646,11 @@ void CbmMcbm2018MonitorDataRates::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorDataRates::ResetAllHistos() {
......
......@@ -1442,10 +1442,11 @@ void CbmMcbm2018MonitorMcbmPulser::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorMcbmPulser::ResetAllHistos() {
/****************** STS Sync ******************************************/
......
......@@ -1332,10 +1332,11 @@ void CbmMcbm2018MonitorMcbmRate::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorMcbmRate::ResetAllHistos() {
/****************** STS Sync ******************************************/
......
......@@ -1592,10 +1592,11 @@ void CbmMcbm2018MonitorMcbmSync::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorMcbmSync::ResetAllHistos() {
/****************** STS Sync ******************************************/
......
......@@ -2060,10 +2060,11 @@ void CbmMcbm2018MonitorMuch::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorMuch::ResetAllHistos() {
LOG(info) << "Reseting all STS histograms.";
......
......@@ -1653,10 +1653,11 @@ void CbmMcbm2018MonitorMuchLite::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorMuchLite::ResetAllHistos() {
......
......@@ -2703,10 +2703,11 @@ void CbmMcbm2018MonitorSts::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorSts::ResetAllHistos() {
LOG(info) << "Reseting all STS histograms.";
......
......@@ -1403,10 +1403,11 @@ void CbmCosy2018MonitorPulser::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmCosy2018MonitorPulser::ResetAllHistos() {
LOG(info) << "Reseting all STS histograms.";
......
......@@ -1897,10 +1897,11 @@ void CbmMcbm2018MonitorStsSync::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorStsSync::SavePulserHistos(TString sFileName) {
/// Save old global file and folder pointer to avoid messing with FairRoot
......@@ -1931,10 +1932,11 @@ void CbmMcbm2018MonitorStsSync::SavePulserHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorStsSync::ResetAllHistos() {
LOG(info) << "Reseting all STS histograms.";
......
......@@ -3563,10 +3563,11 @@ void CbmMcbm2018MonitorTof::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorTof::ResetAllHistos() {
......
......@@ -1666,10 +1666,11 @@ void CbmMcbm2018MonitorTofPulser::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018MonitorTofPulser::ResetAllHistos() {
......
......@@ -528,10 +528,11 @@ void CbmMcbm2018TofFeeThr::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018TofFeeThr::ResetAllHistos() {
......
......@@ -1914,10 +1914,11 @@ void CbmMcbm2018TofTestFee::SaveAllHistos(TString sFileName) {
if ("" != sFileName) {
// Restore original directory position
histoFile->Close();
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
} // if( "" != sFileName )
/// Restore old global file and folder pointer to avoid messing with FairRoot
gFile = oldFile;
gDirectory = oldDir;
}
void CbmMcbm2018TofTestFee::ResetAllHistos() {
......
......@@ -20,6 +20,7 @@
#include "TH2.h"
#include "THttpServer.h"
#include "TProfile.h"
#include <TDirectory.h>
#include <TFile.h>
#include "CbmMuchDigi.h"
......@@ -698,7 +699,9 @@ void CbmCheckDigisNbCorr::Exec(Option_t* /*option*/) {
void CbmCheckDigisNbCorr::Finish() { WriteHistos(); }
void CbmCheckDigisNbCorr::WriteHistos() {
TFile* old = gFile;
TFile* oldFile = gFile;
TDirectory* oldDir = gDirectory;
TFile* outfile = TFile::Open(fOutFileName, "RECREATE");
......@@ -741,7 +744,8 @@ void CbmCheckDigisNbCorr::WriteHistos() {
outfile->Close();
delete outfile;
gFile = old;
gFile = oldFile;
gDirectory = oldDir;
}
ClassImp(CbmCheckDigisNbCorr)
......@@ -24,6 +24,7 @@
#include "TH2.h"
#include "THttpServer.h"
#include "TProfile.h"
#include <TDirectory.h>
#include <TFile.h>
#include <iomanip>
......@@ -264,7 +265,9 @@ void CbmCheckEvents::GetTimeDiffT0(CbmEvent* event, TH1* deltaT, TH1* size) {
// ---- Finish --------------------------------------------------------
void CbmCheckEvents::Finish() {
TFile* old = gFile;
TFile* oldFile = gFile;
TDirectory* oldDir = gDirectory;
TFile* outfile = TFile::Open("test2.root", "RECREATE");
fEventSize->Write();
......@@ -287,7 +290,8 @@ void CbmCheckEvents::Finish() {
outfile->Close();
delete outfile;
gFile = old;
gFile = oldFile;
gDirectory = oldDir;
}
ClassImp(CbmCheckEvents)
......@@ -15,6 +15,7 @@
#include "TH1.h"
#include "TH2.h"
#include "THttpServer.h"
#include <TDirectory.h>
#include <TFile.h>
#include "CbmMuchBeamTimeDigi.h"
......@@ -649,7 +650,9 @@ void CbmMcbm2018EventBuilder::AddDigiToSorter(ECbmModuleId _system,
// ---- Finish --------------------------------------------------------
void CbmMcbm2018EventBuilder::Finish() {
if (fFillHistos) {
TFile* old = gFile;
TFile* oldFile = gFile;
TDirectory* oldDir = gDirectory;
TFile* outfile = TFile::Open(fOutFileName, "RECREATE");
fDiffTime->Write();
......@@ -670,7 +673,8 @@ void CbmMcbm2018EventBuilder::Finish() {
outfile->Close();
delete outfile;
gFile = old;
gFile = oldFile;
gDirectory = oldDir;
}
LOG(info) << "Total errors: " << fErrors;
}
......
......@@ -18,6 +18,7 @@
#include "TH1.h"
#include "TH2.h"
#include "THttpServer.h"
#include <TDirectory.h>
#include <TFile.h>
#include <iomanip>
......@@ -199,7 +200,9 @@ void CbmMcbm2019CheckDigisMuch::Exec(Option_t* /*option*/) {
void CbmMcbm2019CheckDigisMuch::Finish() { WriteHistos(); }
void CbmMcbm2019CheckDigisMuch::WriteHistos() {
TFile* old = gFile;
TFile* oldFile = gFile;
TDirectory* oldDir = gDirectory;
TFile* outfile = TFile::Open(fOutFileName, "RECREATE");
fDigisPerAsicEvo->Write();
......@@ -209,7 +212,8 @@ void CbmMcbm2019CheckDigisMuch::WriteHistos() {
outfile->Close();
delete outfile;
gFile = old;
gFile = oldFile;
gDirectory = oldDir;
}
ClassImp(CbmMcbm2019CheckDigisMuch)
......@@ -18,6 +18,7 @@
#include "TH1.h"
#include "TH2.h"
#include "THttpServer.h"
#include <TDirectory.h>
#include <TFile.h>
#include <iomanip>
......@@ -186,7 +187,9 @@ void CbmMcbm2019CheckDigisSts::Exec(Option_t* /*option*/) {
void CbmMcbm2019CheckDigisSts::Finish() { WriteHistos(); }
void CbmMcbm2019CheckDigisSts::WriteHistos() {
TFile* old = gFile;
TFile* oldFile = gFile;
TDirectory* oldDir = gDirectory;
TFile* outfile = TFile::Open(fOutFileName, "RECREATE");
fDigisPerAsicEvo->Write();
......@@ -195,7 +198,8 @@ void CbmMcbm2019CheckDigisSts::WriteHistos() {
outfile->Close();
delete outfile;
gFile = old;
gFile = oldFile;
gDirectory = oldDir;
}
ClassImp(CbmMcbm2019CheckDigisSts)
......@@ -25,9 +25,9 @@
#include "TH2.h"
#include "THttpServer.h"
#include "TProfile.h"
#include <TDirectory.h>
#include <TFile.h>
#include <iomanip>
#include <iostream>
#include <type_traits>
......@@ -510,7 +510,10 @@ void CbmMcbm2019CheckDtInDet::FillHistosPerDet(TH1* histoSameTime,
void CbmMcbm2019CheckDtInDet::Finish() { WriteHistos(); }
void CbmMcbm2019CheckDtInDet::WriteHistos() {
TFile* old = gFile;
TFile* oldFile = gFile;
TDirectory* oldDir = gDirectory;
TFile* outfile = TFile::Open(fOutFileName, "RECREATE");
fT0T0SameTime->Write();
......@@ -548,7 +551,8 @@ void CbmMcbm2019CheckDtInDet::WriteHistos() {
outfile->Close();
delete outfile;
gFile = old;
gFile = oldFile;
gDirectory = oldDir;
}
ClassImp(CbmMcbm2019CheckDtInDet)
Supports Markdown
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