Jpp  18.2.1-ARCA-DF-PATCH
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
Forward declarations of STD containers.
size_t getSizeof(const JDAQEvent &object)
Get size of object.
Definition: JDAQEventIO.hh:26