]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
defining chain for running the AltroChannelSelection component; bugfix: default end...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 17 Sep 2011 21:41:32 +0000 (21:41 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 17 Sep 2011 21:41:32 +0000 (21:41 +0000)
HLT/RCU/AliHLTAltroChannelSelectorComponent.cxx
HLT/RCU/AliHLTAltroChannelSelectorComponent.h
HLT/RCU/AliHLTRCUAgent.cxx

index c25afbed9f843fff86746a8789c6c52ef2f0448d..33aff3a6c7ba6e6e9084d31542931e881ff991f4 100644 (file)
@@ -40,7 +40,7 @@ AliHLTAltroChannelSelectorComponent::AliHLTAltroChannelSelectorComponent()
   fSkipCorrupted(true),
   fTalkative(false),
   fStartTimeBin(0),
   fSkipCorrupted(true),
   fTalkative(false),
   fStartTimeBin(0),
-  fEndTimeBin(0),
+  fEndTimeBin(1024),
   fSignalThreshold(0),
   fRMSThreshold(0)
 {
   fSignalThreshold(0),
   fRMSThreshold(0)
 {
index f541e6eeb8cec439bcad3025fb1dd4e6b3b38dd5..45ab165395f629f22f07393bc64a506a8cc10449 100644 (file)
 /**
  * @class AliHLTAltroChannelSelectorComponent
  * A selector component for ALTRO Raw data. The component subscribes
 /**
  * @class AliHLTAltroChannelSelectorComponent
  * A selector component for ALTRO Raw data. The component subscribes
- * to the RAW data {***:DDL_RAW } and gets in addition a list of channels
- * to select. The list must be of identical specification as the RAW data
- * and can be of data type:
- * - {***:HWADDR16}: 16 bit hardware addresses
+ * to the RAW data {***:DDL_RAW }, and produces the same raw data block
+ * with only the selected ALTRO channels.                               <br>
+ * Three different modes are supported:
+ * - -signal-threshold                                                  <br>
+ *   the average of all signals in the channel is calculated and it is
+ *   selected when the maximum signal exceeds average+threshold
+ * - -rms-threshold                                                     <br>
+ *   the implemented logic needs to be checked, never been used
+ * - list of channels to select. 
+ *   The list must be of identical specification as the RAW data and of
+ *   data type {***:HWADDR16}: 16 bit hardware addresses
  *
  *
- * In Oct 2008 the component has been extended in order to select channels
- * by calculating average/sigma and applying thresholds.
  *
  * The AliAltroRawStreamV3 is used as input decoder to read and scan the
  * Altro Raw data.
  *
  * The AliAltroRawStreamV3 is used as input decoder to read and scan the
  * Altro Raw data.
index 82e66b67aa0e23dc629c70b23346449b8107a096..79b1e9400bbd273e436a9161bdf61063ff5529a0 100644 (file)
 //* provided "as is" without express or implied warranty.                  *
 //**************************************************************************
 
 //* provided "as is" without express or implied warranty.                  *
 //**************************************************************************
 
-/** @file   AliHLTRCUAgent.cxx
-    @author Matthias Richter
-    @date   
-    @brief  Agent of the libAliHLTRCU library
-*/
+/// @file   AliHLTRCUAgent.cxx
+/// @author Matthias Richter
+/// @date   
+/// @brief  Agent of the libAliHLTRCU library
+///
 
 #include <cassert>
 #include "AliHLTRCUAgent.h"
 
 #include <cassert>
 #include "AliHLTRCUAgent.h"
+#include "AliHLTDAQ.h"
 
 // header files of library components
 #include "AliHLTAltroChannelSelectorComponent.h"
 
 // header files of library components
 #include "AliHLTAltroChannelSelectorComponent.h"
@@ -36,8 +37,7 @@ AliHLTRCUAgent gAliHLTRCUAgent;
 ClassImp(AliHLTRCUAgent)
 
 AliHLTRCUAgent::AliHLTRCUAgent()
 ClassImp(AliHLTRCUAgent)
 
 AliHLTRCUAgent::AliHLTRCUAgent()
-  :
-  AliHLTModuleAgent("RCU")
+  : AliHLTModuleAgent("RCU")
 {
   // see header file for class documentation
   // or
 {
   // see header file for class documentation
   // or
@@ -51,11 +51,46 @@ AliHLTRCUAgent::~AliHLTRCUAgent()
   // see header file for class documentation
 }
 
   // see header file for class documentation
 }
 
-int AliHLTRCUAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
-                                         AliRawReader* /*rawReader*/,
-                                         AliRunLoader* /*runloader*/) const
+int AliHLTRCUAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
+                                        AliRawReader* rawReader,
+                                        AliRunLoader* runloader) const
 {
 {
-  // see header file for class documentation
+  // add configurations for the RCU library
+  if (handler) {
+    if (rawReader) {
+      // AliSimulation: use the AliRawReaderPublisher if the raw reader is available
+      // Alireconstruction: indicated by runloader==NULL, run always on raw data
+      int iMinSlice=0; 
+      int iMaxSlice=35;
+      int iMinPart=0;
+      int iMaxPart=5;
+      TString sinkChannelSelectors;
+      for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
+       for (int part=iMinPart; part<=iMaxPart; part++) {
+         TString arg, publisher, selector;
+
+         // publisher component
+         int ddlno=AliHLTDAQ::DdlIDOffset(3);
+         if (part>1) ddlno+=72+4*slice+(part-2);
+         else ddlno+=2*slice+part;
+         
+         publisher.Form("RCU-DP_%02d_%d", slice, part);
+         arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC '  -dataspec %s -silent", ddlno, AliHLTDAQ::HLTSpecificationFromDdlID(ddlno).c_str());
+         handler->CreateConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
+
+         // selector component
+         selector.Form("RCU-chselector_%02d_%d", slice, part);
+         arg="-signal-threshold 1";
+         handler->CreateConfiguration(selector.Data(), "AltroChannelSelector", publisher.Data(), arg.Data());
+
+
+         if (sinkChannelSelectors.Length()>0) sinkChannelSelectors+=" ";
+         sinkChannelSelectors+=selector;
+       }
+      }
+      handler->CreateConfiguration("RCU-channelselect", "BlockFilter", sinkChannelSelectors.Data(), "");
+    }
+  }
   return 0;
 }
 
   return 0;
 }