Commit 8a173e47 authored by Vratislav Chudoba's avatar Vratislav Chudoba

Possible to compile with ROOT6

parent 6e43819f
...@@ -295,7 +295,7 @@ Bool_t AculCalibration::SetInputParameters(const char* inputparfile) ...@@ -295,7 +295,7 @@ Bool_t AculCalibration::SetInputParameters(const char* inputparfile)
Char_t identificator[100]; Char_t identificator[100];
ifstream fipr; std::ifstream fipr;
fipr.open(inputparfile); fipr.open(inputparfile);
if (!fipr.is_open()) { if (!fipr.is_open()) {
Error("SetInputsParameters", "File with input parameters was not opened"); Error("SetInputsParameters", "File with input parameters was not opened");
...@@ -381,7 +381,7 @@ Bool_t AculCalibration::SetCalibrationParameters(const char* calparfile) ...@@ -381,7 +381,7 @@ Bool_t AculCalibration::SetCalibrationParameters(const char* calparfile)
char cA[40], cB[40], cC[40], cD[40]; char cA[40], cB[40], cC[40], cD[40];
//open file with calibration parameters //open file with calibration parameters
ifstream calFileR; std::ifstream calFileR;
calFileR.open(calparfile); calFileR.open(calparfile);
...@@ -694,7 +694,7 @@ Bool_t AculCalibration::CalculateCalibParameters(const char* inputfilename, cons ...@@ -694,7 +694,7 @@ Bool_t AculCalibration::CalculateCalibParameters(const char* inputfilename, cons
// cout << "hovno1" << endl; // cout << "hovno1" << endl;
// cout << outputfilename << endl; // cout << outputfilename << endl;
// fOutCalFile.open(outputfilename); // fOutCalFile.open(outputfilename);
ofstream outcalfile; std::ofstream outcalfile;
outcalfile.open(outputfilename); outcalfile.open(outputfilename);
// cout << "hovno2" << endl; // cout << "hovno2" << endl;
// if (!fOutCalFile.is_open()) { // if (!fOutCalFile.is_open()) {
...@@ -893,7 +893,7 @@ Bool_t AculCalibration::CalculateCalibParameters(const char* inputfile, const ch ...@@ -893,7 +893,7 @@ Bool_t AculCalibration::CalculateCalibParameters(const char* inputfile, const ch
if (lowersubaddress == uppersubaddress) { sprintf(outputfilename, "%s[%d].cal", block, lowersubaddress); } if (lowersubaddress == uppersubaddress) { sprintf(outputfilename, "%s[%d].cal", block, lowersubaddress); }
else { sprintf(outputfilename, "%s[%d-%d].cal", block, lowersubaddress, uppersubaddress); } else { sprintf(outputfilename, "%s[%d-%d].cal", block, lowersubaddress, uppersubaddress); }
}//if }//if
ofstream outcalfile; std::ofstream outcalfile;
outcalfile.open(outputfilename); outcalfile.open(outputfilename);
if (!outcalfile.is_open()) { if (!outcalfile.is_open()) {
Error("CalculateCalibParameters", "Output file %s was not opened", outputfilename); Error("CalculateCalibParameters", "Output file %s was not opened", outputfilename);
...@@ -1318,8 +1318,8 @@ Bool_t AculCalibration::AddCalFileToList(const char* calfilelist) ...@@ -1318,8 +1318,8 @@ Bool_t AculCalibration::AddCalFileToList(const char* calfilelist)
TString fl = calfilelist; TString fl = calfilelist;
fl.ToLower(); fl.ToLower();
ofstream fw; std::ofstream fw;
fw.open(fl.Data(), ofstream::app); fw.open(fl.Data(), std::ofstream::app);
if (!fw.is_open()) { if (!fw.is_open()) {
cout << "File " << fl.Data() << " was not opened" << endl; cout << "File " << fl.Data() << " was not opened" << endl;
return kFALSE; return kFALSE;
...@@ -1356,7 +1356,7 @@ void AculCalibration::MakeCalibrationFile(Char_t* calibrationfile, Char_t *calfi ...@@ -1356,7 +1356,7 @@ void AculCalibration::MakeCalibrationFile(Char_t* calibrationfile, Char_t *calfi
//calibrationfile: file with calibration parameters to be created //calibrationfile: file with calibration parameters to be created
//calfilelist: file containing list of existing text files with calibration parameters //calfilelist: file containing list of existing text files with calibration parameters
ifstream calListR; std::ifstream calListR;
calListR.open(calfilelist); calListR.open(calfilelist);
if( !calListR.is_open() ) { if( !calListR.is_open() ) {
cout << "File with list of calibration files was not opened" << endl; cout << "File with list of calibration files was not opened" << endl;
...@@ -1384,7 +1384,7 @@ void AculCalibration::MakeCalibrationFile(Char_t* calibrationfile, Char_t *calfi ...@@ -1384,7 +1384,7 @@ void AculCalibration::MakeCalibrationFile(Char_t* calibrationfile, Char_t *calfi
// cout << line << endl; // cout << line << endl;
sscanf(line, "%s", filename); sscanf(line, "%s", filename);
cout << filename << endl; cout << filename << endl;
ifstream calFileR; std::ifstream calFileR;
calFileR.open(filename); calFileR.open(filename);
if (calFileR.is_open()) { if (calFileR.is_open()) {
cout << filename << " processing" << endl; cout << filename << " processing" << endl;
...@@ -1408,7 +1408,7 @@ void AculCalibration::MakeCalibrationFile(Char_t* calibrationfile, Char_t *calfi ...@@ -1408,7 +1408,7 @@ void AculCalibration::MakeCalibrationFile(Char_t* calibrationfile, Char_t *calfi
calListR.close(); calListR.close();
ofstream CalibFileW; std::ofstream CalibFileW;
CalibFileW.open(calibrationfile); CalibFileW.open(calibrationfile);
if (!CalibFileW.is_open()) { if (!CalibFileW.is_open()) {
cout << "Calibration file was not opened" << endl; cout << "Calibration file was not opened" << endl;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
//#include <ifstream>
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
...@@ -34,6 +35,8 @@ using std::setw; ...@@ -34,6 +35,8 @@ using std::setw;
using std::setprecision; using std::setprecision;
using std::stringstream; using std::stringstream;
using std::ostringstream; using std::ostringstream;
//using std::ifstream;
//using std::ofstream;
class AculCalibration : public TObject class AculCalibration : public TObject
{ {
......
...@@ -276,7 +276,7 @@ Int_t AculConvert::ReadFileProtocol(const char* protocolname) ...@@ -276,7 +276,7 @@ Int_t AculConvert::ReadFileProtocol(const char* protocolname)
} }
//file protocol opening //file protocol opening
ifstream protocolFile; std::ifstream protocolFile;
protocolFile.open(protocolname); protocolFile.open(protocolname);
if (!protocolFile.is_open()) { if (!protocolFile.is_open()) {
......
...@@ -35,7 +35,7 @@ class /*DllExport*/ AculConvert ...@@ -35,7 +35,7 @@ class /*DllExport*/ AculConvert
private: private:
AculRaw *fRawEvent; AculRaw *fRawEvent;
ofstream fOutFaultFile; //file for error output std::ofstream fOutFaultFile; //file for error output
UInt_t fMaskC3[BLOCKSNUMBER]; UInt_t fMaskC3[BLOCKSNUMBER];
//functions //functions
......
...@@ -357,9 +357,9 @@ void BeAnalysis::SaveEpsilonYHist(Int_t interval, Int_t chain) { ...@@ -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; TString hName;
......
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
void SaveEpsilonYHist(Int_t interval, Int_t chain); 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: ...@@ -116,25 +116,25 @@ private:
Int_t kMaxAngle; Int_t kMaxAngle;
//histograms //histograms
TH1F *hsSpectra[6]; TH1F *hsSpectra[6]; //!
TH1F *heSpectra[6]; TH1F *heSpectra[6]; //!
TH1F *hSdiff[6]; TH1F *hSdiff[6]; //!
TH1F *hseT[5][6]; TH1F *hseT[5][6]; //!
TH1F *heeT[5][6]; TH1F *heeT[5][6]; //!
TH1F *hieT[5][6]; TH1F *hieT[5][6]; //!
TH1F *hscoskT[5][6]; TH1F *hscoskT[5][6]; //!
TH1F *hecoskT[5][6]; TH1F *hecoskT[5][6]; //!
TH1F *hicoskT[5][6]; TH1F *hicoskT[5][6]; //!
TH1F *hseY[5][6]; TH1F *hseY[5][6]; //!
TH1F *heeY[5][6]; TH1F *heeY[5][6]; //!
TH1F *hieY[5][6]; TH1F *hieY[5][6]; //!
TH1F *hsthetaAT[5][6]; TH1F *hsthetaAT[5][6]; //!
TH1F *hethetaAT[5][6]; TH1F *hethetaAT[5][6]; //!
TH1F *hithetaAT[5][6]; TH1F *hithetaAT[5][6]; //!
//cuts //cuts
TCut cAngles; TCut cAngles;
......
...@@ -126,7 +126,7 @@ BeEvent::~BeEvent() { ...@@ -126,7 +126,7 @@ BeEvent::~BeEvent() {
void BeEvent::ReadConfigFile() { void BeEvent::ReadConfigFile() {
// TString g(generator); // TString g(generator);
ifstream cfile; std::ifstream cfile;
//generator file opening //generator file opening
if (!fConfigFile.IsNull()) { if (!fConfigFile.IsNull()) {
cfile.open(fConfigFile.Data()); cfile.open(fConfigFile.Data());
......
...@@ -36,7 +36,7 @@ BeReaction::~BeReaction() { ...@@ -36,7 +36,7 @@ BeReaction::~BeReaction() {
void BeReaction::ReadParameters(const char *parameterfile) void BeReaction::ReadParameters(const char *parameterfile)
{ {
ifstream parfile; std::ifstream parfile;
parfile.open(parameterfile); //parameter file opening parfile.open(parameterfile); //parameter file opening
if (!parfile.is_open()) { if (!parfile.is_open()) {
......
...@@ -122,7 +122,7 @@ BeWork::~BeWork() ...@@ -122,7 +122,7 @@ BeWork::~BeWork()
void BeWork::ReadConfigFile() { void BeWork::ReadConfigFile() {
ifstream cfile; std::ifstream cfile;
//generator file opening //generator file opening
if (!fConfigFile.IsNull()) { if (!fConfigFile.IsNull()) {
cfile.open(fConfigFile.Data()); cfile.open(fConfigFile.Data());
...@@ -1076,7 +1076,7 @@ void BeWork::MonteCarloState(const Int_t noevents, const char* generator, TTree ...@@ -1076,7 +1076,7 @@ void BeWork::MonteCarloState(const Int_t noevents, const char* generator, TTree
Info("BeWork::MonteCarloState", "Function was called"); Info("BeWork::MonteCarloState", "Function was called");
TString g(generator); TString g(generator);
ifstream gen; std::ifstream gen;
//generator file opening //generator file opening
if (!g.IsNull()) { if (!g.IsNull()) {
gen.open(g.Data()); gen.open(g.Data());
...@@ -1590,7 +1590,7 @@ void BeWork::FillSimKinFile(const char* generator, Int_t INPUTS, ...@@ -1590,7 +1590,7 @@ void BeWork::FillSimKinFile(const char* generator, Int_t INPUTS,
// cout << beamenergy << endl; // cout << beamenergy << endl;
// cout << beamtheta << endl; // cout << beamtheta << endl;
// cout << beamphi << endl; // cout << beamphi << endl;
ifstream gen; std::ifstream gen;
gen.open(generator); gen.open(generator);
if (!gen.is_open()) { if (!gen.is_open()) {
...@@ -1713,7 +1713,7 @@ Int_t BeWork::CountLines(const char* file, Int_t maxlinelength) { ...@@ -1713,7 +1713,7 @@ Int_t BeWork::CountLines(const char* file, Int_t maxlinelength) {
char countline[maxlinelength]; char countline[maxlinelength];
TString fname(file); TString fname(file);
ifstream rfile; std::ifstream rfile;
//generator file opening //generator file opening
if (!fname.IsNull()) { if (!fname.IsNull()) {
rfile.open(fname.Data()); rfile.open(fname.Data());
......
...@@ -20,6 +20,7 @@ F90 := gfortran ...@@ -20,6 +20,7 @@ F90 := gfortran
ROOTLIBS = $(shell root-config --libdir) ROOTLIBS = $(shell root-config --libdir)
ROOTINCS = $(shell root-config --incdir) ROOTINCS = $(shell root-config --incdir)
ROOTCFLAGS = $(shell root-config --cflags)
PWD = $(shell pwd) PWD = $(shell pwd)
INSTALLFOLDER = $(HOME)/AculLib INSTALLFOLDER = $(HOME)/AculLib
...@@ -148,7 +149,9 @@ fillExpFile: $(APPSOBJS) ...@@ -148,7 +149,9 @@ fillExpFile: $(APPSOBJS)
@echo 'Invoking: GCC C++ Compiler' @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) -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) -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 'Finished building: $@'
@echo ' ' @echo ' '
......
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