-//______________________________________________________________________________
-Bool_t
-AliMUONVGeometryBuilder::ReadTransformations() const
-{
-// Reads transformations from a file
-// Returns true, if reading finished correctly.
-// ---
-
- // No reading
- // if builder is not associated with any geometry module
- if (fModuleGeometries->GetEntriesFast() == 0) return false;
-
- // 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;
- AliFatal("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 {
- AliFatal(Form("%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.
-// ---
-
- // No reading
- // if builder is not associated with any geometry module
- if (fModuleGeometries->GetEntriesFast() == 0) return false;
-
- // 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;
- AliFatal("File not found.");
- return false;
- }
-
- TString key;
- in >> key;
- while ( !in.eof() ) {
- if (key == TString("SV"))
- key = ReadData3(in);
- else {
- AliFatal(Form("%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.
-// ---
-
- // No writing
- // if builder is not associated with any geometry module
- if (fModuleGeometries->GetEntriesFast() == 0) return false;
-
- // 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;
- AliError("File not found.");
- return false;
- }
-#if !defined (__DECCXX)
- out.setf(std::ios::fixed);
-#endif
- 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.
-// ---
-
- // No writing
- // if builder is not associated with any geometry module
- if (fModuleGeometries->GetEntriesFast() == 0) return false;
-
- // 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;
- AliError("File not found.");
- return false;
- }
-#if !defined (__DECCXX)
- out.setf(std::ios::fixed);
-#endif
- if (rebuild) RebuildSVMaps();
-
- WriteData3(out);
-
- return true;
-}
-