]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/MUONGenerateTestGMS.C
Changed default OCDB from 2009 to 2010
[u/mrichter/AliRoot.git] / MUON / MUONGenerateTestGMS.C
index 7fe1216b400f381c15179c5e23dbfb869bb5f8bc..42c8a98df08466a35612a20b7210fc05ddcd05ef 100644 (file)
 
 /* $Id: */
 
-// Macro to generate ad hoc GMS alignment matrices in the agreed format:
-// TClonesArray saved in the Root file with a key "GMSarray"
-// containing TGeoHMatrix with TObject::fUniqueID equal to the geometry
-// module Id
-//
-// By I. Hrivnacova, IPN Orsay
+/// \ingroup macros
+/// \file MUONGenerateTestGMS.C
+/// \brief Macro to generate ad hoc GMS alignment matrices in the agreed format
+///
+/// TClonesArray is saved in the Root file with a key "GMSarray"
+/// containing TGeoHMatrix objects with TObject::fUniqueID equal to the geometry
+/// module Ids
+///
+/// \author I. Hrivnacova, IPN Orsay
 
 #if !defined(__CINT__) || defined(__MAKECINT__)
+
 #include "AliMpConstants.h"
+
+#include <TFile.h>
+#include <TGeoMatrix.h>
+#include <TClonesArray.h>
+
 #endif
 
-MUONGenerateTestGMS()
+void MUONGenerateTestGMS(Bool_t print = kFALSE)
 {
+/// \param print option to switch on printing the processed matrices
+
   TFile f("data/GMS.root", "RECREATE");
   TClonesArray* array = new TClonesArray("TGeoHMatrix",100);
   
@@ -36,8 +47,10 @@ MUONGenerateTestGMS()
     m->SetUniqueID(i);
     /// rotate by small angle
     m->RotateX(i*0.01);
+    
+    if (print) m->Print();
   }
   
-  gFile->WriteObject(array,"GMSarray");
+  f.WriteObject(array,"GMSarray");
   f.Close();
 }