]>
Commit | Line | Data |
---|---|---|
d3a9c52a | 1 | void MakeHMPIDZeroMisAlignment(){ |
2 | // Create TClonesArray of zero misalignment objects for HMPID | |
3 | // | |
4 | TClonesArray *pCA = new TClonesArray("AliAlignObjMatrix",10); | |
5 | ||
6 | AliAlignObjMatrix o; | |
7 | ||
8 | Double_t dX=0.,dY=0.,dZ=0.,dPsi=0.,dTheta=0.,dPhi=0.; | |
9 | ||
ae079791 | 10 | Int_t idHMPID = AliGeomManager::kHMPID; |
d3a9c52a | 11 | for (Int_t iCh = 0; iCh < 7; iCh++) { |
ae079791 | 12 | new((*pCA)[iCh]) AliAlignObjMatrix(AliGeomManager::SymName(idHMPID,iCh),AliGeomManager::LayerToVolUID(idHMPID,iCh),dX,dY,dZ,dPsi,dTheta,dPhi,kTRUE); |
d3a9c52a | 13 | } |
14 | ||
15 | // pCA->Print(); | |
16 | ||
5bd470e1 | 17 | if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){ |
d3a9c52a | 18 | // save on file |
19 | TFile f("HMPIDzeroMisalignment.root","RECREATE"); | |
20 | if(!f) cerr<<"cannot open file for output\n"; | |
21 | f.cd(); | |
22 | f.WriteObject(pCA,"HMPIDAlignObjs","kSingleKey"); | |
23 | f.Close(); | |
24 | }else{ | |
25 | // save in CDB storage | |
5bd470e1 | 26 | const char* Storage = gSystem->Getenv("STORAGE"); |
d3a9c52a | 27 | AliCDBManager* cdb = AliCDBManager::Instance(); |
28 | AliCDBStorage* storage = cdb->GetStorage(Storage); | |
29 | AliCDBMetaData *pMeta= new AliCDBMetaData(); | |
30 | pMeta->SetResponsible("HMPID Expert"); | |
31 | pMeta->SetComment("Zero alignment objects for HMPID"); | |
5bd470e1 | 32 | pMeta->SetAliRootVersion(gSystem->Getenv("ARVERSION")); |
d3a9c52a | 33 | AliCDBId id("HMPID/Align/Data",0,9999999); |
34 | storage->Put(pCA,id,pMeta); | |
35 | } | |
36 | ||
37 | pCA->Delete(); | |
38 | } |