This class provides the AthenaSerializeSvc using ROOT.
More...
#include <AthenaRootSerializeSvc.h>
|
| AthenaRootSerializeSvc (const std::string &name, ISvcLocator *pSvcLocator) |
| Standard Service Constructor. More...
|
|
virtual | ~AthenaRootSerializeSvc () |
| Destructor. More...
|
|
virtual StatusCode | initialize () override |
| Gaudi Service Interface method implementations: More...
|
|
virtual void * | serialize (const void *object, const std::string &name, size_t &nbytes) const override |
|
virtual void * | serialize (const void *object, const Guid &id, size_t &nbytes) const override |
|
virtual void * | serialize (const void *object, const RootType &cltype, size_t &nbytes) const override |
|
virtual void * | deserialize (void *buffer, size_t &nbytes, const std::string &name) const override |
|
virtual void * | deserialize (void *buffer, size_t &nbytes, const Guid &id) const override |
|
virtual void * | deserialize (void *buffer, size_t &nbytes, const RootType &cltype) const override |
|
This class provides the AthenaSerializeSvc using ROOT.
Definition at line 19 of file AthenaRootSerializeSvc.h.
◆ AthenaRootSerializeSvc()
AthenaRootSerializeSvc::AthenaRootSerializeSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~AthenaRootSerializeSvc()
AthenaRootSerializeSvc::~AthenaRootSerializeSvc |
( |
| ) |
|
|
virtual |
◆ deserialize() [1/3]
void * AthenaRootSerializeSvc::deserialize |
( |
void * |
buffer, |
|
|
size_t & |
nbytes, |
|
|
const Guid & |
id |
|
) |
| const |
|
overridevirtual |
◆ deserialize() [2/3]
void * AthenaRootSerializeSvc::deserialize |
( |
void * |
buffer, |
|
|
size_t & |
nbytes, |
|
|
const RootType & |
cltype |
|
) |
| const |
|
overridevirtual |
Definition at line 67 of file AthenaRootSerializeSvc.cxx.
70 obj =
new char[nbytes];
72 }
else if (cltype.
Name() ==
"Token") {
73 obj =
new char[nbytes];
74 std::memcpy(
obj,
buffer, nbytes);
static_cast<char*
>(
obj)[nbytes - 1] = 0;
76 TBufferFile readBuffer(TBuffer::kRead, nbytes,
buffer, kFALSE);
77 obj = readBuffer.ReadObjectAny(cltype);
78 nbytes = readBuffer.Length();
◆ deserialize() [3/3]
void * AthenaRootSerializeSvc::deserialize |
( |
void * |
buffer, |
|
|
size_t & |
nbytes, |
|
|
const std::string & |
name |
|
) |
| const |
|
overridevirtual |
◆ initialize()
StatusCode AthenaRootSerializeSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Gaudi Service Interface method implementations:
Definition at line 26 of file AthenaRootSerializeSvc.cxx.
31 TClass::GetClass(
"TMessageHandler");
33 return(StatusCode::SUCCESS);
◆ serialize() [1/3]
void * AthenaRootSerializeSvc::serialize |
( |
const void * |
object, |
|
|
const Guid & |
id, |
|
|
size_t & |
nbytes |
|
) |
| const |
|
overridevirtual |
◆ serialize() [2/3]
void * AthenaRootSerializeSvc::serialize |
( |
const void * |
object, |
|
|
const RootType & |
cltype, |
|
|
size_t & |
nbytes |
|
) |
| const |
|
overridevirtual |
Definition at line 47 of file AthenaRootSerializeSvc.cxx.
48 TBufferFile writeBuffer(TBuffer::kWrite);
49 writeBuffer.WriteObjectAny(
object, cltype);
50 void*
buffer = writeBuffer.Buffer();
51 nbytes = writeBuffer.Length();
52 writeBuffer.ResetBit(TBuffer::kIsOwner); writeBuffer.SetBuffer(
nullptr);
◆ serialize() [3/3]
void * AthenaRootSerializeSvc::serialize |
( |
const void * |
object, |
|
|
const std::string & |
name, |
|
|
size_t & |
nbytes |
|
) |
| const |
|
overridevirtual |
◆ SvcFactory< AthenaRootSerializeSvc >
The documentation for this class was generated from the following files: