]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding the posibility to set the participating detectors when running in AliHLTSystem.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Sep 2010 16:21:25 +0000 (16:21 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Sep 2010 16:21:25 +0000 (16:21 +0000)
HLT/BASE/AliHLTSystem.cxx
HLT/BASE/AliHLTSystem.h
HLT/BASE/AliHLTTask.cxx
HLT/BASE/AliHLTTask.h

index 3a9b5d467e8c03124f3deeb1664efe50d35834b8..fc7eec8367cb374493e41f0487293ce48730923e 100644 (file)
@@ -340,7 +340,8 @@ void AliHLTSystem::PrintTaskList()
 }
 
 int AliHLTSystem::Run(Int_t iNofEvents, int bStop, AliHLTUInt64_t trgMask,
-                     AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype)
+                     AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype,
+                     AliHLTUInt32_t participatingDetectors)
 {
   // see header file for class documentation
   int iResult=0;
@@ -366,8 +367,9 @@ int AliHLTSystem::Run(Int_t iNofEvents, int bStop, AliHLTUInt64_t trgMask,
        }
        if (eventtype == 0) {
          eventtype = gkAliEventTypeData;
+         participatingDetectors = 0x0;
        }
-       if ((iResult=ProcessTasks(i, trgMask, timestamp, eventtype))>=0) {
+       if ((iResult=ProcessTasks(i, trgMask, timestamp, eventtype, participatingDetectors))>=0) {
          fGoodEvents++;
          iCount++;
        } else {
@@ -580,7 +582,8 @@ int AliHLTSystem::StartTasks()
 }
 
 int AliHLTSystem::ProcessTasks(Int_t eventNo, AliHLTUInt64_t trgMask,
-         AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype)
+         AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype,
+         AliHLTUInt32_t participatingDetectors)
 {
   // see header file for class documentation
   int iResult=0;
@@ -590,7 +593,7 @@ int AliHLTSystem::ProcessTasks(Int_t eventNo, AliHLTUInt64_t trgMask,
     TObject* obj=lnk->GetObject();
     if (obj) {
       AliHLTTask* pTask=(AliHLTTask*)obj;
-      iResult=pTask->ProcessTask(eventNo, eventtype, trgMask, timestamp);
+      iResult=pTask->ProcessTask(eventNo, eventtype, trgMask, timestamp, participatingDetectors);
 //       ProcInfo_t ProcInfo;
 //       gSystem->GetProcInfo(&ProcInfo);
 //       HLTInfo("task %s processed (%d), current memory usage %d %d", pTask->GetName(), iResult, ProcInfo.fMemResident, ProcInfo.fMemVirtual);
index cb840ff77edbeca97921ea8d506321337cc598aa..3c649407284d22ccc80ce86f2b4148be8aa22bad 100644 (file)
@@ -206,10 +206,14 @@ class AliHLTSystem : public AliHLTLogging {
    * @param trgMask    ctp trigger mask from the rawreader
    * @param timestamp  timestamp of the event, read from the rawreader
    * @param eventtype  event type, read from the rawreader
+   * @param participatingDetectors  the bit flags of the participating detectors
+   *           as will we inserted into the Common Data Header. This should only
+   *           be used for software event types.
    * @return number of reconstructed events, neg error code if failed
    */
   int Run(Int_t iNofEvents, int bStop, AliHLTUInt64_t trgMask,
-         AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype);
+         AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype,
+         AliHLTUInt32_t participatingDetectors = 0);
 
   /**
    * Run the tasklist
@@ -274,7 +278,8 @@ class AliHLTSystem : public AliHLTLogging {
    * @return neg error code if failed
    */
   int ProcessTasks(Int_t eventNo, AliHLTUInt64_t trgMask,
-                  AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype);
+                  AliHLTUInt32_t timestamp, AliHLTUInt32_t eventtype,
+                  AliHLTUInt32_t participatingDetectors = 0);
 
   /**
    * Stop task list.
index 9bb842d6f20eb867d79c5043818046eace81f642..ad50928fa1c45a312aca999c27d8bc18efc90f68 100644 (file)
@@ -450,7 +450,8 @@ int AliHLTTask::EndRun()
   return iResult;
 }
 
-int AliHLTTask::ProcessTask(Int_t eventNo, AliHLTUInt32_t eventType, AliHLTUInt64_t trgMask, AliHLTUInt32_t timestamp)
+int AliHLTTask::ProcessTask(Int_t eventNo, AliHLTUInt32_t eventType, AliHLTUInt64_t trgMask,
+                           AliHLTUInt32_t timestamp, AliHLTUInt32_t participatingDetectors)
 {
   // see header file for function documentation
   int iResult=0;
@@ -580,7 +581,8 @@ int AliHLTTask::ProcessTask(Int_t eventNo, AliHLTUInt32_t eventType, AliHLTUInt6
       trigData.fStructSize=sizeof(trigData);
       trigData.fDataSize=sizeof(AliHLTEventTriggerData);
       memset(&evtTrigData, 0, trigData.fDataSize);
-      // Setup the CDH in the trigger data, based on the event type and CTP trigger.
+      // Setup the CDH in the trigger data, based on the event type, CTP trigger
+      // mask and participating detectors.
       evtTrigData.fCommonHeaderWordCnt=gkAliHLTCommonHeaderCount;
       AliHLTUInt8_t l1msg = 0x0;
       switch (eventType)
@@ -593,6 +595,7 @@ int AliHLTTask::ProcessTask(Int_t eventNo, AliHLTUInt32_t eventType, AliHLTUInt6
       case gkAliEventTypeSoftware:    l1msg = 0x01; break;
       }
       evtTrigData.fCommonHeader[1] = AliHLTUInt32_t(l1msg) << 14;
+      evtTrigData.fCommonHeader[3] = ((l1msg & 0x1) == 0x1) ? (participatingDetectors & 0xFFFFFF) : 0x0;
       evtTrigData.fCommonHeader[5]=trgMask&0xffffffff;
       trgMask>>=32;
       evtTrigData.fCommonHeader[6]=trgMask&0x3ffff;
index 26cd21d77fb38d516d526b2eb3d45cee0c75d1fe..01a72dec49da5e67efbb043507d4b8431d995490 100644 (file)
@@ -207,7 +207,8 @@ class AliHLTTask : public TObject, public AliHLTLogging {
    * The @ref StartRun method must be called before.
    */
   int ProcessTask(Int_t eventNo, AliHLTUInt32_t eventType,
-                 AliHLTUInt64_t trgMask, AliHLTUInt32_t timestamp);
+                 AliHLTUInt64_t trgMask, AliHLTUInt32_t timestamp,
+                 AliHLTUInt32_t participatingDetectors = 0);
 
   /**
    * Determine the number of matching data block between the component and the
@@ -329,7 +330,7 @@ class AliHLTTask : public TObject, public AliHLTLogging {
    */
   vector<AliHLTComponentBlockData> fBlockDataArray;               //! transient
 
-  ClassDef(AliHLTTask, 2);
+  ClassDef(AliHLTTask, 0);
 };
 
 #endif