1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 // Class AliMUONGMSSubprocessor
19 // -----------------------------
20 // The shuttle subprocessor for GMS data
21 // Author: Ivana Hrivnacova, IPN Orsay
24 #include "AliMUONGMSSubprocessor.h"
25 #include "AliMUONPreprocessor.h"
27 #include "AliCDBMetaData.h"
30 #include <TTimeStamp.h>
32 #include <TClonesArray.h>
33 #include <Riostream.h>
35 ClassImp(AliMUONGMSSubprocessor)
37 const Int_t AliMUONGMSSubprocessor::fgkSystem = AliPreprocessor::kDAQ;
38 const TString AliMUONGMSSubprocessor::fgkDataId = "GMS";
39 const TString AliMUONGMSSubprocessor::fgkMatrixArrayName = "GMSarray";
41 //______________________________________________________________________________________________
42 AliMUONGMSSubprocessor::AliMUONGMSSubprocessor(AliMUONPreprocessor* master)
43 : AliMUONVSubprocessor(master, "GMS", "Upload GMS matrices to OCDB"),
47 fTransformer.ReadGeometryData("volpath.dat", "transform.dat");
50 //______________________________________________________________________________________________
51 AliMUONGMSSubprocessor::~AliMUONGMSSubprocessor()
56 //______________________________________________________________________________________________
57 UInt_t AliMUONGMSSubprocessor::Process(TMap* /*dcsAliasMap*/)
59 /// Convert TGeoHMatrix to AliAlignObjMatrix and fill them into AliTestDataDCS object
62 = Master()->GetFile(fgkSystem, fgkDataId, fgkDataId);
64 AliErrorStream() << "File not found" << endl;
71 // Get array with matrices
72 TClonesArray* array = (TClonesArray*)f.Get(fgkMatrixArrayName);
74 AliErrorStream() << "TClonesArray with not found in file "
79 // Convert matrices into Alice alignment objects
80 for (Int_t i=0; i<array->GetEntriesFast(); i++ ) {
81 TGeoHMatrix* matrix = (TGeoHMatrix*)array->At(i);
82 fTransformer.AddMisAlignModule(matrix->GetUniqueID(), *matrix);
84 TObject* data = const_cast< TClonesArray*>(fTransformer.GetMisAlignmentData());
86 //Now we have to store the final CDB file
87 AliCDBMetaData metaData;
88 metaData.SetBeamPeriod(0);
89 metaData.SetResponsible("");
90 metaData.SetComment("This preprocessor fills GMS alignment objects.");
92 UInt_t result = Master()->Store("SHUTTLE", "GMS", data, &metaData, 0, 0);
94 // Clear MisAlignArray in transformer
95 fTransformer.ClearMisAlignmentData();