Coding convention violations: suppression
[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;
25 vzeroRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
26 recoParamArray->AddLast(vzeroRecoParam);
27 }
28 {
29 AliVZERORecoParam * vzeroRecoParam = new AliVZERORecoParam;
30 vzeroRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
31 recoParamArray->AddLast(vzeroRecoParam);
32 }
33
34 // Set the default
35 Bool_t defaultIsSet = kFALSE;
36 for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
37 AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
38 if (!param) continue;
39 if (default & param->GetEventSpecie()) {
40 param->SetAsDefault();
41 defaultIsSet = kTRUE;
42 }
43 }
44
45 if (!defaultIsSet) {
46 Error(macroname,"The default reconstruction parameters are not set! Exiting...");
47 return;
48 }
49
50 // save in CDB storage
51 AliCDBMetaData *md= new AliCDBMetaData();
52 md->SetResponsible("Brigitte Cheynis");
53 md->SetComment("Reconstruction parameters for VZERO");
54 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
55 md->SetBeamPeriod(0);
56 AliCDBId id("VZERO/Calib/RecoParam",0,AliCDBRunRange::Infinity());
57 cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
58
59 return;
60}