05-jun-2007 NvE Search for attached dbase performed only once in the Exec() memberfun...
authornick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Jun 2007 11:02:22 +0000 (11:02 +0000)
committernick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Jun 2007 11:02:22 +0000 (11:02 +0000)
                of IceCalibrate and IceXtalk to speed up processing.

RALICE/icepack/IceCalibrate.cxx
RALICE/icepack/IceXtalk.cxx
RALICE/icepack/history.txt

index 5af1e47eb2c2c3129281713641725ee859b692bf..2fae197bbb1ee0658f6df67fa1576b34e2383c47 100644 (file)
@@ -83,7 +83,13 @@ void IceCalibrate::SetCalibFile(TString name)
 {
 // Set the calibration ROOT file as created with IceCal2Root.
 // Note : this will overrule a previously attached database. 
+ if (fCalfile)
+ {
+  delete fCalfile;
+  fCalfile=0;
+ }
  fCalfile=new TFile(name.Data());
+ fOmdb=0;
 }
 ///////////////////////////////////////////////////////////////////////////
 void IceCalibrate::Exec(Option_t* opt)
@@ -104,7 +110,7 @@ void IceCalibrate::Exec(Option_t* opt)
  mudaq=int(daq->GetSignal("Muon"));
  twrdaq=int(daq->GetSignal("TWR"));
 
- if (fCalfile)
+ if (!fOmdb && fCalfile)
  {
   if (mudaq)
   {
index 5641dfbd557dd07301be476b440a706853a38f8a..9f62a2559e8ddd620a00bae8a75bb9093261fc42 100644 (file)
@@ -111,7 +111,13 @@ void IceXtalk::SetCalibFile(TString name)
 {
 // Set the calibration ROOT file as created with IceCal2Root.
 // Note : this will overrule a previously attached database. 
+ if (fCalfile)
+ {
+  delete fCalfile;
+  fCalfile=0;
+ }
  fCalfile=new TFile(name.Data());
+ fOmdb=0;
 }
 ///////////////////////////////////////////////////////////////////////////
 void IceXtalk::SetMinProb(Float_t pmin)
@@ -147,7 +153,7 @@ void IceXtalk::Exec(Option_t* opt)
  // This cross talk correction processor is only for MuDaq data 
  if (!mudaq) return;
 
- if (fCalfile)
+ if (!fOmdb && fCalfile)
  {
   fOmdb=(AliObjMatrix*)fCalfile->Get("MuDaq-OMDBASE");
   // Next statement for compatibility with old calibration file format
index 525fd25c237cba09b58074ee0e81546e1d6724c1..1901396b74f15c6205a18e24f10fccc38faa10ef 100644 (file)
                 and new (MuDaq, TWRDaq, ...) calibration file format.
                 Also isolation cut in IceCleanHits modified to ignore hits from
                 the same OM.
+05-jun-2007 NvE Search for attached dbase performed only once in the Exec() memberfunction
+                of IceCalibrate and IceXtalk to speed up processing.