1 void UpdateCDBIdealGeom(){
2 // produce the ideal geometry with the current AliRoot and store it in the
5 AliCDBManager* man = AliCDBManager::Instance();
6 man->SetDefaultStorage("local://$ALICE_ROOT");
8 AliCDBId id("GRP/Geometry/Data",0,AliCDBRunRange::Infinity());
9 AliCDBMetaData *md= 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 md->SetAliRootVersion(alirootv);
30 md->SetComment(Form("Geometry produced with root version %s and AliRoot version %s",rootv,alirootv));
36 Printf("Unable to produce a valid geometry to be put in the CDB!");
40 Printf("Storing in CDB geometry produced with root version %s and AliRoot version %s",rootv,alirootv);
41 man->Put(gGeoManager,id,md);