Updates for unit testing software triggers.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Oct 2010 23:56:29 +0000 (23:56 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Oct 2010 23:56:29 +0000 (23:56 +0000)
HLT/trigger/test/TriggerConfig.C
HLT/trigger/test/testGlobalTriggerComponent.C

index 8fdec80..998cd23 100644 (file)
@@ -112,7 +112,7 @@ void SoftwareTriggersTestConfig()
        config.AddSymbol("domainSPD", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"*******:SPD\")");
        config.AddItem(5, "START_OF_DATA", "START_OF_DATA", "Start of data");
        config.AddItem(4, "END_OF_DATA", "END_OF_DATA", "End of data");
-       config.AddItem(3, "SOFTWARE", "domainSPD", "Software trigger");
+       config.AddItem(3, "SOFTWARE", "domainSPD | SOFTWARE", "Software trigger");
        config.AddItem(2, "CALIBRATION", "domainPHOS", "Calibration trigger");
        config.AddItem(1, "triggerMUON", "triggerMUON", "MUON trigger");
 }
index dfddbee..62dead9 100644 (file)
@@ -308,11 +308,19 @@ void RunTriggerSW(int config = 0, bool usecint = false, bool debug = false, cons
        );
        sys.Run(
                1,   // Number of events to process.
-               1,   // Stop chain at end of run.
+               0,   // Stop chain at end of run.
                0x1, // Active CTP trigger mask.
                0,   // Time stamp.
                0    // Event type.
        );
+       sys.Run(
+               1,   // Number of events to process.
+               1,   // Stop chain at end of run.
+               0x1, // Active CTP trigger mask.
+               0,   // Time stamp.
+               gkAliEventTypeSoftware,  // Event type.
+               AliHLTReadoutList::kTPC
+       );
 }
 
 /**
@@ -828,9 +836,8 @@ bool CheckSoftwareTriggerTestConfig(const char* testName = "Software trigger con
        bool result = false;
        
        AliHLTTriggerDomain domainPHOS("*******:PHOS");
-       domainPHOS.Remove(AliHLTReadoutList("PHOS"));
        AliHLTTriggerDomain domainSPD("*******:SPD");
-       domainSPD.Remove(AliHLTReadoutList("ITSSPD"));
+       AliHLTTriggerDomain domainTPC("DAQRDOUT:TPC");
        AliHLTTriggerDomain domainMUON("TRACKS:MUON");
        domainMUON.Add(AliHLTReadoutList("MUONTRK MUONTRG"));
 
@@ -867,12 +874,19 @@ bool CheckSoftwareTriggerTestConfig(const char* testName = "Software trigger con
        if (! result) goto cleanup;
        
        decision = dynamic_cast<AliHLTGlobalTriggerDecision*>(file->Get("HLTGlobalTrigger;5"));
-       result = Check(testName, 5, decision, true, AliHLTTriggerDomain(), "End of data");
+       result = Check(testName, 5, decision, true, domainSPD|domainTPC, "Software trigger");
        if (! result) goto cleanup;
-       expectedCounters[1] = 1; expectedCounters[5] = 5;
+       expectedCounters[2] = 2; expectedCounters[5] = 5;
        result = CheckCounters(testName, 5, decision, expectedCounters);
        if (! result) goto cleanup;
        
+       decision = dynamic_cast<AliHLTGlobalTriggerDecision*>(file->Get("HLTGlobalTrigger;6"));
+       result = Check(testName, 6, decision, true, AliHLTTriggerDomain(), "End of data");
+       if (! result) goto cleanup;
+       expectedCounters[1] = 1; expectedCounters[5] = 6;
+       result = CheckCounters(testName, 6, decision, expectedCounters);
+       if (! result) goto cleanup;
+       
        delete file;
        return true;