]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliCentralTrigger.cxx
Restored functionality
[u/mrichter/AliRoot.git] / STEER / AliCentralTrigger.cxx
index 3b15190fa9f69251a9c884ffd00bde817fff6718..41d581e94ad284681fda05378552b0327014135f 100644 (file)
@@ -58,7 +58,9 @@ ClassImp( AliCentralTrigger )
 //_____________________________________________________________________________
 AliCentralTrigger::AliCentralTrigger() :
    TObject(),
-   fClassMask(0)
+   fClassMask(0),
+   fDescriptors(),
+   fInputs()
 {
    // Default constructor
 //   LoadDescriptor("Pb-Pb");
@@ -67,7 +69,9 @@ AliCentralTrigger::AliCentralTrigger() :
 //_____________________________________________________________________________
 AliCentralTrigger::AliCentralTrigger( TString & descriptor ) :
    TObject(),
-   fClassMask(0)
+   fClassMask(0),
+   fDescriptors(),
+   fInputs()
 {
    // Default constructor
    LoadDescriptor( descriptor );
@@ -76,7 +80,9 @@ AliCentralTrigger::AliCentralTrigger( TString & descriptor ) :
 //_____________________________________________________________________________
 AliCentralTrigger::AliCentralTrigger( const AliCentralTrigger& ctp ):
    TObject( ctp ),
-   fClassMask( ctp.fClassMask )
+   fClassMask( ctp.fClassMask ),
+   fDescriptors(),
+   fInputs()
 {
    // Copy constructor
 
@@ -195,6 +201,34 @@ TString AliCentralTrigger::GetDetectors()
    return result;
 }
 
+//_____________________________________________________________________________
+UChar_t AliCentralTrigger::GetClusterMask()
+{
+   // Return the detector cluster mask following
+   // table 4.3 pag 60, TDR Trigger and DAQ
+
+   TString detStr = GetDetectors();
+   TObjArray* det = detStr.Tokenize(" ");
+   Int_t ndet = det->GetEntriesFast();
+
+   UInt_t idmask = 0;
+   if( ndet >= 8 ) {  // All detectors, should be 9 but ACORDE is not implemented yet
+      idmask = 1;
+      return idmask;
+   }
+
+   if( ndet >= 7 && !detStr.Contains("MUON") ) {  // Central Barrel, All but MUON
+      idmask = 2;
+      return idmask;
+   }
+
+   if( detStr.Contains("MUON") && detStr.Contains("T0") ) {  // MUON arm
+      idmask = 4;
+      return idmask;
+   }
+
+   return idmask; // 0 something else!!!
+}
 //_____________________________________________________________________________
 Bool_t AliCentralTrigger::RunTrigger( AliRunLoader* runLoader )
 {
@@ -280,7 +314,7 @@ Bool_t AliCentralTrigger::RunTrigger( AliRunLoader* runLoader )
       if( (detStr.CompareTo( "ALL" ) != 0) && !detStr.IsNull() ) {
          AliError( Form("the following detectors were not found: %s",
                    detStr.Data()));
-         return kFALSE;
+         //JF return kFALSE;
       }
 
       // Save trigger mask
@@ -299,7 +333,7 @@ Bool_t AliCentralTrigger::RunTrigger( AliRunLoader* runLoader )
 }
 
 //_____________________________________________________________________________
-Long_t AliCentralTrigger::CheckConditions()
+ULong64_t AliCentralTrigger::CheckConditions()
 {
    // Check trigger conditions and create the trigger class mask
 
@@ -309,7 +343,10 @@ Long_t AliCentralTrigger::CheckConditions()
       Int_t ncond = condArray->GetEntriesFast();
       for( Int_t j=0; j<ncond; j++ ) {
          AliTriggerCondition* cond = (AliTriggerCondition*)condArray->At( j );
-         if( !cond->CheckInputs( fInputs ) ) continue;
+         if( !cond->CheckInputs( fInputs ) ) {
+          AliError( Form("Condition %s is not OK",cond->GetName()));
+        //JF continue;
+        }
          cond->Trigger( fInputs );
     //     cond->Print();
          fClassMask |= cond->GetValue();