From 74d70ece2c27d5f718cd5d74f6de77526bf183ba Mon Sep 17 00:00:00 2001 From: morsch Date: Tue, 28 Jan 2003 16:59:06 +0000 Subject: [PATCH] Path to configuration data files defined in the data member (fgkTopDir, fgkDataDir); now set to $ALICE_ROOT/MUON/data (I. Hrivnacova) --- MUON/AliMUONSt1Response.cxx | 12 ++++++------ MUON/AliMUONSt1Response.h | 6 ++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/MUON/AliMUONSt1Response.cxx b/MUON/AliMUONSt1Response.cxx index 3782c751a68..3c728345e48 100644 --- a/MUON/AliMUONSt1Response.cxx +++ b/MUON/AliMUONSt1Response.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,8 @@ ClassImp(AliMUONSt1Response); +const TString AliMUONSt1Response::fgkTopDir = getenv("ALICE_ROOT"); +const TString AliMUONSt1Response::fgkDataDir = "/MUON/data/"; const TString AliMUONSt1Response::fgkConfigBaseName = "configChamber"; const TString AliMUONSt1Response::fgkStandardIniFileName = "st1StdParameter.ini"; @@ -183,8 +186,7 @@ void AliMUONSt1Response::ReadCouplesOfFloatRanges(const string& value,TList* lis void AliMUONSt1Response::SetPairToParam(const string& name,const string& value,AliMUONSt1ResponseParameter* param) const { // set a (name,value) pair to - TString path=getenv("ALICE_ROOT"); - path+="/MUON/"; + TString path = fgkTopDir + fgkDataDir ; const char* nm = name.c_str(); if (fgkStateName.CompareTo(nm,TString::kIgnoreCase)==0){ param->SetState(atoi(value.c_str())); @@ -258,8 +260,7 @@ void AliMUONSt1Response::SetPairToListElem(const string& name,const string& valu void AliMUONSt1Response::ReadIniFile(Int_t plane) { //Read the ini file and fill the th structures - TString path=getenv("ALICE_ROOT"); - path+="/MUON/"; + TString path = fgkTopDir + fgkDataDir ; //read .ini file if (gSystem->AccessPathName(path+fIniFileName[plane],kReadPermission)){ Fatal("ReadIniFile", @@ -400,8 +401,7 @@ void AliMUONSt1Response::ReadFiles() // Define the current response rules with respect to the description // given in the "configChamber1.ini" and "configChamber2.ini" files. Int_t i; - TString path=getenv("ALICE_ROOT"); - path+="/MUON/"; + TString path = fgkTopDir + fgkDataDir ; TString configFileName = path + fgkConfigBaseName + Form("%d.ini",fChamber); if (gSystem->AccessPathName(configFileName,kReadPermission)){ diff --git a/MUON/AliMUONSt1Response.h b/MUON/AliMUONSt1Response.h index 7dc66217398..531d41dbc2c 100644 --- a/MUON/AliMUONSt1Response.h +++ b/MUON/AliMUONSt1Response.h @@ -50,14 +50,16 @@ public: void PrintStatistics() const; - protected: +private: //private types typedef map TParamsMap; typedef map TListMap; static const Int_t fgkNofZones=4; + static const TString fgkTopDir; + static const TString fgkDataDir; static const TString fgkConfigBaseName; - static const TString fgkStandardIniFileName; + static const TString fgkStandardIniFileName; // static names static const TString fgkBaseName ; -- 2.31.1