diff --git a/AculData/AculCalibration.cpp b/AculData/AculCalibration.cpp index fcecfbd23b4c9ec8395f2f2e00e6195e0ecada7d..7f9215561fbf812a0e5b2d7027f36e94bb777f93 100755 --- a/AculData/AculCalibration.cpp +++ b/AculData/AculCalibration.cpp @@ -295,7 +295,7 @@ Bool_t AculCalibration::SetInputParameters(const char* inputparfile) Char_t identificator[100]; - ifstream fipr; + std::ifstream fipr; fipr.open(inputparfile); if (!fipr.is_open()) { Error("SetInputsParameters", "File with input parameters was not opened"); @@ -381,7 +381,7 @@ Bool_t AculCalibration::SetCalibrationParameters(const char* calparfile) char cA[40], cB[40], cC[40], cD[40]; //open file with calibration parameters - ifstream calFileR; + std::ifstream calFileR; calFileR.open(calparfile); @@ -694,7 +694,7 @@ Bool_t AculCalibration::CalculateCalibParameters(const char* inputfilename, cons // cout << "hovno1" << endl; // cout << outputfilename << endl; // fOutCalFile.open(outputfilename); - ofstream outcalfile; + std::ofstream outcalfile; outcalfile.open(outputfilename); // cout << "hovno2" << endl; // if (!fOutCalFile.is_open()) { @@ -893,7 +893,7 @@ Bool_t AculCalibration::CalculateCalibParameters(const char* inputfile, const ch if (lowersubaddress == uppersubaddress) { sprintf(outputfilename, "%s[%d].cal", block, lowersubaddress); } else { sprintf(outputfilename, "%s[%d-%d].cal", block, lowersubaddress, uppersubaddress); } }//if - ofstream outcalfile; + std::ofstream outcalfile; outcalfile.open(outputfilename); if (!outcalfile.is_open()) { Error("CalculateCalibParameters", "Output file %s was not opened", outputfilename); @@ -1318,8 +1318,8 @@ Bool_t AculCalibration::AddCalFileToList(const char* calfilelist) TString fl = calfilelist; fl.ToLower(); - ofstream fw; - fw.open(fl.Data(), ofstream::app); + std::ofstream fw; + fw.open(fl.Data(), std::ofstream::app); if (!fw.is_open()) { cout << "File " << fl.Data() << " was not opened" << endl; return kFALSE; @@ -1356,7 +1356,7 @@ void AculCalibration::MakeCalibrationFile(Char_t* calibrationfile, Char_t *calfi //calibrationfile: file with calibration parameters to be created //calfilelist: file containing list of existing text files with calibration parameters - ifstream calListR; + std::ifstream calListR; calListR.open(calfilelist); if( !calListR.is_open() ) { cout << "File with list of calibration files was not opened" << endl; @@ -1384,7 +1384,7 @@ void AculCalibration::MakeCalibrationFile(Char_t* calibrationfile, Char_t *calfi // cout << line << endl; sscanf(line, "%s", filename); cout << filename << endl; - ifstream calFileR; + std::ifstream calFileR; calFileR.open(filename); if (calFileR.is_open()) { cout << filename << " processing" << endl; @@ -1408,7 +1408,7 @@ void AculCalibration::MakeCalibrationFile(Char_t* calibrationfile, Char_t *calfi calListR.close(); - ofstream CalibFileW; + std::ofstream CalibFileW; CalibFileW.open(calibrationfile); if (!CalibFileW.is_open()) { cout << "Calibration file was not opened" << endl; diff --git a/AculData/AculCalibration.h b/AculData/AculCalibration.h index cd1024f087ee372ba697302c88f1d779503a7876..1f3c22b7b25c74f2a3255e8b59db4545ed93d166 100755 --- a/AculData/AculCalibration.h +++ b/AculData/AculCalibration.h @@ -21,6 +21,7 @@ #include #include +//#include #include #include @@ -34,6 +35,8 @@ using std::setw; using std::setprecision; using std::stringstream; using std::ostringstream; +//using std::ifstream; +//using std::ofstream; class AculCalibration : public TObject { diff --git a/AculData/AculConvert.cpp b/AculData/AculConvert.cpp index 289f3aae779eeb8c937fe3e772dbdbade21ba231..5658753758ac387412592efa48e87c29cc065b50 100644 --- a/AculData/AculConvert.cpp +++ b/AculData/AculConvert.cpp @@ -276,7 +276,7 @@ Int_t AculConvert::ReadFileProtocol(const char* protocolname) } //file protocol opening - ifstream protocolFile; + std::ifstream protocolFile; protocolFile.open(protocolname); if (!protocolFile.is_open()) { diff --git a/AculData/AculConvert.h b/AculData/AculConvert.h index 698642054275363c714ed05a191183577415209e..955f0f8b90e150756b5a1572d05bb78642649039 100644 --- a/AculData/AculConvert.h +++ b/AculData/AculConvert.h @@ -35,7 +35,7 @@ class /*DllExport*/ AculConvert private: AculRaw *fRawEvent; - ofstream fOutFaultFile; //file for error output + std::ofstream fOutFaultFile; //file for error output UInt_t fMaskC3[BLOCKSNUMBER]; //functions diff --git a/Be/BeAnalysis.cpp b/Be/BeAnalysis.cpp index 32897afea7059c1e34fd04f96cc1330a7db2af12..88d5baaf4a4271b43ba8c1bb8c3c40391415dcba 100644 --- a/Be/BeAnalysis.cpp +++ b/Be/BeAnalysis.cpp @@ -357,9 +357,9 @@ void BeAnalysis::SaveEpsilonYHist(Int_t interval, Int_t chain) { } -void BeAnalysis::SaveThetaAHist(Int_t interval, Int_t chain) { +void BeAnalysis::SaveThetaAHist(Int_t interval, Int_t chain, TString outfilename) { - TFile fw("figures/thetaA.root", "UPDATE"); + TFile fw(outfilename.Data(), "UPDATE"); TString hName; diff --git a/Be/BeAnalysis.h b/Be/BeAnalysis.h index 3445c1a963e068bb2d85368a34e0155f9a9b0f48..960e81a0a51542f510b55a032919077f5dc1a04a 100644 --- a/Be/BeAnalysis.h +++ b/Be/BeAnalysis.h @@ -88,7 +88,7 @@ public: void SaveEpsilonYHist(Int_t interval, Int_t chain); - void SaveThetaAHist(Int_t interval, Int_t chain); + void SaveThetaAHist(Int_t interval, Int_t chain, TString outfilename = "figures/thetaA.root"); // @@ -116,25 +116,25 @@ private: Int_t kMaxAngle; //histograms - TH1F *hsSpectra[6]; - TH1F *heSpectra[6]; - TH1F *hSdiff[6]; + TH1F *hsSpectra[6]; //! + TH1F *heSpectra[6]; //! + TH1F *hSdiff[6]; //! - TH1F *hseT[5][6]; - TH1F *heeT[5][6]; - TH1F *hieT[5][6]; + TH1F *hseT[5][6]; //! + TH1F *heeT[5][6]; //! + TH1F *hieT[5][6]; //! - TH1F *hscoskT[5][6]; - TH1F *hecoskT[5][6]; - TH1F *hicoskT[5][6]; + TH1F *hscoskT[5][6]; //! + TH1F *hecoskT[5][6]; //! + TH1F *hicoskT[5][6]; //! - TH1F *hseY[5][6]; - TH1F *heeY[5][6]; - TH1F *hieY[5][6]; + TH1F *hseY[5][6]; //! + TH1F *heeY[5][6]; //! + TH1F *hieY[5][6]; //! - TH1F *hsthetaAT[5][6]; - TH1F *hethetaAT[5][6]; - TH1F *hithetaAT[5][6]; + TH1F *hsthetaAT[5][6]; //! + TH1F *hethetaAT[5][6]; //! + TH1F *hithetaAT[5][6]; //! //cuts TCut cAngles; diff --git a/Be/BeEvent.cpp b/Be/BeEvent.cpp index 54aacf58e2d81379518643c9f8777021b67c2511..c737df702a663faa02e6fbe330e73d764e1c57d6 100644 --- a/Be/BeEvent.cpp +++ b/Be/BeEvent.cpp @@ -126,7 +126,7 @@ BeEvent::~BeEvent() { void BeEvent::ReadConfigFile() { // TString g(generator); - ifstream cfile; + std::ifstream cfile; //generator file opening if (!fConfigFile.IsNull()) { cfile.open(fConfigFile.Data()); diff --git a/Be/BeReaction.cpp b/Be/BeReaction.cpp index 8fcd80fa4159944fbbcfe2161c4613593f27e211..01f578caddfd35e74f23c8ce76fcfd4f29895327 100644 --- a/Be/BeReaction.cpp +++ b/Be/BeReaction.cpp @@ -36,7 +36,7 @@ BeReaction::~BeReaction() { void BeReaction::ReadParameters(const char *parameterfile) { - ifstream parfile; + std::ifstream parfile; parfile.open(parameterfile); //parameter file opening if (!parfile.is_open()) { diff --git a/Be/BeWork.cpp b/Be/BeWork.cpp index 78e75dc8bb3a7ebc29f1e7b5c0144562cffa6f38..38b5ca3887132f2ffd28931211d4fe85b9294ffe 100644 --- a/Be/BeWork.cpp +++ b/Be/BeWork.cpp @@ -122,7 +122,7 @@ BeWork::~BeWork() void BeWork::ReadConfigFile() { - ifstream cfile; + std::ifstream cfile; //generator file opening if (!fConfigFile.IsNull()) { cfile.open(fConfigFile.Data()); @@ -1076,7 +1076,7 @@ void BeWork::MonteCarloState(const Int_t noevents, const char* generator, TTree Info("BeWork::MonteCarloState", "Function was called"); TString g(generator); - ifstream gen; + std::ifstream gen; //generator file opening if (!g.IsNull()) { gen.open(g.Data()); @@ -1590,7 +1590,7 @@ void BeWork::FillSimKinFile(const char* generator, Int_t INPUTS, // cout << beamenergy << endl; // cout << beamtheta << endl; // cout << beamphi << endl; - ifstream gen; + std::ifstream gen; gen.open(generator); if (!gen.is_open()) { @@ -1713,7 +1713,7 @@ Int_t BeWork::CountLines(const char* file, Int_t maxlinelength) { char countline[maxlinelength]; TString fname(file); - ifstream rfile; + std::ifstream rfile; //generator file opening if (!fname.IsNull()) { rfile.open(fname.Data()); diff --git a/makefile b/makefile index 339293fb7825a14ce50184d818bbf1d86e975093..2defa3eef74652a372a770f71c70eb0d36aba952 100755 --- a/makefile +++ b/makefile @@ -20,6 +20,7 @@ F90 := gfortran ROOTLIBS = $(shell root-config --libdir) ROOTINCS = $(shell root-config --incdir) +ROOTCFLAGS = $(shell root-config --cflags) PWD = $(shell pwd) INSTALLFOLDER = $(HOME)/AculLib @@ -148,7 +149,9 @@ fillExpFile: $(APPSOBJS) @echo 'Invoking: GCC C++ Compiler' # $(CC) -I$(ROOTINCS) -O0 -g3 -Wall -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" # $(CC) -I$(ROOTINCS) -DTHREADING -I$(BOOSTINCS) -O2 -Wall -mmmx -msse -msse2 -msse3 -mfpmath=sse,387 -march=nocona -mtune=nocona -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" - $(CC) -I$(ROOTINCS) -O2 -Wall -mmmx -msse -msse2 -msse3 -mfpmath=sse,387 -march=nocona -mtune=nocona -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" + $(CC) -I$(ROOTINCS) -O2 -std=c++11 -Wall -mmmx -msse -msse2 -msse3 -mfpmath=sse,387 -march=nocona -mtune=nocona -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" +# $(CC) -I$(ROOTINCS) -O2 $(ROOTCFLAGS) -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" +# $(CC) -I$(ROOTINCS) -O2 $(ROOTCFLAGS) -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<" @echo 'Finished building: $@' @echo ' '