-//______________________________________________________________________________
-Bool_t AliMUONVGeometryBuilder::ReadTransformations() const
-{
-// Reads transformations from a file
-// Returns true, if reading finished correctly.
-// ---
-
- // File path
- TString filePath = gSystem->Getenv("ALICE_ROOT");
- filePath += "/MUON/data/";
- filePath += fTransformFileName;
-
- // Open input file
- ifstream in(filePath, ios::in);
- if (!in) {
- cerr << filePath << endl;
- Fatal("ReadTransformations", "File not found.");
- return false;
- }
-
- TString key;
- in >> key;
- while ( !in.eof() ) {
- if (key == TString("CH"))
- key = ReadData1(in);
- else if (key == TString("DE"))
- key = ReadData2(in);
- else {
- Fatal("ReadTransformations", "%s key not recognized", key.Data());
- return false;
- }
- }
-
- return true;
-}
-
-//______________________________________________________________________________
-Bool_t AliMUONVGeometryBuilder::ReadSVMap() const
-{
-// Reads the sensitive volume from a file
-// Returns true, if reading finished correctly.
-// ---
-
- // File path
- TString filePath = gSystem->Getenv("ALICE_ROOT");
- filePath += "/MUON/data/";
- filePath += fSVMapFileName;
-
- // Open input file
- ifstream in(filePath, ios::in);
- if (!in) {
- cerr << filePath << endl;
- Fatal("ReadSVMap", "File not found.");
- return false;
- }
-
- TString key;
- in >> key;
- while ( !in.eof() ) {
- if (key == TString("SV"))
- key = ReadData3(in);
- else {
- Fatal("ReadSVMap", "%s key not recognized", key.Data());
- return false;
- }
- }
-
- return true;
-}
-
-//______________________________________________________________________________
-Bool_t AliMUONVGeometryBuilder::WriteTransformations() const
-{
-// Writes transformations into a file
-// Returns true, if writing finished correctly.
-// ---
-
- // File path
- TString filePath = gSystem->Getenv("ALICE_ROOT");
- filePath += "/MUON/data/";
- filePath += fTransformFileName;
- filePath += fgkOutFileNameSuffix;
-
- // Open input file
- ofstream out(filePath, ios::out);
- if (!out) {
- cerr << filePath << endl;
- Error("WriteTransformations", "File not found.");
- return false;
- }
- out.setf(std::ios::fixed);
-
- WriteData1(out);
- WriteData2(out);
-
- return true;
-}
-
-//______________________________________________________________________________
-Bool_t AliMUONVGeometryBuilder::WriteSVMap(Bool_t rebuild) const
-{
-// Writes sensitive volume map into a file
-// Returns true, if writing finished correctly.
-// ---
-
- // File path
- TString filePath = gSystem->Getenv("ALICE_ROOT");
- filePath += "/MUON/data/";
- filePath += fSVMapFileName;
- filePath += fgkOutFileNameSuffix;
-
- // Open input file
- ofstream out(filePath, ios::out);
- if (!out) {
- cerr << filePath << endl;
- Error("WriteTransformations", "File not found.");
- return false;
- }
- out.setf(std::ios::fixed);
-
- if (rebuild) RebuildSVMaps();
-
- WriteData3(out);
-
- return true;
-}
-