]>
Commit | Line | Data |
---|---|---|
ef302f91 | 1 | |
2 | void DBStorageSurvey(){ | |
3 | ||
4 | AliCDBManager *man = AliCDBManager::Instance(); | |
5 | ||
6 | AliCDBStorage *storLoc; | |
162637e4 | 7 | man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
ef302f91 | 8 | |
9 | // Setting fake survey values : | |
10 | ||
11 | AliVZEROSurveyData *surveyda = new AliVZEROSurveyData("Survey"); | |
12 | ||
13 | Float_t ngA[3] = { -22.327, -22.427, -84.7 }; | |
14 | surveyda->SetPointA(ngA); | |
15 | Float_t ngB[3] = { 22.927, -22.427, -84.7 }; | |
16 | surveyda->SetPointB(ngB); | |
17 | Float_t ngC[3] = { 22.927, 22.827, -84.7 }; | |
18 | surveyda->SetPointC(ngC); | |
19 | Float_t ngD[3] = { -22.327, 22.827, -84.7 }; | |
20 | surveyda->SetPointD(ngD); | |
21 | ||
22 | // Creation of the object VZERO Survey as a MetaData | |
23 | ||
24 | TObjString str("VZERO Survey"); // object that will be stored | |
25 | ||
26 | AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object | |
27 | ||
28 | AliCDBId id("VZERO/Survey/Data",0,9999999); | |
29 | ||
30 | //md->SetObjectClassName("VZERO survey parameters"); automatically | |
31 | //set to AliVZEROSurveyData by the CDB classes during storage | |
32 | ||
33 | md->SetResponsible("Brigitte Cheynis"); | |
34 | md->SetBeamPeriod(0); | |
35 | md->SetAliRootVersion("March2007"); | |
36 | md->SetComment("Prototype"); | |
37 | md->PrintMetaData(); | |
38 | ||
39 | storLoc = man->GetDefaultStorage(); | |
40 | storLoc->Put(surveyda, id, md); | |
41 | ||
42 | storLoc->Delete(); | |
43 | delete md; | |
44 | ||
45 | } |