1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
20 // 2) takes data after pass0 ,
21 // processes it, and stores either to OCDB .
24 #include "AliT0PreprocessorOffline.h"
25 #include "AliT0CalibTimeEq.h"
26 #include "AliCDBStorage.h"
27 #include "AliCDBMetaData.h"
28 #include "AliCDBManager.h"
30 #include "AliCDBEntry.h"
33 #include <TTimeStamp.h>
35 #include <TObjString.h>
40 ClassImp(AliT0PreprocessorOffline)
42 //____________________________________________________
43 AliT0PreprocessorOffline::AliT0PreprocessorOffline():
44 TNamed("AliT0PreprocessorOffline","AliT0PreprocessorOffline")
48 //____________________________________________________
50 AliT0PreprocessorOffline::~AliT0PreprocessorOffline()
55 //____________________________________________________
56 //____________________________________________________
58 void AliT0PreprocessorOffline::CalibOffsetChannels(TString filePhysName, Int_t ustartRun, Int_t uendRun, TString ocdbStorage)
62 //Processing data from DAQ Physics run
63 AliInfo("Processing Time Offset between channels");
66 AliT0CalibTimeEq *offline = new AliT0CalibTimeEq();
68 Bool_t writeok = offline->ComputeOfflineParams(filePhysName.Data());
69 AliCDBMetaData metaData;
70 metaData.SetBeamPeriod(1);
71 metaData.SetResponsible("Alla Maevskaya");
72 metaData.SetComment("Time equalizing result with slew");
76 id1=new AliCDBId("T0/Calib/TimeDelay", ustartRun, uendRun);
77 AliCDBStorage* gStorage = AliCDBManager::Instance()->GetStorage(ocdbStorage);
78 gStorage->Put(offline, (*id1), &metaData);
82 AliWarning(Form("writeok = %d not enough data for equalizing",writeok));