]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Protection in case of missing hit (alpha)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Jan 2004 18:38:52 +0000 (18:38 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Jan 2004 18:38:52 +0000 (18:38 +0000)
START/AliSTARTDigitizer.cxx

index 1241418b0d58b1176e5740f3eb7768e8501c34ac..43a5a414aaf26b54774b5e52878898b56e91cf7b 100644 (file)
@@ -23,6 +23,7 @@
 #include <TRandom.h>
 #include <TArrayI.h>
 #include <TH1.h>
+#include <TError.h>
 
 
 #include "AliSTARTDigitizer.h"
@@ -195,6 +196,10 @@ void AliSTARTDigitizer::Exec(Option_t* /*option*/)
       //  cout<<" brHits hits "<<nhits<<endl;
       for (hit=0;hit<nhits;hit++) {
        startHit   = (AliSTARThit*) fHits->UncheckedAt(hit);
+       if (!startHit) {
+         ::Error("Exec","The unchecked hit doesn't exist");
+         break;
+       }
        pmt=startHit->Pmt();
        volume = startHit->Volume();
        if(volume==1){