23 #ifndef ADF_DefaultKeyFactory
24 #define ADF_DefaultKeyFactory
25 #define ADF_DEFAULTKEYFACTORY_H ADF_DefaultKeyFactory
27 #ifndef ADF_KeyFactory
58 UShort_t rs =
sizeof(UShort_t);
59 if ( s < kMaxDataLength )
72 if ( i < UInt_t(kMaxDataLength) ) {
73 (*fBuffer) << UShort_t(i+
sizeof(UShort_t));
86 return UInt_t(s-
sizeof(UShort_t));
90 { UShort_t s = 0u;
fBuffer->
SetOffset(); (*fBuffer) >> s;
return UInt_t(s); }
115 (*fBuffer) << UInt_t(s+
sizeof(UInt_t));
123 UInt_t ri =
sizeof(UInt_t);
125 if ( i < kMaxDataLength )
138 if ( i >
sizeof(UInt_t) )
139 i = i -
sizeof(UInt_t) ;
171 virtual ULong64_t
GetUID()
const = 0 ;
173 virtual void SetUID(ULong64_t) = 0;
212 fFrameSize = fDataSize + 4u*
aByte;
229 (*fBuffer) << UInt_t(i);
243 fDataSize = s; fFrameSize = fDataSize + 4u*
aByte;
246 { ADF::Key::SetDataLength(us);}
266 fFrameSize = fDataSize + 8u*
aByte;
297 fDataSize = s; fFrameSize = fDataSize + 8u*
aByte;
301 fDataSize = s; fFrameSize = fDataSize + 8u*
aByte;
311 static const UShort_t kKeyLength = 6u*
aByte;
334 (*fBuffer) << UInt_t(i);
350 return i - kKeyLength ;
357 UShort_t si = s + kKeyLength;
368 UShort_t si = i + kKeyLength;
382 static const UShort_t kKeyLength = 10u*
aByte;
424 return i - kKeyLength ;
432 UShort_t si = s + kKeyLength;
443 UShort_t si = i + kKeyLength;
467 virtual Key *
DoNew(
const FactoryItem &) ;
virtual UInt_t GetDataLength() const
virtual ULong64_t GetUID() const
Get unique ID. Could be event number / timestamp for instance.
header file for KeyFactory.cpp
virtual UInt_t GetDataLength() const
BufferIO * fBuffer
the buffer that fills in/out the Key
virtual void SetDataLength(UShort_t us)
UIDKey_1_1(BaseBuffer::EEndian e, UInt_t s=kKeyLength)
s is the data length
virtual void SetDataLength(UShort_t s)
virtual void SetDataLength(UInt_t i)
stream in buffer the data length
virtual UInt_t GetFrameLength() const
Get frame length, constant.
virtual void SetUID(ULong64_t i)
Set unique ID. Could be event number / timestamp for instance.
UIDKey used for sequences of frames with variable length starting associated to an id which could be ...
UIDKey_0_1(BaseBuffer::EEndian e, UInt_t s=8u *aByte)
s is the data length
UIDKey used for sequences of frames with contant length starting with a id which could be event # or ...
FSKey_0_0(BaseBuffer::EEndian e, UInt_t s=sizeof(UShort_t))
const UInt_t kMaxUShort_t
virtual ULong64_t GetUID() const
Get unique ID. Could be event number / timestamp for instance.
virtual void SetDataLength(UShort_t s)
stream in buffer the data length
virtual UInt_t GetDataLength() const
virtual UInt_t GetFrameLength() const
virtual ULong64_t GetUID() const
Get unique ID. Could be event number / timestamp for instance.
FSKey_0_1 The length of the frame is coded on 4 bytes.
virtual UInt_t GetFrameLength() const
Get frame length, constant.
virtual ULong64_t GetTimeStamp(ULong64_t) const
Get unique ID. Could be event number / timestamp for instance.
virtual UInt_t GetDataLength() const
virtual Key * DoNew(const FactoryItem &)
Ask this factory for a new DefaultKeyFactory.
virtual UInt_t GetFrameLength() const
Get frame length,.
virtual void SetUID(ULong64_t i)
Set unique ID. Could be event number / timestamp for instance.
LogMessage fLog
the log messenger ... to know the object hae been properly intitialised/modified
virtual ULong64_t GetUID() const
Get unique ID. Could be event number / timestamp for instance.
virtual ULong64_t GetUID() const =0
Get unique ID. Could be event number / timestamp for instance.
virtual ULong64_t GetEventNumber() const
Get unique ID. Could be event number / timestamp for instance.
virtual void SetUID(ULong64_t i)
Set unique ID. Could be event number / timestamp for instance.
Base Key for frames assoeciated with a id which could be event # or Timestamp (32 bits) ...
virtual UInt_t GetFrameLength() const
virtual void SetDataLength(UInt_t i)
stream in buffer the data length
UIDKey used for sequences of frames with contant length starting with a id which could be event # or ...
FSKey_0_0 The length of the frame is coded on 2 bytes (UShort_t, max size: 65534) ...
virtual void SetTimeStamp(ULong64_t i)
Get unique ID. Could be event number / timestamp for instance.
UIDKey used for sequences of frames with contant length starting with a id which could be event # or ...
virtual void SetDataLength(UInt_t s)
virtual UInt_t GetDataLength() const
Get data length, constant.
UIDKey_1_0(BaseBuffer::EEndian e, UInt_t s=kKeyLength)
s is the data length
virtual void SetDataLength(UInt_t s)
virtual void SetDataLength(UShort_t s)
stream in buffer the data length
virtual void SetDataLength(UInt_t i)
stream in buffer the data length
UIDKey_0_0(BaseBuffer::EEndian e, UInt_t s=4u *aByte)
s is the data length
virtual void SetDataLength(UShort_t s)
stream in buffer the data length
virtual void SetDataLength(UInt_t i)
stream in buffer the data length
virtual std::string & GetProcessName()
To get the Process name.
virtual UInt_t GetFrameLength() const
Get frame length, constant.
FSKey_0_1(BaseBuffer::EEndian e, UInt_t s=sizeof(UInt_t))
virtual void SetUID(ULong64_t)=0
Set unique ID. Could be event number / timestamp for instance.
virtual void SetEventNumber(ULong64_t i)
Get unique ID. Could be event number / timestamp for instance.
Base class for any KeyFactory implementation.
virtual void SetDataLength(UShort_t s)
stream in buffer the data length
virtual UInt_t GetDataLength() const
Get data length, constant.
UIDKey(BaseBuffer::EEndian e, UInt_t s)
s is the data length
UInt_t SetOffset(UInt_t off=0u) const
change the current position.
virtual void SetUID(ULong64_t i)
Set unique ID. Could be event number / timestamp for instance.