Jpp
master_rocky-37-gf0c5bc59d
the software that should make you happy
software
JDAQ
JDAQSizeof.hh
Go to the documentation of this file.
1
#ifndef __JDAQSIZEOF__
2
#define __JDAQSIZEOF__
3
4
#include "
JLang/JSTDTypes.hh
"
5
6
/**
7
* \author mdejong
8
*/
9
namespace
KM3NETDAQ
{
10
11
/**
12
* Get size of object.
13
*
14
* Note that this method strictly applies to elements inside the given std::vector which are not containers by themselves.
15
*
16
* \param object object
17
* \return number of bytes
18
*/
19
template
<
class
JElement_t,
class
JAllocator_t>
20
inline
size_t
getSizeof
(
const
std::vector<JElement_t, JAllocator_t>
&
object
)
21
{
22
return
sizeof
(int) +
object
.size() * getSizeof<JElement_t>();
23
}
24
}
25
26
#endif
JSTDTypes.hh
Forward declarations of STD containers.
std::vector
Definition:
JSTDTypes.hh:15
KM3NETDAQ
KM3NeT DAQ data structures and auxiliaries.
Definition:
DataQueue.cc:39
KM3NETDAQ::getSizeof
size_t getSizeof(const JDAQEvent &object)
Get size of object.
Definition:
JDAQEventIO.hh:26
Generated by
1.9.1