FairRoot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
BinaryBaseClassSerializer.h
Go to the documentation of this file.
1
/*
2
* File: BinaryBaseClassSerializer.h
3
* Author: winckler
4
*
5
* Created on October 10, 2014, 5:22 PM
6
*/
7
8
#ifndef BINARYBASECLASSSERIALIZER_H
9
#define BINARYBASECLASSSERIALIZER_H
10
11
#include <FairMQMessage.h>
12
13
template
<
typename
TPayload>
14
class
BinaryBaseClassSerializer
15
{
16
public
:
17
BinaryBaseClassSerializer
()
18
:
fPayload
(nullptr)
19
,
fMessage
(nullptr)
20
,
fNumInput
(0)
21
{}
22
23
BinaryBaseClassSerializer
(
const
BinaryBaseClassSerializer
&) =
delete
;
24
BinaryBaseClassSerializer
operator=
(
const
BinaryBaseClassSerializer
&) =
delete
;
25
26
virtual
~BinaryBaseClassSerializer
() {}
27
28
void
GetPayload
(FairMQMessage* msg)
29
{
30
int
inputSize = msg->GetSize();
31
if
(inputSize > 0) {
32
fNumInput
= inputSize /
sizeof
(TPayload);
33
}
34
fPayload
=
static_cast<
TPayload*
>
(msg->GetData());
35
}
36
37
void
SetMessage
(FairMQMessage* msg) {
fMessage
= msg; }
38
39
FairMQMessage*
GetMessage
() {
return
fMessage
; }
40
41
protected
:
42
TPayload*
fPayload
;
43
FairMQMessage*
fMessage
;
44
int
fNumInput
;
45
};
46
47
#endif
/* BINARYBASECLASSSERIALIZER_H */
BinaryBaseClassSerializer::SetMessage
void SetMessage(FairMQMessage *msg)
Definition:
BinaryBaseClassSerializer.h:37
BinaryBaseClassSerializer::fNumInput
int fNumInput
Definition:
BinaryBaseClassSerializer.h:44
BinaryBaseClassSerializer::operator=
BinaryBaseClassSerializer operator=(const BinaryBaseClassSerializer &)=delete
BinaryBaseClassSerializer::~BinaryBaseClassSerializer
virtual ~BinaryBaseClassSerializer()
Definition:
BinaryBaseClassSerializer.h:26
BinaryBaseClassSerializer::fMessage
FairMQMessage * fMessage
Definition:
BinaryBaseClassSerializer.h:43
BinaryBaseClassSerializer::fPayload
TPayload * fPayload
Definition:
BinaryBaseClassSerializer.h:42
BinaryBaseClassSerializer
Definition:
BinaryBaseClassSerializer.h:14
BinaryBaseClassSerializer::BinaryBaseClassSerializer
BinaryBaseClassSerializer()
Definition:
BinaryBaseClassSerializer.h:17
BinaryBaseClassSerializer::GetMessage
FairMQMessage * GetMessage()
Definition:
BinaryBaseClassSerializer.h:39
BinaryBaseClassSerializer::GetPayload
void GetPayload(FairMQMessage *msg)
Definition:
BinaryBaseClassSerializer.h:28
FairRoot
base
MQ
policies
Serialization
BinaryBaseClassSerializer.h
Generated on Mon Mar 8 2021 12:14:05 for FairRoot by
1.8.5