]>
Commit | Line | Data |
---|---|---|
35d81915 | 1 | /// \file CreateRefMap.C |
2 | /// Create reference map | |
b571f0d6 | 3 | |
4 | void CreateRefMap(){ | |
35d81915 | 5 | /// aliroot -b -q $ALICE_ROOT/TPC/CalibMacros/CreateRefMap.C |
b571f0d6 | 6 | |
35d81915 | 7 | // cdb storage - output stored in the working directory |
b571f0d6 | 8 | TString storage="local://"+gSystem->GetFromPipe("pwd")+"/OCDB"; |
75bf72b2 | 9 | //set reference run numbers for the various ocdb entries |
b571f0d6 | 10 | Int_t pedestalRun=121642; |
11 | Int_t noiseRun=121642; | |
12 | Int_t pulserRun=121645; | |
13 | Int_t ceRun=120818; | |
14 | Int_t altroRun=120503; | |
15 | Int_t qaRun=123537; | |
16 | Int_t rawRun=123537; | |
75bf72b2 | 17 | //comment why the update was done |
b571f0d6 | 18 | TString comment(""); |
75bf72b2 | 19 | //find first run for which the data are valid |
20 | Int_t first=0; | |
21 | first=TMath::Max(first,pedestalRun); | |
22 | first=TMath::Max(first,noiseRun); | |
23 | first=TMath::Max(first,pulserRun); | |
24 | first=TMath::Max(first,ceRun); | |
25 | first=TMath::Max(first,altroRun); | |
26 | first=TMath::Max(first,qaRun); | |
27 | first=TMath::Max(first,rawRun); | |
28 | // first=0; | |
29 | //create the map | |
30 | TMap map; | |
31 | map.Add(new TObjString("TPC/Calib/Pedestals"),new TObjString(Form("%d",pedestalRun))); | |
32 | map.Add(new TObjString("TPC/Calib/PadNoise"),new TObjString(Form("%d",noiseRun))); | |
33 | map.Add(new TObjString("TPC/Calib/Pulser"),new TObjString(Form("%d",pulserRun))); | |
34 | map.Add(new TObjString("TPC/Calib/CE"),new TObjString(Form("%d",ceRun))); | |
35 | map.Add(new TObjString("TPC/Calib/AltroConfig"),new TObjString(Form("%d",altroRun))); | |
36 | map.Add(new TObjString("TPC/Calib/QA"),new TObjString(Form("%d",qaRun))); | |
37 | map.Add(new TObjString("TPC/Calib/Raw"),new TObjString(Form("%d",rawRun))); | |
38 | map.Add(new TObjString("Comment"), new TObjString(comment)); | |
39 | //create meta data | |
40 | AliCDBMetaData *metaData= new AliCDBMetaData(); | |
41 | metaData->SetObjectClassName("TMap"); | |
42 | metaData->SetResponsible("Jens Wiechula (Jens.Wiechula@cern.ch)"); | |
43 | metaData->SetBeamPeriod(1); | |
b571f0d6 | 44 | metaData->SetAliRootVersion("5-26-00"); //root version |
75bf72b2 | 45 | metaData->SetComment("Map for reference run numbers"); |
46 | //store object | |
47 | AliCDBId id1("TPC/Calib/Ref", first, AliCDBRunRange::Infinity()); | |
48 | // | |
49 | gStorage = AliCDBManager::Instance()->GetStorage(storage.Data()); | |
50 | gStorage->Put(&map, id1, metaData); | |
b571f0d6 | 51 | } |
52 |