1 void UpdateCDBVertexDiamond(Double_t xmed = 0., Double_t ymed = 0., Double_t sigx = 0.005, Double_t sigy = 0.005, Double_t sigz = 5.3) {
2 // produce the trigger descriptorwith the current AliRoot and store it in the
5 AliCDBManager* man = AliCDBManager::Instance();
6 man->SetDefaultStorage("local://$ALICE_ROOT");
8 AliCDBId id("GRP/Calib/MeanVertex",0,AliCDBRunRange::Infinity());
9 AliCDBMetaData *metadata= new AliCDBMetaData();
12 const char* rootv = gROOT->GetVersion();
14 // Get AliRoot version from file to set it in the metadata of the entry
15 TFile *fv= TFile::Open("$ALICE_ROOT/CVS/Repository?filetype=raw","READ");
16 Int_t size = fv->GetSize();
17 char *buf = new Char_t[size];
18 memset(buf, '\0', size);
21 if ( fv->ReadBuffer(buf, size) ) {
22 Printf("Error reading AliRoot version from file to buffer!");
29 metadata->SetResponsible("prino@to.infn.it");
30 metadata->SetComment("Default mean vertex position");
31 metadata->SetAliRootVersion(alirootv);
32 metadata->SetComment(Form("Default trigger description produced with root version %s and AliRoot version %s",rootv,alirootv));
35 Printf("Storing in CDB the default trigger description produced with root version %s and AliRoot version %s",rootv,alirootv);
37 Double_t resolx=35./10000.;
38 Double_t resoly=35./10000.;
39 Double_t sigma[3],position[3];
43 sigma[0]=TMath::Sqrt(sigx*sigx+resolx*resolx);
44 sigma[1]=TMath::Sqrt(sigy*sigy+resoly*resoly);
47 AliESDVertex *vertex = new AliESDVertex(position,sigma,"vtxmean");
48 vertex->PrintStatus();
50 man->Put(vertex,id,metadata);