bugfix: the AliHLTOUTTask supposed to receive the output of an HLT reconstruction...
[u/mrichter/AliRoot.git] / GRP / UpdateCDBGRPEntry.C
CommitLineData
99479691 1void UpdateCDBGRPEntry() {
2 // produce the GRP default entry in CDB
3
4 AliCDBManager* man = AliCDBManager::Instance();
162637e4 5 man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
99479691 6 man->SetRun(0);
7 AliCDBId id("GRP/GRP/Data",0,AliCDBRunRange::Infinity());
8 AliCDBMetaData *metadata= new AliCDBMetaData();
9
10 // Get root version
11 const char* rootv = gROOT->GetVersion();
12
7d69b79f 13 /*
99479691 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);
19 fv->Seek(0);
20 char* alirootv;
21 if ( fv->ReadBuffer(buf, size) ) {
22 Printf("Error reading AliRoot version from file to buffer!");
23 alirootv = "";
24 }
25 if(buf=="AliRoot"){
26 alirootv="HEAD";
27 }else{
28 alirootv = buf;
99479691 29 metadata->SetAliRootVersion(alirootv);
30 }
7d69b79f 31 */
32 metadata->SetResponsible("Chiara.Zampolli@cern.ch");
33 metadata->SetComment("Default values for the GRP monitored parameters");
34
3549b642 35 TMap *mappp = GetGRPList("pp");
7d69b79f 36 //TMap *mappbpb = GetGRPList("PbPb"); // not used as default!!!
3549b642 37
7d69b79f 38 // Printf("Storing in CDB the default values for the GRP %d parameters produced with root %s and AliRoot version %s",list->GetEntries(),rootv,alirootv);
99479691 39
7d69b79f 40 man->Put(mappp,id,metadata);
99479691 41}
42
43//_______________________________________//
3549b642 44TMap *GetGRPList(const char* system) {
45 TString fSystem = system;
46 TMap *map = new TMap();
47 map->SetName(system);
99479691 48
3549b642 49 //DAQ
50 map->Add(new TObjString("fAliceStartTime"),new TObjString("0"));
51 map->Add(new TObjString("fAliceStopTime"),new TObjString("9999"));
52 if(fSystem == "pp")
53 map->Add(new TObjString("fAliceBeamEnergy"),new TObjString("14000"));
54 else map->Add(new TObjString("fAliceBeamEnergy"),new TObjString("5500"));
55 map->Add(new TObjString("fAliceBeamType"),new TObjString(system));
7e88424f 56 map->Add(new TObjString("fNumberOfDetectors"),new TObjString("21"));
57 map->Add(new TObjString("fDetectorMask"),new TObjString("1074790399"));
58 map->Add(new TObjString("fLHCPeriod"),new TObjString("LHC08c"));
99479691 59
3549b642 60 //DCS
61 map->Add(new TObjString("fLHCState"),new TObjString("test"));
62 map->Add(new TObjString("fLHCCondition"),new TObjString("test"));
63 map->Add(new TObjString("fLHCLuminosity"),new TObjString("0"));
64 map->Add(new TObjString("fBeamIntensity"),new TObjString("0"));
0705428e 65 map->Add(new TObjString("fL3Current"),new TObjString("30000"));
3549b642 66 map->Add(new TObjString("fL3Polarity"),new TObjString("0"));
0705428e 67 map->Add(new TObjString("fDipoleCurrent"),new TObjString("6000"));
3549b642 68 map->Add(new TObjString("fDipolePolarity"),new TObjString("0"));
69 map->Add(new TObjString("fCavernTemperature"),new TObjString("0"));
70 map->Add(new TObjString("fCavernPressure"),new TObjString("0"));
99479691 71
3549b642 72 return map;
99479691 73}