]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added additional option to skip or fake empty data blocks
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Jan 2008 09:05:45 +0000 (09:05 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Jan 2008 09:05:45 +0000 (09:05 +0000)
HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx
HLT/BASE/util/AliHLTRawReaderPublisherComponent.h

index 7850ca7ffc87fcc47b2e6ea7f88bb41feb900d24..e552133bce90e75ae0408bcb488bc50806aabccf 100644 (file)
@@ -46,7 +46,8 @@ AliHLTRawReaderPublisherComponent::AliHLTRawReaderPublisherComponent()
   fMaxEquId(-1),
   fVerbose(kFALSE),
   fDataType(kAliHLTVoidDataType),
-  fSpecification(kAliHLTVoidDataSpec)
+  fSpecification(kAliHLTVoidDataSpec),
+  fSkipEmpty(kFALSE)
 {
   // see header file for class documentation
   // or
@@ -131,6 +132,10 @@ int AliHLTRawReaderPublisherComponent::DoInit( int argc, const char** argv )
     } else if (argument.CompareTo("-verbose")==0) {
       fVerbose=kTRUE;
 
+      // -skipempty
+    } else if (argument.CompareTo("-skipempty")==0) {
+      fSkipEmpty=kTRUE;
+
       // -datatype
     } else if (argument.CompareTo("-datatype")==0) {
       if ((bMissingParam=(++i>=argc))) break;
@@ -213,7 +218,11 @@ int AliHLTRawReaderPublisherComponent::GetEvent(const AliHLTComponentEventData&
   if (pRawReader) {
     pRawReader->Reset();
     pRawReader->SelectEquipment(-1, fMinEquId, fMaxEquId);
-    AliInfo(Form("get event from RawReader %p equipment id range [%d,%d]", pRawReader, fMinEquId, fMaxEquId));
+    if (fVerbose) {
+      AliInfo(Form("get event from RawReader %p equipment id range [%d,%d]", pRawReader, fMinEquId, fMaxEquId));
+    } else {
+      AliDebug(0, Form("get event from RawReader %p equipment id range [%d,%d]", pRawReader, fMinEquId, fMaxEquId));
+    }
     list<int> processedIds;
     while (pRawReader->ReadHeader() && (iResult>=0 || iResult==-ENOSPC)) {
       const AliRawDataHeader* pHeader=pRawReader->GetDataHeader();
@@ -254,7 +263,7 @@ int AliHLTRawReaderPublisherComponent::GetEvent(const AliHLTComponentEventData&
       }
       offset+=readSize;
     }
-    if (processedIds.size()!=size_t(fMaxEquId-fMinEquId+1)) {
+    if (!fSkipEmpty && processedIds.size()!=size_t(fMaxEquId-fMinEquId+1)) {
       // add further empty data blocks
       AliRawDataHeader header;
       header.fSize=sizeof(AliRawDataHeader);
index 339581b3590de35560f6d1b936b17f935fdcb596..fd4cdcb8fe768eacd676b4675b676678989757b6 100644 (file)
@@ -49,6 +49,9 @@
  *      the maximum equipmentid including detector offset (default = minid)
  * \li -verbose<br>
  *      print out some more info messages, mainly for the sake of tutorials
+ * \li -skipempty
+ *      skip all empty ddls in the specified range; by default, the component
+ *      generates and inserts empty data blocks
  * \li -datatype     <i> datatype   dataorigin </i> <br>
  *      data type ID and origin, e.g. <tt>-datatype DIGITS TPC </tt>
  * \li -dataspec     <i> specification </i> <br>
@@ -159,7 +162,10 @@ class AliHLTRawReaderPublisherComponent : public AliHLTOfflineDataSource {
   /** data specification */
   AliHLTUInt32_t          fSpecification;                          //!transient
 
-  ClassDef(AliHLTRawReaderPublisherComponent, 0);
+  /** skip the generation of empty data blocks */
+  Bool_t                  fSkipEmpty;                              //!transient
+
+  ClassDef(AliHLTRawReaderPublisherComponent, 1);
 };
 
 #endif