Extacting the OCDB in a separate module. The detectors have write permission in the...
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDmakeRecoParam.C
1 //____________________________________________________\r
2 void AliTRDmakeRecoParam()\r
3 {\r
4   AliCDBMetaData *metaData= new AliCDBMetaData(); \r
5   metaData->SetObjectClassName("TObjArray");\r
6   metaData->SetResponsible("Alexandru Bercuci");\r
7   metaData->SetBeamPeriod(1);\r
8   metaData->SetAliRootVersion("05-21-01"); //root version\r
9   metaData->SetComment("Ideal reconstruction parameters for low, high and cosmic runs");\r
10   \r
11   AliCDBId id("TRD/Calib/RecoParam", 0, AliCDBRunRange::Infinity()); \r
12   AliCDBManager *man = AliCDBManager::Instance();\r
13   AliCDBStorage *gStorLoc = man->GetStorage("local://$ALICE_ROOT/OCDB");\r
14   if (!gStorLoc) {\r
15     return;\r
16   }\r
17   gStorLoc->Put(CreateRecoParamObject(), id, metaData); \r
18 \r
19   return;\r
20 }\r
21 \r
22 \r
23 //____________________________________________________\r
24 TObjArray* CreateRecoParamObject()\r
25 {\r
26   TObjArray *recos = new TObjArray(4);\r
27 \r
28   AliTRDrecoParam *rec = 0x0;\r
29   recos->AddLast(rec = AliTRDrecoParam::GetLowFluxParam());\r
30   rec->SetAsDefault();\r
31   rec->SetNameTitle("LOW", "TRD Low Flux Reco Param");\r
32   // further settings for low flux reco param\r
33   // reco->SetThisAndThat()\r
34 \r
35   recos->AddLast(rec = AliTRDrecoParam::GetLowFluxParam());\r
36   rec->SetNameTitle("HLT", "TRD HLT Reco Param");\r
37   rec->SetChi2Y(.1);\r
38   rec->SetChi2Z(5.);\r
39 \r
40   recos->AddLast(rec = AliTRDrecoParam::GetHighFluxParam());\r
41   rec->SetNameTitle("HIGH", "TRD High Flux Reco Param");\r
42 \r
43   recos->AddLast(rec = AliTRDrecoParam::GetCosmicTestParam());\r
44   rec->SetNameTitle("COSMIC", "TRD Cosmic Reco Param");\r
45 \r
46   return recos;\r
47 }\r