mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
FairMQRegion and examples/advanced/Region
This commit is contained in:
committed by
Mohammad Al-Turany
parent
65f1b96dc3
commit
221d2567f0
34
fairmq/zeromq/FairMQRegionZMQ.cxx
Normal file
34
fairmq/zeromq/FairMQRegionZMQ.cxx
Normal file
@@ -0,0 +1,34 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
|
||||
#include "FairMQRegionZMQ.h"
|
||||
#include "FairMQLogger.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
FairMQRegionZMQ::FairMQRegionZMQ(const size_t size)
|
||||
: fBuffer(malloc(size))
|
||||
, fSize(size)
|
||||
{
|
||||
}
|
||||
|
||||
void* FairMQRegionZMQ::GetData() const
|
||||
{
|
||||
return fBuffer;
|
||||
}
|
||||
|
||||
size_t FairMQRegionZMQ::GetSize() const
|
||||
{
|
||||
return fSize;
|
||||
}
|
||||
|
||||
FairMQRegionZMQ::~FairMQRegionZMQ()
|
||||
{
|
||||
LOG(DEBUG) << "destroying region";
|
||||
free(fBuffer);
|
||||
}
|
Reference in New Issue
Block a user