corrected TRD/TOF MV position
[u/mrichter/AliRoot.git] / TOF / MakeCDBEntryRunParams.C
CommitLineData
c89e11c3 1MakeCDBEntryRunParams(Float_t time0, Float_t reso, Float_t spread = -1., Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity())
f04b3a69 2{
3
4 const Int_t nPoints = 1;
5 UInt_t timestamp[nPoints] = {0.};
c89e11c3 6 Float_t t0[nPoints] = {time0};
7 Float_t tofReso[nPoints] = {reso};
8 Float_t t0Spread[nPoints] = {spread};
f04b3a69 9
10 /* create object */
11 AliTOFRunParams *obj = new AliTOFRunParams(1);
12 obj->SetTimestamp(timestamp);
13 obj->SetT0(t0);
14 obj->SetTOFResolution(tofReso);
15 obj->SetT0Spread(t0Spread);
3fd7a5cd 16 obj->SetUseLHCClockPhase(kTRUE);
f04b3a69 17
18 /* create cdb info */
19 AliCDBId id("TOF/Calib/RunParams", startRun, endRun);
20 AliCDBMetaData *md = new AliCDBMetaData();
21 md->SetResponsible("Roberto Preghenella");
22 md->SetComment("RunParams");
23 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
24 md->SetBeamPeriod(0);
25
26 /* put object in cdb */
27 AliCDBManager *cdb = AliCDBManager::Instance();
28 cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
29 cdb->GetDefaultStorage()->Put(obj, id, md);
30
31}