Updated DA config following the commit the DA source file.
[u/mrichter/AliRoot.git] / VZERO / MakeVZERORecoParam.C
CommitLineData
ed90abb8 1void MakeVZERORecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult) {
2//========================================================================
3//
4// Steering macro for VZERO reconstruction parameters
5//
6// Author: Brigitte Cheynis
7//
8//========================================================================
9
10 const char* macroname = "MakeVZERORecoParam.C";
11
12 // Activate CDB storage and load geometry from CDB
13 AliCDBManager* cdb = AliCDBManager::Instance();
14 if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB");
15
16 TObjArray *recoParamArray = new TObjArray();
17
18 {
19 AliVZERORecoParam * vzeroRecoParam = new AliVZERORecoParam;
20 vzeroRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
21 recoParamArray->AddLast(vzeroRecoParam);
22 }
23 {
24 AliVZERORecoParam * vzeroRecoParam = new AliVZERORecoParam;
c73e8189 25 // the following two settings are needed to high lumi runs in 2011
26 vzeroRecoParam->SetStartClock(9);
27 vzeroRecoParam->SetEndClock(11);
ddbd5d79 28 vzeroRecoParam->SetNPreClocks(1);
29 vzeroRecoParam->SetNPostClocks(1);
ed90abb8 30 vzeroRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
31 recoParamArray->AddLast(vzeroRecoParam);
32 }
33 {
34 AliVZERORecoParam * vzeroRecoParam = new AliVZERORecoParam;
53ad561b 35 vzeroRecoParam->SetNPreClocks(6);
ed90abb8 36 vzeroRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
37 recoParamArray->AddLast(vzeroRecoParam);
38 }
39
40 // Set the default
41 Bool_t defaultIsSet = kFALSE;
42 for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
43 AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
44 if (!param) continue;
45 if (default & param->GetEventSpecie()) {
46 param->SetAsDefault();
47 defaultIsSet = kTRUE;
48 }
49 }
50
51 if (!defaultIsSet) {
52 Error(macroname,"The default reconstruction parameters are not set! Exiting...");
53 return;
54 }
55
56 // save in CDB storage
57 AliCDBMetaData *md= new AliCDBMetaData();
58 md->SetResponsible("Brigitte Cheynis");
59 md->SetComment("Reconstruction parameters for VZERO");
60 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
61 md->SetBeamPeriod(0);
62 AliCDBId id("VZERO/Calib/RecoParam",0,AliCDBRunRange::Infinity());
63 cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
64
65 return;
66}