1 void UpdateCDBVertexDiamond() {
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("Tapan Nayak");
30 metadata->SetAliRootVersion(alirootv);
31 metadata->SetComment(Form("Default trigger description produced with root version %s and AliRoot version %s",rootv,alirootv));
34 Printf("Storing in CDB the default trigger description produced with root version %s and AliRoot version %s",rootv,alirootv);
36 Double_t position[3] = {0.0,0.0,0.0};
37 Double_t sigma[3] = {0.0,0.0,0.0};
38 AliESDVertex *vertex = new AliESDVertex(position,sigma,"Default");
41 man->Put(vertex,id,metadata);