X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FMUONGenerateTestGMS.C;h=42c8a98df08466a35612a20b7210fc05ddcd05ef;hb=5f2721d5f2165f5379777f18a10c2f34992cf1aa;hp=7fe1216b400f381c15179c5e23dbfb869bb5f8bc;hpb=9da38526d910ed09a97ae2e84106c6758817648e;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/MUONGenerateTestGMS.C b/MUON/MUONGenerateTestGMS.C index 7fe1216b400..42c8a98df08 100644 --- a/MUON/MUONGenerateTestGMS.C +++ b/MUON/MUONGenerateTestGMS.C @@ -15,19 +15,30 @@ /* $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 +#include +#include + #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(); }