10 #include <framework/pcore/MsgHandler.h>
12 #include <daq/slc/system/SharedMemory.h>
13 #include <daq/slc/system/MMutex.h>
60 void open(
const char* path,
unsigned int size,
61 const char* mode =
"");
74 std::vector<TH1*>&
deserialize(Header* header = NULL);
85 if (h == NULL)
return NULL;
Class to manipulate histograms in shared memory.
void init()
Initialize the shared memory.
TH1 * add(TH1 *h)
Add histogram to the list of histograms.
char * m_body
The pointer to the body of the message.
Header * m_header
The header for the message.
char * m_buf
The buffer to hold the message.
std::vector< TH1 * > & get()
Get the list of the histograms.
MsgHandler m_handler
The message handler.
std::string m_path
The name of the shared memory.
unsigned int m_updateid
The id of the udpate.
std::vector< TH1 * > m_hist
The list of the histograms.
SharedMemory m_memory
The shared memory to hold the histograms.
std::vector< TH1 * > & deserialize(Header *header=NULL)
Deserialize the shared memory.
void open(const char *path, unsigned int size, const char *mode="")
Open shared memory.
static const unsigned int BUFFER_SIZE
The size of the buffer for shared memory.
int m_fd
The file descriptor.
MMutex m_mutex
The mutex lock for the shared memory.
unsigned int m_size
The size of the shared memory.
void serialize()
Serialize the shared memory.
A class to encode/decode an EvtMessage.
Abstract base class for different kinds of events.