Ignoring coverity to compile
[u/mrichter/AliRoot.git] / MFT / MakeMFTZeroMisAlignment.C
CommitLineData
a6f7b1e5 1void MakeMFTZeroMisAlignment(TString Storage = "alien://folder=/alice/cern.ch/user/a/auras/OCDB/") {
2
3 // Create TClonesArray of zero misalignment objects for MFT
4
5 const char* macroname = "MakeMFTZeroMisAlignment.C";
6
7 TClonesArray *array = new TClonesArray("AliAlignObjParams",10);
8 TClonesArray &alobj = *array;
9
10 Double_t dx=0, dy=0, dz=0, dpsi=0, dtheta=0, dphi=0;
11
12 Int_t iIndex=0;
13 AliGeomManager::ELayerID iLayer = AliGeomManager::kInvalidLayer;
14 UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iIndex);
15
16 TString MFT("MFT");
17 new (alobj[0]) AliAlignObjParams(MFT.Data(), volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
18
19 // save in CDB storage
20 if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
21 Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
22 return;
23 }
24 Info(macroname,"Saving alignment objects in CDB storage %s", Storage.Data());
25 AliCDBManager* cdb = AliCDBManager::Instance();
26 AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
27 if(!storage){
28 Error(macroname,"Unable to open storage %s\n",Storage.Data());
29 return;
30 }
31 AliCDBMetaData* md = new AliCDBMetaData();
32 md->SetResponsible("Antonio Uras");
33 md->SetComment("Alignment objects for MFT zero-misalignment");
34 md->SetAliRootVersion(gROOT->GetVersion());
35 AliCDBId id("MFT/Align/Data",0,AliCDBRunRange::Infinity());
36 storage->Put(array,id,md);
37
38 array->Delete();
39
40}
41