fEventDoneData(NULL),
fEventDoneDataSize(0),
fCompressionLevel(ALIHLTCOMPONENT_DEFAULT_OBJECT_COMPRESSION)
+ , fLastObjectSize(0)
{
// see header file for class documentation
// or
// see header file for function documentation
ALIHLTCOMPONENT_BASE_STOPWATCH();
int iResult=0;
+ fLastObjectSize=0;
if (pObject) {
AliHLTMessage msg(kMESS_OBJECT);
msg.SetCompressionLevel(fCompressionLevel);
if (iResult>=0) {
HLTDebug("object %s (%p) size %d compression %d inserted to output", pObject->ClassName(), pObject, iMsgLength, msg.GetCompressionLevel());
}
+ fLastObjectSize=iMsgLength;
} else {
HLTError("object serialization failed for object %p", pObject);
iResult=-ENOMSG;
//HLTDebug("buffer inserted to output: size %d data type %s spec %#x", iBlkSize, DataType2Text(dt).c_str(), spec);
} else {
if (fpOutputBuffer) {
- HLTError("too little space in output buffer: %d, required %d", fOutputBufferSize-fOutputBufferFilled, iBlkSize);
+ HLTError("too little space in output buffer: %d of %d, required %d", fOutputBufferSize-fOutputBufferFilled, fOutputBufferSize, iBlkSize);
} else {
HLTError("output buffer not available");
}
*/
int SetStopwatches(TObjArray* pStopwatches);
+ /**
+ * Get size of last serialized object.
+ * During PushBack, TObjects are serialized in a separate buffer. The
+ * size of the last object can be retrieved by this function.
+ *
+ * This might be especially useful for PushBack failures caused by too
+ * small output buffer.
+ */
+ int GetLastObjectSize() const {return fLastObjectSize;}
+
protected:
/**
/** Comression level for ROOT objects */
int fCompressionLevel; //! transient
- ClassDef(AliHLTComponent, 9)
+ /** size of last PushBack-serialized object */
+ int fLastObjectSize; //! transient
+
+ ClassDef(AliHLTComponent, 10)
};
#endif