]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix for #91510: Reconstruction able to deal with different triggers
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Apr 2012 07:53:13 +0000 (07:53 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Apr 2012 07:53:13 +0000 (07:53 +0000)
RAW/AliRawReader.cxx
RAW/AliRawReader.h

index 22b182cee6e632b68843b5574ee776508d78de23..9d73cb9fe5e571cf38bdeac5bda7c3e97666db34 100644 (file)
@@ -72,7 +72,8 @@ AliRawReader::AliRawReader() :
   fEventNumber(-1),
   fErrorLogs("AliRawDataErrorLog",100),
   fHeaderSwapped(NULL),
-  fIsValid(kTRUE)
+  fIsValid(kTRUE),
+  fIsTriggerClassLoaded(kFALSE)
 {
 // default constructor: initialize data members
 // Allocate the swapped header in case of Mac
@@ -131,7 +132,8 @@ AliRawReader::AliRawReader(const AliRawReader& rawReader) :
   fEventNumber(-1),
   fErrorLogs("AliRawDataErrorLog",100),
   fHeaderSwapped(NULL),
-  fIsValid(rawReader.fIsValid)
+  fIsValid(rawReader.fIsValid),
+  fIsTriggerClassLoaded(rawReader.fIsTriggerClassLoaded)
 {
 // copy constructor
 // Allocate the swapped header in case of Mac
@@ -164,6 +166,7 @@ AliRawReader& AliRawReader::operator = (const AliRawReader& rawReader)
   fErrorLogs = *((TClonesArray*)rawReader.fErrorLogs.Clone());
 
   fIsValid = rawReader.fIsValid;
+  fIsTriggerClassLoaded = rawReader.fIsTriggerClassLoaded;
 
   return *this;
 }
@@ -422,6 +425,8 @@ void AliRawReader::LoadTriggerClass(const char* name, Int_t index)
 
   if (fSelectTriggerExpr.IsNull()) return;
 
+  fIsTriggerClassLoaded = kTRUE;
+
   if (index >= 0)
     fSelectTriggerExpr.ReplaceAll(name,Form("[%d]",index));
   else
@@ -468,7 +473,7 @@ Bool_t AliRawReader::IsEventSelected() const
     if ((GetClassMask() & fSelectTriggerMask) != fSelectTriggerMask) return kFALSE;
   }
 
-  if (!fSelectTriggerExpr.IsNull()) {
+  if (  fIsTriggerClassLoaded && !fSelectTriggerExpr.IsNull()) {
     TString expr(fSelectTriggerExpr);
     ULong64_t mask = GetClassMask();
     for(Int_t itrigger = 0; itrigger < 50; itrigger++) {
index e8665fa673fd81c818d5994f3259456f19cfa2cc..2a306fabaa62b35551498da991e45d39aaed4e4b 100644 (file)
@@ -208,6 +208,7 @@ class AliRawReader: public TObject {
     UShort_t SwapShort(UShort_t x) const;
 
     Bool_t           fIsValid;              // is raw-reader created successfully
+    Bool_t           fIsTriggerClassLoaded; // flags the call to LoadTriggerClass
 
     ClassDef(AliRawReader, 0) // base class for reading raw digits
 };