]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
AltroChannelSelector component moved to libAliHLTRCU
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Feb 2008 12:24:53 +0000 (12:24 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Feb 2008 12:24:53 +0000 (12:24 +0000)
HLT/RCU/AliHLTAltroChannelSelectorComponent.cxx [moved from HLT/TPCLib/AliHLTAltroChannelSelectorComponent.cxx with 98% similarity]
HLT/RCU/AliHLTAltroChannelSelectorComponent.h [moved from HLT/TPCLib/AliHLTAltroChannelSelectorComponent.h with 97% similarity]
HLT/RCU/AliHLTRCUAgent.cxx
HLT/RCU/macros/altro-channel-selection.C [moved from HLT/TPCLib/macros/altro-channel-selection.C with 63% similarity]
HLT/TPCLib/AliHLTTPCAgent.cxx
HLT/libAliHLTRCU.pkg
HLT/libAliHLTTPC.pkg

similarity index 98%
rename from HLT/TPCLib/AliHLTAltroChannelSelectorComponent.cxx
rename to HLT/RCU/AliHLTAltroChannelSelectorComponent.cxx
index e7fca5f7540295c02b07d4c2853da3c8c210e86a..7f31cad9c2d76125ee21edcfc7eb61da7bd04c75 100644 (file)
@@ -19,7 +19,7 @@
 /** @file   AliHLTAltroChannelSelectorComponent.cxx
     @author Matthias Richter
     @date   
-    @brief  A filter/selective readout component for TPC Altro data. */
+    @brief  A filter/selective readout component for Altro data. */
 
 // see header file for class documentation
 // or
@@ -29,8 +29,6 @@
 
 #include <cassert>
 #include "AliHLTAltroChannelSelectorComponent.h"
-#include "AliHLTTPCTransform.h"
-#include "AliHLTTPCDefinitions.h"
 #include "AliAltroDecoder.h"
 #include "AliAltroData.h"
 
@@ -188,6 +186,7 @@ int AliHLTAltroChannelSelectorComponent::DoEvent(const AliHLTComponentEventData&
     if (iResult<0) {
       // forward the whole block
       outputBlocks.push_back(*pDesc);
+      iResult=0;
       continue;
     }
 
similarity index 97%
rename from HLT/TPCLib/AliHLTAltroChannelSelectorComponent.h
rename to HLT/RCU/AliHLTAltroChannelSelectorComponent.h
index 03294a65a015d38be10a191026f0e2f5159abc4e..50ad0c74a461f8ae779e240de203a12f6861060e 100644 (file)
@@ -10,7 +10,7 @@
 /** @file   AliHLTAltroChannelSelectorComponent.h
     @author Matthias Richter
     @date   
-    @brief  Special file writer converting TPC digit input to ASCII.
+    @brief  A filter/selective readout component for Altro data.
 */
 
 // see below for class documentation
@@ -33,7 +33,7 @@
  * Altro Raw data.
  * 
  * Component ID: \b AltroChannelSelector <br>
- * Library: \b libAliHLTTPC
+ * Library: \b libAliHLTRCU
  *
  * Mandatory arguments: <br>
  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
index 83f60d164fab7ef0eb5f064ddc869f4cb6fe15cb..0d59618d29b531a7a1be1f1bea32d2a35b799e68 100644 (file)
@@ -27,6 +27,7 @@
 #include "AliHLTConfiguration.h"
 
 // header files of library components
+#include "AliHLTAltroChannelSelectorComponent.h"
 
 /** global instance for agent registration */
 AliHLTRCUAgent gAliHLTRCUAgent;
@@ -74,5 +75,6 @@ int AliHLTRCUAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
   // see header file for class documentation
   assert(pHandler);
   if (!pHandler) return -EINVAL;
+  pHandler->AddComponent(new AliHLTAltroChannelSelectorComponent);
   return 0;
 }
similarity index 63%
rename from HLT/TPCLib/macros/altro-channel-selection.C
rename to HLT/RCU/macros/altro-channel-selection.C
index 47f86906fd0a4b139b9791bcd366a1a12b69f1c4..e4c5cfd9db12d6bbd7c73e29b8624458c5f42504 100644 (file)
@@ -1,14 +1,24 @@
 // $Id$
-/*
+/**
  * Test macro for the AltroChannelSelector component
  *
  * Usage:
  *   aliroot -b -q altro-channel-selection.C | tee altro-channel-selection.C
  *
+ * The macro expects simulated TPC raw data in the form TPC_<ddlno>.dll in the
+ * current directory, you might need to start the macro in one of the raw<x>
+ * folders. You can easily change the sectors and readout partitions below.
+ *
+ * In order to apply the macro on real RCU v1 data (only on trailer word)
+ * you have to specify the trailer length explicitly, look for the 
+ *
  * The first version allows to write a fake file with the list of the
- * selected pads. Later it will be extended to use the ClusterFinder
+ * selected channels. Later it will be extended to use the ClusterFinder
  * or, better, a separate component.
  *
+ * Please note that this macro uses also the TPC module, but this does not
+ * imply dependencies to the libAliHLTTPC.
+ *
  * Matthias.Richter@ift.uib.no
  */
 {
 
   // load the component library
   gHLT.LoadComponentLibraries("libAliHLTTPC.so");
+  gHLT.LoadComponentLibraries("libAliHLTRCU.so");
 
   // create a dummy pad selection list
-  const char* dummySelectionList="/tmp/active-pads.dat";
+  const char* dummySelectionList="/tmp/active-channels.dat";
   FILE* fp = fopen(dummySelectionList, "w");
   if (fp) {
-    UInt_t row=0;
-    UInt_t pad=0;
+    UShort_t channel=5;
+    fwrite(&channel, sizeof(UShort_t), 1, fp);
 
-    row=28, pad=5;
-    fwrite(&row, sizeof(UInt_t), 1, fp);
-    fwrite(&pad, sizeof(UInt_t), 1, fp);
+    UShort_t channel=25;
+    fwrite(&channel, sizeof(UShort_t), 1, fp);
 
-    row=28, pad=6;
-    fwrite(&row, sizeof(UInt_t), 1, fp);
-    fwrite(&pad, sizeof(UInt_t), 1, fp);
+    UShort_t channel=56;
+    fwrite(&channel, sizeof(UShort_t), 1, fp);
 
-    row=28, pad=7;
-    fwrite(&row, sizeof(UInt_t), 1, fp);
-    fwrite(&pad, sizeof(UInt_t), 1, fp);
+    UShort_t channel=78;
+    fwrite(&channel, sizeof(UShort_t), 1, fp);
 
-    row=29, pad=42;
-    fwrite(&row, sizeof(UInt_t), 1, fp);
-    fwrite(&pad, sizeof(UInt_t), 1, fp);
-
-    row=29, pad=43;
-    fwrite(&row, sizeof(UInt_t), 1, fp);
-    fwrite(&pad, sizeof(UInt_t), 1, fp);
+    UShort_t channel=100;
+    fwrite(&channel, sizeof(UShort_t), 1, fp);
 
     fclose(fp);
   } else {
@@ -59,6 +62,9 @@
   // direct dump switch allows to bypass the selector component
   bool directDump=false;
 
+  // choose if you want to dump to file or translate digits to text file
+  bool textDump=true;
+
   // the configuration
   int iMinSlice=0; 
   int iMaxSlice=0;
@@ -80,7 +86,7 @@
 
       // publisher for a dummy active pad list
       activepads.Form("APP_%02d_%d", slice, part);
-      arg.Form("-datatype 'ACTIVPAD' 'TPC ' -dataspec 0x%02x%02x%02x%02x -datafile %s", slice, slice, part, part, dummySelectionList);
+      arg.Form("-datatype 'HWADDR16' 'TPC ' -dataspec 0x%02x%02x%02x%02x -datafile %s", slice, slice, part, part, dummySelectionList);
       AliHLTConfiguration appconf(activepads.Data(), "FilePublisher", NULL , arg.Data());
 
 
@@ -90,7 +96,7 @@
 
       // the selector configuration
       selector.Form("CHANNELSELECT_%02d_%d", slice, part);
-      AliHLTConfiguration channelselect(selector.Data(), "AltroChannelSelector", selectorInput.Data(), "-rawreadermode 4");
+      AliHLTConfiguration channelselect(selector.Data(), "AltroChannelSelector", selectorInput.Data(), "");
 
       // add either the raw file directly to output or the filtered one
       if (writerInput.Length()>0) writerInput+=" ";
   }
 
   // the writer configuration
-  AliHLTConfiguration digitdump("digitdump", "TPCDigitDump"   , writerInput.Data(), "-rawreadermode 4 -specfmt=_0x%08x -subdir=out_%d -blcknofmt=_0x%x -idfmt=_0x%08x");
-  //AliHLTConfiguration digitdump("digitdump", "FileWriter"   , writerInput.Data(), "-specfmt=_0x%08x -subdir=out_%d -blcknofmt=_0x%x -idfmt=_0x%08x");
+  if (textDump)
+    AliHLTConfiguration digitdump("digitdump", "TPCDigitDump"   , writerInput.Data(), "-specfmt=_0x%08x -subdir=out_%d -blcknofmt=_0x%x -idfmt=_0x%08x");
+  else
+    AliHLTConfiguration digitdump("digitdump", "FileWriter"   , writerInput.Data(), "-specfmt=_0x%08x -subdir=out_%d -blcknofmt=_0x%x -idfmt=_0x%08x");
+
+  // build the ask list and execute
   gHLT.BuildTaskList("digitdump");
   gHLT.Run();
 
index 230b632a1d2bf6bace4bf6b2cdd1afb99fdee1bf..e5fbd45c78d01303ed21f32763c24ee4f2b00782 100644 (file)
@@ -29,7 +29,6 @@
 AliHLTTPCAgent gAliHLTTPCAgent;
 
 // component headers
-#include "AliHLTAltroChannelSelectorComponent.h"
 #include "AliHLTTPCDigitDumpComponent.h"
 #include "AliHLTTPCEsdWriterComponent.h"
 
@@ -119,7 +118,6 @@ int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
 {
   // see header file for class documentation
   if (!pHandler) return -EINVAL;
-  pHandler->AddComponent(new AliHLTAltroChannelSelectorComponent);
   pHandler->AddComponent(new AliHLTTPCDigitDumpComponent);
   pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliWriter);
   pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliConverter);
index 0ac8b985934927085085077878a2147525043d4e..9bbf4fcf5bf86c08676361ca74c98b6eb0b52fd2 100644 (file)
@@ -3,7 +3,8 @@
 
 include $(MODDIR)/hlt.conf
 
-CLASS_HDRS:=   AliHLTRCUAgent.h
+CLASS_HDRS:=   AliHLTAltroChannelSelectorComponent.h \
+               AliHLTRCUAgent.h
 
 MODULE_SRCS=   $(CLASS_HDRS:.h=.cxx)
 
index 85a4028e3248eec7238039e6482958412ec4a9d4..5d0fe97917abe8f095fc91de4fc88630aab6254a 100644 (file)
@@ -18,7 +18,6 @@ CLASS_HDRS:=          AliHLTTPCTransform.h \
                AliHLTTPCDigitReaderRaw.h \
                AliHLTTPCDigitReaderDecoder.h \
                AliHLTTPCDigitDumpComponent.h \
-               AliHLTAltroChannelSelectorComponent.h \
                AliHLTTPCZeroSuppressionComponent.h \
                AliHLTTPCVertex.h \
                AliHLTTPCVertexArray.h \