Class to manipulate histograms in shared memory.
More...
#include <HistMemory.h>
|
void | open (const char *path, unsigned int size, const char *mode="") |
| Open shared memory. More...
|
|
void | init () |
| Initialize the shared memory.
|
|
void | serialize () |
| Serialize the shared memory.
|
|
std::vector< TH1 * > & | deserialize (Header *header=NULL) |
| Deserialize the shared memory. More...
|
|
std::vector< TH1 * > & | get () |
| Get the list of the histograms.
|
|
TH1 * | add (TH1 *h) |
| Add histogram to the list of histograms. More...
|
|
|
static const unsigned int | BUFFER_SIZE = 100000000 |
| The size of the buffer for shared memory.
|
|
Class to manipulate histograms in shared memory.
Definition at line 23 of file HistMemory.h.
◆ add()
Add histogram to the list of histograms.
- Parameters
-
h | The histogram to be added. |
Definition at line 77 of file HistMemory.h.
79 if (h == NULL)
return NULL;
◆ deserialize()
std::vector< TH1 * > & deserialize |
( |
Header * |
header = NULL | ) |
|
Deserialize the shared memory.
- Parameters
-
header | The Header of the shared memory. |
Definition at line 76 of file HistMemory.cc.
78 m_hist = std::vector<TH1*>();
85 memcpy(header,
m_header,
sizeof(Header));
91 for (
size_t i = 0; i <
m_hist.size(); i++) {
96 std::vector<TObject*> objlist;
97 std::vector<std::string> strlist;
99 int nobjs = (msg->
header())->reserved[1];
100 for (
int i = 0; i < nobjs; i++) {
101 add((TH1*)objlist[i]->Clone());
◆ open()
void open |
( |
const char * |
path, |
|
|
unsigned int |
size, |
|
|
const char * |
mode = "" |
|
) |
| |
Open shared memory.
- Parameters
-
path | The name of the shared memory. |
size | The size of the shared memory. |
mode | The open mode: read or write. |
Definition at line 13 of file HistMemory.cc.
The documentation for this class was generated from the following files: