#include <CInvalidPacketStateException>
class CInvalidPacketStateException : public CReadoutException {CInvalidPacketStateException(bool WasOpen, const char* pszAction);CInvalidPacketStateException(const CInvalidPacketStateException& rhs);~CInvalidPacketStateException();CInvalidPacketStateException& operator=(const CInvalidPacketStateException& rhs);int operator==(const CInvalidPacketStateException& rhs);int operator!=(const CInvalidPacketStateException& rhs);const int getWasOpen();const Int_t ReasonCode();virtual const const char* ReasonText();}
This exception is thrown when a CDocumentedPacket
is abused. Specifically if a packet being formatted is begun again,
or closed one ended. The best protection against abusing
CDocumentedPacket objects is to
encapsulate an ordinary CEventSegment in
a CEventPacket object as it will
correctly use the CDocumentedPacket to put your
data inside a packet.
CInvalidPacketStateException(bool WasOpen, const char* pszAction);
Constructs the exception object. WasOpen
should be true if the packet was open when this exception was
thrown. pszAction provides some
execution context for the exception.
const int getWasOpen();
Returns non zero if WasOpen was true
when this object was constructed.
const Int_t ReasonCode();
Returns a code describing the reason for the exception.
virtual const const char* ReasonText();
Returns a pointer to a string that describes why the exception was thrown.