]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
06-jun-2007 NvE Explicit tests on null pointers for returned TObjArray* from e.g...
authornick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Jun 2007 13:16:01 +0000 (13:16 +0000)
committernick <nick@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Jun 2007 13:16:01 +0000 (13:16 +0000)
                introduced in the .cxx files of IceCalibrate, IceChi2, IceCleanHits, IceDwalk,
                IceDwalkx, IceLinefit, IceMakeHits, IcePandel and IceXtalk to prevent
                problems with empty events.
06-jun-2007 NvE Maximum OM id changed from 677 to 681 in IceRawTWR.cxx.

12 files changed:
RALICE/icepack/IceCalibrate.cxx
RALICE/icepack/IceChi2.cxx
RALICE/icepack/IceCleanHits.cxx
RALICE/icepack/IceDwalk.cxx
RALICE/icepack/IceDwalkx.cxx
RALICE/icepack/IceLinefit.cxx
RALICE/icepack/IceMakeHits.cxx
RALICE/icepack/IcePandel.cxx
RALICE/icepack/IceXtalk.cxx
RALICE/icepack/history.txt
RALICE/icepack/iceconvert/IceRawTWR.cxx
RALICE/icepack/iceconvert/history.txt

index 2fae197bbb1ee0658f6df67fa1576b34e2383c47..956923fb55c11a5716e4c5686b5ddc91de1c5440 100644 (file)
@@ -132,6 +132,7 @@ void IceCalibrate::Exec(Option_t* opt)
 
  // All OMs with a signal
  TObjArray* mods=evt->GetDevices("IceGOM");
+ if (!mods) return;
 
  Int_t nmods=mods->GetEntries();
  if (!nmods) return;
index 44b9d0e1aba5f2c36df7e57ef2feded3d375ed52..4e00483af9d6797621590dc9b2b2618b53fac673 100644 (file)
@@ -283,6 +283,7 @@ void IceChi2::Exec(Option_t* opt)
  if (fSelhits==0)
  {
   TObjArray* hits=fEvt->GetHits("IceGOM");
+  if (!hits) return;
   for (Int_t ih=0; ih<hits->GetEntries(); ih++)
   {
    AliSignal* sx=(AliSignal*)hits->At(ih);
@@ -331,7 +332,8 @@ void IceChi2::Exec(Option_t* opt)
   str=strx->GetString();
   ntkmax=fUseNtk->At(iclass);
   TObjArray* tracks=fEvt->GetTracks(str);
-  ntk=tracks->GetEntries();
+  ntk=0;
+  if (tracks) ntk=tracks->GetEntries();
   if (ntkmax>0 && ntk>ntkmax) ntk=ntkmax;
 
   for (Int_t jtk=0; jtk<ntk; jtk++) // Loop over tracks of a certain class
index 24b1238c458dfb8d281847bcacbcabbe97a8e46c..e7e80569bffc105c11742f5aeeb69ef5fcc23c23 100644 (file)
@@ -208,6 +208,7 @@ void IceCleanHits::Amanda()
 
  // All Amanda OMs with a signal
  TObjArray* aoms=fEvt->GetDevices("IceAOM");
+ if (!aoms) return;
 
  // Local OM array with bad/dead OMs (as indicated via IceCalibrate) discarded
  TObjArray oms;
index ec487d3704a4761718b613e34ef9c4df2749941f..683601553420687535ed8e3c34e6999c1c661890 100644 (file)
@@ -504,6 +504,7 @@ void IceDwalk::Exec(Option_t* opt)
 
  // Fetch all fired Amanda OMs for this event
  TObjArray* aoms=evt->GetDevices("IceAOM");
+ if (!aoms) return;
  Int_t naoms=aoms->GetEntries();
  if (!naoms) return;
 
index d82f45ef1b668a20b9539c6c913aade531b03860..50875df60b0ed5b9fdc9fb87d78d9e619e7b54d3 100644 (file)
@@ -453,6 +453,7 @@ void IceDwalkx::Exec(Option_t* opt)
 
  // Fetch all fired Amanda OMs for this event
  TObjArray* aoms=evt->GetDevices("IceAOM");
+ if (!aoms) return;
  Int_t naoms=aoms->GetEntries();
  if (!naoms) return;
 
index 7cd532fe7cae8e30e2abb569d5da1e6869ce5f36..f831b96f0f06a5278aabbc7638344547fb68dbc3 100644 (file)
@@ -176,6 +176,7 @@ void IceLinefit::Exec(Option_t* opt)
 
  // Fetch all fired Amanda OMs for this event
  TObjArray* aoms=evt->GetDevices("IceAOM");
+ if (!aoms) return;
  Int_t naoms=aoms->GetEntries();
  if (!naoms) return;
 
index e48fd051af1ee59df52fa2ca9db84bdd82ec2bda..b6a16c7b0f4f22d3743114db5eac3505baff39db 100644 (file)
@@ -203,6 +203,7 @@ void IceMakeHits::Amanda()
 
  // All Amanda OMs with a signal
  TObjArray* aoms=fEvt->GetDevices("IceAOM");
+ if (!aoms) return;
 
  // OM, waveform and hit
  IceAOM* omx=0;
index 0f5a6e15432b15639f29d6afe04afb768bd19e19..22dc9d718d14a5f8ba04cf62dc3ee7fdab1d32c3 100644 (file)
@@ -288,6 +288,7 @@ void IcePandel::Exec(Option_t* opt)
  if (fSelhits==0)
  {
   TObjArray* hits=fEvt->GetHits("IceGOM");
+  if (!hits) return;
   for (Int_t ih=0; ih<hits->GetEntries(); ih++)
   {
    AliSignal* sx=(AliSignal*)hits->At(ih);
@@ -335,7 +336,8 @@ void IcePandel::Exec(Option_t* opt)
   str=strx->GetString();
   ntkmax=fUseNtk->At(iclass);
   TObjArray* tracks=fEvt->GetTracks(str);
-  ntk=tracks->GetEntries();
+  ntk=0;
+  if (tracks) ntk=tracks->GetEntries();
   if (ntkmax>0 && ntk>ntkmax) ntk=ntkmax;
 
   for (Int_t jtk=0; jtk<ntk; jtk++) // Loop over tracks of a certain class
@@ -646,7 +648,6 @@ void IcePandel::FitFCN(Int_t&,Double_t*,Double_t& f,Double_t* x,Int_t)
  Int_t ier;
  Double_t psihit=0;
  fPsistats.Reset();
-//@@@ for (Int_t i=1; i<=nhits; i++)
  for (Int_t i=0; i<nhits; i++)
  {
   AliSignal* sx=(AliSignal*)fHits->At(i);
index 9f62a2559e8ddd620a00bae8a75bb9093261fc42..35159ef57ef3e3d6d363292888a4beec1ea32253 100644 (file)
@@ -175,7 +175,7 @@ void IceXtalk::Exec(Option_t* opt)
 
  // All Amanda OMs with a signal
  TObjArray* mods=evt->GetDevices("IceAOM");
-
+ if (!mods) return;
  Int_t nmods=mods->GetEntries();
  if (!nmods) return;
 
index 1901396b74f15c6205a18e24f10fccc38faa10ef..baa664954c8491583546f357a6ecfbab259d6d64 100644 (file)
                 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.
+06-jun-2007 NvE Explicit tests on null pointers for returned TObjArray* from e.g. GetHits()
+                introduced in the .cxx files of IceCalibrate, IceChi2, IceCleanHits, IceDwalk,
+                IceDwalkx, IceLinefit, IceMakeHits, IcePandel and IceXtalk to prevent
+                problems with empty events.
                  
index 4aede8d32f07d1b3ad7c4ca06ce645e12a420b78..b4db46b1677084286f932163fd68bd4b2758e117 100644 (file)
@@ -408,7 +408,7 @@ void IceRawTWR::PutWaveforms(Int_t year)
  IceAOM om;
  IceAOM* omx=0;
  Int_t omid;
- Int_t omidmax=677;
+ Int_t omidmax=681;
  Int_t error;
  Float_t baseline;
  Int_t nfrags;
index a70d28fdbb62dcd31087b6854332ab5d2e7ee326..32b4397b4cd56825de1c56bb9c79c0b30bc5a8f8 100644 (file)
 30-mar-2007 GdV Obsolete memberfunction declarations PutTrigger and PutWaveforms removed
                 from IceRoot.h.
 01-jun-2007 NvE Class IceCal2Root extended to support various databases (e.g. MuDaq, TWRDaq, ...).
+06-jun-2007 NvE Maximum OM id changed from 677 to 681 in IceRawTWR.cxx.