Changes for report #74527: request to commit code under TRIGGER to handle TOF trigger...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Oct 2010 14:20:46 +0000 (14:20 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Oct 2010 14:20:46 +0000 (14:20 +0000)
TRIGGER/AliTRIPreprocessor.cxx
TRIGGER/CMakelibTRIGGERbase.pkg
TRIGGER/ShuttleInput/TOFFEElight.20101028.133932.8000 [new file with mode: 0644]
TRIGGER/TestTRIGGERPreprocessor.C
TRIGGER/libTRIGGERbase.pkg

index 421c312..a0d93c5 100644 (file)
@@ -29,6 +29,9 @@
 #include "AliCDBEntry.h"
 #include "AliLog.h"
 #include "AliITSTriggerConditions.h"
+
+#include "AliTOFFEEReader.h"
+#include "AliTOFTriggerMask.h"
           
 #include <TTimeStamp.h>
 #include <TObjString.h>
@@ -112,7 +115,7 @@ UInt_t AliTRIPreprocessor::Process(TMap* /*dcsAliasMap*/)
                &AliTRIPreprocessor::ProcessEmptyTriggerData,
                &AliTRIPreprocessor::ProcessEmptyTriggerData,
                &AliTRIPreprocessor::ProcessEmptyTriggerData,
-               &AliTRIPreprocessor::ProcessEmptyTriggerData,
+               &AliTRIPreprocessor::ProcessTOFTriggerData,
                &AliTRIPreprocessor::ProcessEmptyTriggerData,
                &AliTRIPreprocessor::ProcessEmptyTriggerData,
                &AliTRIPreprocessor::ProcessEmptyTriggerData,
@@ -247,7 +250,28 @@ Short_t AliTRIPreprocessor::ProcessTOFTriggerData()
        //
 
        Log("************** Processing TOF Trigger data... **************");
-       Log("************** Fake function **************");
+
+       const char * nameFile = GetFile(kDCS,"TofFeeLightMap", ""); 
+       AliInfo(Form("toffeeLight file name = %s",nameFile));
+       if (nameFile == NULL) {
+         return 1;
+       } 
+       AliTOFFEEReader feeReader;
+       feeReader.LoadFEElightConfig(nameFile);
+       feeReader.ParseFEElightConfig();
+       AliTOFTriggerMask triggerMask;
+       triggerMask.SetTriggerMaskArray(feeReader.GetTriggerMaskArray());
+
+       AliCDBMetaData metaData;
+       metaData.SetBeamPeriod(0);
+       metaData.SetResponsible("Roberto Preghenella");
+       metaData.SetComment("TOF trigger mask");
+       if (!Store("TOF", "TriggerMask", &triggerMask, &metaData, 0, kTRUE)) {
+         Log("error while storing TriggerMask object");
+         return 1;
+       }
+       Log("TriggerMask object successfully stored");
+
        Log("************************* ...done.*************************");
        return 0;
 }
index d3869a1..60e1da0 100644 (file)
@@ -33,7 +33,7 @@ string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
 
 set ( DHDR  TRIGGERbaseLinkDef.h)
 
-set ( EINCLUDE  TRIGGER ITS STEER)
+set ( EINCLUDE  TRIGGER ITS STEER TOF)
 
 if( ALICE_TARGET STREQUAL "win32gcc")
        
diff --git a/TRIGGER/ShuttleInput/TOFFEElight.20101028.133932.8000 b/TRIGGER/ShuttleInput/TOFFEElight.20101028.133932.8000
new file mode 100644 (file)
index 0000000..6dc0ff3
Binary files /dev/null and b/TRIGGER/ShuttleInput/TOFFEElight.20101028.133932.8000 differ
index 53ed090..f6fefbd 100644 (file)
@@ -18,6 +18,8 @@ void TestTRIGGERPreprocessor()
   // Adding test input files
   shuttle->AddInputFile(AliTestShuttle::kDCS, "TRI", "PITConditions", "", "$ALICE_ROOT/TRIGGER/ShuttleInput/pit_dumpFileSep08.txt");
 
+  shuttle->AddInputFile(AliTestShuttle::kDCS, "TRI", "TofFeeLightMap", "", "$ALICE_ROOT/TRIGGER/ShuttleInput/TOFFEElight.20101028.133932.8000");
+
   // Adding Trigger mask
   shuttle->SetInputTriggerDetectorMask("0100001");
   printf("Test OCDB storage Uri: %s\n", AliShuttleInterface::GetMainCDB().Data());
index ef1e45c..6b59ba3 100644 (file)
@@ -10,7 +10,7 @@ HDRS:= $(SRCS:.cxx=.h)
 
 DHDR:= TRIGGERbaseLinkDef.h
 
-EINCLUDE:= TRIGGER ITS STEER
+EINCLUDE:= TRIGGER ITS STEER TOF
 
 ifeq (win32gcc,$(ALICE_TARGET))
 PACKSOFLAGS:= $(SOFLAGS) -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) \