]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONGMSSubprocessor.cxx
Updated for changes in geometry classes
[u/mrichter/AliRoot.git] / MUON / AliMUONGMSSubprocessor.cxx
index c8a64a64f137c59874a2b07a72df0dcf6dff3fac..30901d5fdcfce7342ecf6ad030f703bfef26efd4 100644 (file)
 ClassImp(AliMUONGMSSubprocessor)
 /// \endcond
 
-const Int_t    AliMUONGMSSubprocessor::fgkSystem = AliPreprocessor::kDAQ;
+const Int_t    AliMUONGMSSubprocessor::fgkSystem = AliPreprocessor::kDCS;
 const TString  AliMUONGMSSubprocessor::fgkDataId = "GMS";
 const TString  AliMUONGMSSubprocessor::fgkMatrixArrayName = "GMSarray";
 
 //______________________________________________________________________________
 AliMUONGMSSubprocessor::AliMUONGMSSubprocessor(AliMUONPreprocessor* master) 
   : AliMUONVSubprocessor(master, "GMS", "Upload GMS matrices to OCDB"),
-    fTransformer(true)
+    fTransformer()
 {
 /// Constructor
-  fTransformer.ReadGeometryData("volpath.dat", "transform.dat");
+  fTransformer.CreateModules();
 }
 
 //______________________________________________________________________________
@@ -79,7 +79,7 @@ UInt_t AliMUONGMSSubprocessor::ProcessFile(const TString& fileName)
   TClonesArray* array = (TClonesArray*)f.Get(fgkMatrixArrayName);
   if ( ! array ) {
     Master()->Log(Form("TClonesArray not found in file %s",fileName.Data()));
-    return 1;
+    return 2;
   }  
   
   // Convert matrices into Alice alignment objects
@@ -96,12 +96,12 @@ UInt_t AliMUONGMSSubprocessor::ProcessFile(const TString& fileName)
   metaData.SetResponsible("");
   metaData.SetComment("This preprocessor fills GMS alignment objects.");
 
-  UInt_t result = Master()->Store("SHUTTLE", "GMS", data, &metaData, 0, 0);
+  Bool_t result = Master()->Store("SHUTTLE", "GMS", data, &metaData, 0, 0);
 
   // Clear MisAlignArray in transformer
   fTransformer.ClearMisAlignmentData();
 
-  return result;
+  return (result!=kTRUE);
 }  
 
 //
@@ -112,15 +112,16 @@ UInt_t AliMUONGMSSubprocessor::ProcessFile(const TString& fileName)
 //______________________________________________________________________________
 UInt_t AliMUONGMSSubprocessor::Process(TMap* /*dcsAliasMap*/)
 {
-/// Process GMS alignment files
+/// Process GMS alignment files.
+/// Return failure (0) in case procession of some file has failed
 
-  UInt_t result = 0;
+  UInt_t result = 1;
   TList* sources = Master()->GetFileSources(fgkSystem, fgkDataId);
   TIter next(sources);
   TObjString* o(0x0);
   while ( ( o = static_cast<TObjString*>(next()) ) ) {
     TString fileName(Master()->GetFile(fgkSystem, fgkDataId, o->GetName()));
-    result += ProcessFile(fileName);
+    result *= ProcessFile(fileName);
   }
   delete sources;