From: richterm Date: Fri, 11 Jan 2008 09:05:45 +0000 (+0000) Subject: added additional option to skip or fake empty data blocks X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=4eb069ae9b208d7471eab41752ef69d05da72f88;p=u%2Fmrichter%2FAliRoot.git added additional option to skip or fake empty data blocks --- diff --git a/HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx b/HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx index 7850ca7ffc8..e552133bce9 100644 --- a/HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx +++ b/HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx @@ -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 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); diff --git a/HLT/BASE/util/AliHLTRawReaderPublisherComponent.h b/HLT/BASE/util/AliHLTRawReaderPublisherComponent.h index 339581b3590..fd4cdcb8fe7 100644 --- a/HLT/BASE/util/AliHLTRawReaderPublisherComponent.h +++ b/HLT/BASE/util/AliHLTRawReaderPublisherComponent.h @@ -49,6 +49,9 @@ * the maximum equipmentid including detector offset (default = minid) * \li -verbose
* 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 datatype dataorigin
* data type ID and origin, e.g. -datatype DIGITS TPC * \li -dataspec specification
@@ -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