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)
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;
......
......@@ -21,6 +21,7 @@
#include <iostream>
#include <fstream>
//#include <ifstream>
#include <iomanip>
#include <sstream>
......@@ -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
{
......
......@@ -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()) {
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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());
......
......@@ -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()) {
......
......@@ -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());
......
......@@ -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 ' '
......
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