]>
Commit | Line | Data |
---|---|---|
0607bddf | 1 | void MakeT0RecoParam(Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity(), AliRecoParam::EventSpecie_t defaultParam = AliRecoParam::kHighMult) |
2 | { | |
3 | // Create T0 Calibration Object for Ideal calibration and | |
4 | // write it on CDB | |
5 | AliCDBManager *man = AliCDBManager::Instance(); | |
6 | man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); | |
7 | man->SetRun(startRun); | |
8 | ||
9 | TObjArray *recoParamArray = new TObjArray(); | |
10 | AliT0RecoParam* t0RecoParam; | |
11 | ||
12 | t0RecoParam = AliT0RecoParam::GetHighFluxParam(); | |
13 | t0RecoParam->SetEventSpecie(AliRecoParam::kHighMult); | |
14 | // t0RecoParam->Dump(); | |
15 | cout<<" t0RecoParam->GetEventSpecie "<< t0RecoParam->GetEventSpecie()<<endl; | |
16 | // t0RecoParam->Dump(); | |
17 | // t0RecoParam->PrintParameters(); | |
18 | recoParamArray->AddLast(t0RecoParam); | |
19 | ||
20 | ||
21 | ||
22 | t0RecoParam = AliT0RecoParam::GetLowFluxParam(); | |
23 | t0RecoParam->SetEventSpecie(AliRecoParam::kLowMult); | |
24 | cout<<" t0RecoParam->GetEventSpecie "<< t0RecoParam->GetEventSpecie()<<endl; | |
25 | // t0RecoParam->Dump(); | |
26 | // t0RecoParam->PrintParameters(); | |
27 | recoParamArray->AddLast(t0RecoParam); | |
28 | ||
29 | t0RecoParam = AliT0RecoParam::GetLaserTestParam(); | |
30 | t0RecoParam->SetEventSpecie(AliRecoParam::kCalib); | |
31 | // t0RecoParam->Dump(); | |
32 | cout<<" t0RecoParam->GetEventSpecie "<< t0RecoParam->GetEventSpecie()<<endl; | |
33 | // t0RecoParam->Dump(); | |
34 | // t0RecoParam->PrintParameters(); | |
35 | recoParamArray->AddLast(t0RecoParam); | |
36 | ||
37 | // Set the default | |
38 | Bool_t defaultIsSet = kFALSE; | |
39 | cout<<"recoParamArray->GetEntriesFast() "<<recoParamArray.GetEntriesFast()<<endl; | |
40 | TIter next(recoParamArray.MakeIterator()); | |
41 | while ( (param = static_cast<AliT0RecoParam*>(next())) ) { | |
42 | if (!param) continue; | |
43 | if (defaultParam == param->GetEventSpecie()) { | |
44 | cout<<" Specie "<<param->GetEventSpecie()<<endl; | |
45 | param->SetEventSpecie(param->GetEventSpecie()); | |
46 | param->SetAsDefault(); | |
47 | defaultIsSet = kTRUE; | |
48 | } | |
49 | param->Print("FULL"); | |
50 | } | |
51 | ||
52 | ||
53 | AliCDBMetaData *md= new AliCDBMetaData(); | |
54 | md->SetResponsible("Alla"); | |
55 | md->SetComment("Reconstruction parameters T0"); | |
56 | md->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
57 | md->SetBeamPeriod(0); | |
58 | AliCDBId id("T0/Calib/RecoParam",startRun,endRun); | |
59 | man->GetDefaultStorage()->Put(recoParamArray,id, md); | |
60 | ||
61 | } | |
62 | ||
63 |