if (iResult<0) return iResult;
- if (fDetector.IsNull()) {
- AliErrorStream() << "detector required, use \'-detector\' option" << endl;
- return -EINVAL;
- }
-
if (fMinEquId>fMaxEquId) fMaxEquId=fMinEquId;
if (fMinEquId<0) {
return -EINVAL;
}
+ if (!fDetector.IsNull()) {
+ AliErrorStream() << "option \'-detector\' not implemented" << endl;
+ return -ENOSYS;
+ }
+
AliHLTUInt32_t dummy;
if (fMinEquId!=fMaxEquId && GetSpecificationFromEquipmentId(0, dummy)==-ENOSYS) {
AliWarningStream() << "publication of multiple equipment ids needs implementation of a child and function GetSpecificationFromEquipmentId to set correct specifications" << endl;
AliRawReader* pRawReader=GetRawReader();
if ((pRawReader=GetRawReader())!=NULL) {
- pRawReader->Select(fDetector.Data(), fMinEquId, fMaxEquId);
- if (!pRawReader->RewindEvents()) {
- AliWarning(Form("can not rewind RawReader %p", pRawReader));
- }
+ pRawReader->SelectEquipment(-1, fMinEquId, fMaxEquId);
} else {
AliErrorStream() << "RawReader instance needed" << endl;
return -EINVAL;
int iResult=0;
int offset=0;
AliHLTUInt8_t* pTgt=outputPtr;
- assert(outputPtr!=NULL);
+ assert(outputPtr!=NULL || size==0);
AliRawReader* pRawReader=GetRawReader();
if (pRawReader) {
AliInfo(Form("get event from RawReader %p", pRawReader));
while (pRawReader->ReadHeader() && (iResult>=0 || iResult==-ENOSPC)) {
int readSize=pRawReader->GetDataSize();
int id=pRawReader->GetEquipmentId();
- AliInfo(Form("got header for id %d, size %d", readSize, id));
+ AliInfo(Form("got header for id %d, size %d", id, readSize));
if (fMinEquId<id || fMaxEquId>id) {
AliError(Form("id %d returned from RawReader is outside range [%d,%d]", id, fMinEquId, fMaxEquId));
continue;
break;
}
} else {
+ // we keep the loop going in order to collect the full size
fMaxSize=offset+readSize;
iResult=-ENOSPC;
}
offset+=readSize;
}
// go to next event, or beginning if last event was processed
- if (pRawReader->NextEvent()) {
- pRawReader->RewindEvents();
- }
+// if (pRawReader->NextEvent()) {
+// pRawReader->RewindEvents();
+// }
if (offset<=size) size=offset;
} else {
AliErrorStream() << "RawReader uninitialized" << endl;
* @class AliHLTRawReaderPublisherComponent
* A general data publisher component for the AliRawReader.
* The component publishs the data of a given detector and equipment ID.
+ *
* Publication of several IDs, i.e. DDLs, requires derivation of
* the data type and/or specification from the ID. This requires a child
* class and implementation of @ref GetSpecificationFromEquipmentId.
* \li -detector <i> detector name </i>
* e.g. <tt> -detector TPC </tt>
* \li -equipmentid <i> id </i>
- * the equipmentid
+ * the equipmentid within the detector, e.g. TPC 0 is 768
* \li -minid <i> id </i>
- * the minimum equipmentid
+ * the minimum equipmentid including detector offset, e.g. 768 is TPC 0
* \li -maxid <i> id </i>
- * the maximum equipmentid
+ * the maximum equipmentid including detector offset
* \li -verbose<br>
* print out some more info messages, mainly for the sake of tutorials
* \li -datatype <i> datatype dataorigin </i> <br>