Fixing ompilation warnings
[u/mrichter/AliRoot.git] / PHOS / MakePHOSRecoParam.C
CommitLineData
85ffaf6c 1void MakePHOSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kDefault)
2{
3 //========================================================================
4 //
5 // Steering macro for PHOS reconstruction parameters
6 //
7 // Author: Yuri Kharlov
8 // 13.08.2008
9 //========================================================================
10
11
12 const char* macroname = "MakePHOSRecoParam.C";
13
14 // Activate CDB storage and load geometry from CDB
15 AliCDBManager* cdb = AliCDBManager::Instance();
16 if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB");
17
18 TObjArray *recoParamArray = new TObjArray();
19
20 {
21 AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters();
0428f331 22 phosRecoParam->SetEventSpecie(AliRecoParam::kDefault);
23 phosRecoParam->SetEMCSubtractPedestals(kFALSE);
12dd7f10 24 phosRecoParam->SetEMCRawDigitThreshold(2);
25 phosRecoParam->SetEMCMinE(0.012);
0428f331 26 phosRecoParam->SetEMCClusteringThreshold(0.20);
85ffaf6c 27 phosRecoParam->SetEMCDecoderVersion("v1");
12dd7f10 28 phosRecoParam->SetEMCSampleQualityCut(10.);
85ffaf6c 29 recoParamArray->AddLast(phosRecoParam);
30 }
31 {
32 AliPHOSRecoParam * phosRecoParam = AliPHOSRecoParam::GetDefaultParameters();
33 recoParamArray->AddLast(phosRecoParam);
0428f331 34 phosRecoParam->SetEMCClusteringThreshold(0.02008);
35 phosRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
85ffaf6c 36 }
37
38 // Set the default
39 Bool_t defaultIsSet = kFALSE;
40 for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
41 AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
42 if (!param) continue;
43 if (default & param->GetEventSpecie()) {
44 param->SetAsDefault();
45 defaultIsSet = kTRUE;
46 }
47 }
48
49 if (!defaultIsSet) {
50 Error(macroname,"The default reconstruction parameters are not set! Exiting...");
51 return;
52 }
53
54 // save in CDB storage
55 AliCDBMetaData *md= new AliCDBMetaData();
56 md->SetResponsible("Yuri Kharlov");
57 md->SetComment("Reconstruction parameters PHOS");
58 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
59 md->SetBeamPeriod(0);
60 AliCDBId id("PHOS/Calib/RecoParam",0,AliCDBRunRange::Infinity());
61 cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
62
63 return;
64}
65