-// @(#) $Id$
+// $Id$
//**************************************************************************
//* This file is property of and copyright by the ALICE HLT Project *
ClassImp(AliHLTBlockFilterComponent)
AliHLTBlockFilterComponent::AliHLTBlockFilterComponent()
- :
- fFilterRules()
+ : AliHLTProcessor()
+ , fFilterRules()
+ , fPrescalar(0)
+ , fFirstEvent(0)
{
// see header file for class documentation
// or
{
// see header file for class documentation
if (fFilterRules.size()==1) return fFilterRules[0].fDataType;
- if (fFilterRules.size()==0) return kAliHLTVoidDataType;
+ if (fFilterRules.size()==0) return kAliHLTAnyDataType;
return kAliHLTMultipleDataType;
}
HLTError("invalid parameter/remnant (%s) for argument %s, number expected", pRemnant, argument.Data());
iResult=-EINVAL;
}
+ // -prescalar
+ } else if (argument.CompareTo("-prescalar")==0) {
+ if ((bMissingParam=(++i>=argc))) break;
+ TString parameter(argv[i]);
+ fPrescalar=parameter.Atoi();
+ // -skip-events
+ } else if (argument.CompareTo("-skip-events")==0) {
+ if ((bMissingParam=(++i>=argc))) break;
+ TString parameter(argv[i]);
+ fFirstEvent=parameter.Atoi();
} else {
HLTError("unknown argument %s", argument.Data());
iResult=-EINVAL;
{
// see header file for class documentation
int iResult=0;
+ if ((fPrescalar==0 || ((GetEventCount())%fPrescalar)==0) &&
+ GetEventCount()>=(int)fFirstEvent) {
for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock();
pBlock!=NULL;
pBlock=GetNextInputBlock()) {
HLTDebug("block type %s %#x discarded by filter rules", DataType2Text(pBlock->fDataType).c_str(), pBlock->fSpecification);
}
}
+ }
size=0;
return iResult;
}