set LookUp table
authoralla <Alla.Maevskaya@cern.ch>
Fri, 21 Nov 2014 10:22:47 +0000 (11:22 +0100)
committeralla <Alla.Maevskaya@cern.ch>
Fri, 21 Nov 2014 11:06:43 +0000 (12:06 +0100)
T0/setlookUpTable.C [new file with mode: 0644]

diff --git a/T0/setlookUpTable.C b/T0/setlookUpTable.C
new file mode 100644 (file)
index 0000000..ce6c227
--- /dev/null
@@ -0,0 +1,36 @@
+void setlookUpTable()
+{
+  // Writing Lookup table into the Calibration DB
+  // Arguments:
+
+  TString DBFolder;
+  Int_t firstRun   =  200000;
+  Int_t lastRun    = 9999999;
+  Int_t beamPeriod =  1;
+  char* objFormat = "T0 Lookup Table";
+
+  AliT0CalibData *calibda=new AliT0CalibData("T0");
+
+//  calibda->ReadAsciiLookup("lookUpTable.txt");
+  calibda->ReadAsciiLookup("/home/alla/alice/AliRoot/T0/lookup_run2.txt");
+  cout<<" @@@@ TRM "<<calibda->GetNumberOfTRMs()<<endl;
+  //Store calibration data into database
+  // AliCDBManager::Instance()->SetDefaultStorage("local:///scratch/alla/alice/Aug10/TestCDB");
+   AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+   
+  //  AliCDBManager::Instance()->SetSpecificStorage("T0",DBFolder.Data());
+
+  AliCDBMetaData md;
+  md.SetComment(objFormat);
+  md.SetBeamPeriod(beamPeriod);
+  md.SetResponsible("Alla");
+  TString fPath="T0/Calib/LookUp_Table";
+
+
+  // AliCDBStorage* storage = AliCDBManager::Instance()->GetSpecificStorage("T0");
+  AliCDBStorage* storage = AliCDBManager::Instance()->GetDefaultStorage();
+  if(storage) {
+    AliCDBId id(fPath.Data(),firstRun,lastRun);
+    storage->Put(calibda, id, &md);
+  }
+}