]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDAlignFaker.cxx
New detector numbering scheme (common for DAQ/HLT/Offline). All the subdetectors...
[u/mrichter/AliRoot.git] / FMD / AliFMDAlignFaker.cxx
index 6945074400f18354408b5f3921999939b1e44ad9..dd39b2dabf62611078c51642663b099e9c4a659d 100644 (file)
@@ -76,6 +76,7 @@ AliFMDAlignFaker::AliFMDAlignFaker(Int_t mask, const char* geo,
   SetSensorRotation();
   SetHalfDisplacement();
   SetHalfRotation();
+  SetComment();
 }
 
 //__________________________________________________________________
@@ -202,6 +203,7 @@ AliFMDAlignFaker::MakeAlign(const TString& path, Int_t id,
   AliDebug(1, Form("Make alignment for %s (volume %d): (%f,%f,%f) (%f,%f,%f)", 
                   path.Data(), id, transX, transY, transZ, rotX, rotY, rotZ));
   Int_t nAlign = fArray->GetEntries();
+  id = 0;
   AliAlignObjAngles* obj = 
     new ((*fArray)[nAlign]) AliAlignObjAngles(path.Data(), id,0,0,0,0,0,0);
   if (!obj) {
@@ -251,15 +253,12 @@ void
 AliFMDAlignFaker::WriteToCDB()
 {
   // Make the objects. 
-  AliCDBManager*     cdb      = AliCDBManager::Instance();
-  if (GetTitle() && GetTitle()[0] != '\0')    
-    cdb->SetDefaultStorage(GetTitle());
-    
-  AliCDBMetaData* meta = new AliCDBMetaData; 
+  AliCDBManager*     cdb  = AliCDBManager::Instance();
+  AliCDBMetaData*    meta = new AliCDBMetaData; 
   meta->SetResponsible(gSystem->GetUserInfo()->fRealName.Data()); 
   meta->SetAliRootVersion(gROOT->GetVersion()); 
   meta->SetBeamPeriod(1); 
-  meta->SetComment("Dummy data for testing");
+  meta->SetComment(fComment.Data());
 
   AliCDBId id("FMD/Align/Data", fRunMin, fRunMax);
   cdb->Put(fArray, id, meta);
@@ -278,8 +277,8 @@ AliFMDAlignFaker::WriteToFile()
   }
   file->cd();
   fArray->Write("FMDAlignment");
-  file->Close();
   file->Write();
+  file->Close();
 }