Skip to content

Commit

Permalink
Using std::
Browse files Browse the repository at this point in the history
  • Loading branch information
hristov authored and hristov committed Feb 27, 2017
1 parent 42d3aac commit 30c2b53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions FIT/FITsim/AliFITv6.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@

ClassImp(AliFITv6)


//--------------------------------------------------------------------
AliFITv6::AliFITv6(): AliFIT(),
fIdSens1(0),
Expand Down Expand Up @@ -1213,9 +1212,9 @@ Int_t AliFITv6::GetCellId(Int_t *vol)

//-----------------------------------------------------------------

Int_t AliFITv6::ReadOptProperties(const string filePath, Float_t **e, Double_t **de,
Int_t AliFITv6::ReadOptProperties(const std::string filePath, Float_t **e, Double_t **de,
Float_t **abs, Float_t **n, Int_t &kNbins) const{
ifstream infile;
std::ifstream infile;
infile.open(filePath.c_str());

// Check if file is opened correctly
Expand All @@ -1224,7 +1223,7 @@ Int_t AliFITv6::ReadOptProperties(const string filePath, Float_t **e, Double_t *
return -1;
}

string comment; // dummy, used just to read 4 first lines and move the cursor to the 5th, otherwise unused
std::string comment; // dummy, used just to read 4 first lines and move the cursor to the 5th, otherwise unused
if(!getline(infile,comment)){ // first comment line
AliFatal(Form("Error opening ascii file (it is probably a folder!): %s", filePath.c_str()));
return -2;
Expand All @@ -1249,7 +1248,7 @@ Int_t AliFITv6::ReadOptProperties(const string filePath, Float_t **e, Double_t *

// read the main body of the file (table of values: energy, absorption length and refractive index)
Int_t iLine=0;
string sLine;
std::string sLine;
getline(infile, sLine);
while(!infile.eof()){
if(iLine >= kNbins){
Expand Down
2 changes: 1 addition & 1 deletion FIT/FITsim/AliFITv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class AliFITv6 : public AliFIT {

private:
// Optical properties reader: e-Energy, abs-AbsorptionLength[cm], n-refractive index
Int_t ReadOptProperties(const string inputFilePath, Float_t **e,
Int_t ReadOptProperties(const std::string inputFilePath, Float_t **e,
Double_t **de, Float_t **abs, Float_t **n, Int_t &kNbins) const;
void FillOtherOptProperties(Float_t **efficAll, Float_t **rindexAir,
Float_t **absorAir, Float_t **rindexCathodeNext, Float_t **absorbCathodeNext,
Expand Down

0 comments on commit 30c2b53

Please sign in to comment.