Extacting the OCDB in a separate module. The detectors have write permission in the...
[u/mrichter/AliRoot.git] / ZDC / MakeZDCRecoParam.C
CommitLineData
7bff3766 1void MakeZDCRecoParam(Int_t type=0){
2//========================================================================
3//
4// Steering macro to create and store in OCDB
5// ZDC reconstruction parameters
6//
7// Contact: chiara.oppedisano@to.infn.it
8//
9//========================================================================
10
11 AliCDBManager* cdb = AliCDBManager::Instance();
bc7bc94b 12 //if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB");
162637e4 13 cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
7bff3766 14
15 AliZDCRecoParam *zdcRecoParam = 0;
16 //
17 switch(type) {
18 case 0:
19 zdcRecoParam = (AliZDCRecoParampp*) AliZDCRecoParampp::GetppRecoParam();
33085007 20 zdcRecoParam->SetBeamEnergy(5000.);
7bff3766 21 break;
22 case 1:
23 zdcRecoParam = (AliZDCRecoParamPbPb*) AliZDCRecoParamPbPb::GetPbPbRecoParam();
24 break;
25 case default:
26 printf("Event type not implemented\n");
27 return;
28 break;
29 }
30 //
31 // save in CDB storage
32 AliCDBMetaData *md= new AliCDBMetaData();
33 md->SetResponsible("Chiara Oppedisano");
34 md->SetComment("Reconstruction parameters for ZDC");
35 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
36 md->SetBeamPeriod(0);
bc7bc94b 37 md->SetObjectClassName("AliZDCRecoParam");
7bff3766 38 AliCDBId id("ZDC/Calib/RecoParam",0,AliCDBRunRange::Infinity());
39 AliCDBManager::Instance()->GetDefaultStorage()->Put(zdcRecoParam,id, md);
40
41}