#include <HDEVIOWriter.h>
Definition at line 30 of file HDEVIOWriter.h.
Enumerator |
---|
kNoSink |
|
kFileSink |
|
kETSink |
|
Definition at line 33 of file HDEVIOWriter.h.
HDEVIOWriter::HDEVIOWriter |
( |
string |
sink_name | ) |
|
HDEVIOWriter::~HDEVIOWriter |
( |
| ) |
|
|
virtual |
void HDEVIOWriter::AddBufferToOutput |
( |
vector< uint32_t > * |
buff | ) |
|
Add the given buffer to the list of buffers to be written to the output. This will check that the size of the output list has not grown too large (default is 200 events) and if so, it will block until the list emptys out a bit. This Should apply back-pressure by having all processing threads stop here until either the output catches up, or we are told to quit.
Definition at line 551 of file HDEVIOWriter.cc.
Referenced by DEventWriterEVIO::Write_EVIOBuffer(), and DEventWriterEVIO::Write_EVIOEvent().
void HDEVIOWriter::ConnectToET |
( |
string |
sink_name | ) |
|
|
protected |
void HDEVIOWriter::FlushOutput |
( |
uint32_t |
Nwords, |
|
|
deque< vector< uint32_t > * > & |
my_output_deque |
|
) |
| |
Write the given buffer to the output channel (either file or ET). This is called from the dedicated output thread and should not be called from anywhere else. If it is unable to write the buffer to the output for any reason, then a JException is thrown. The size of the buffer is taken from the first word which is assumed to be the number of 32-bit words in the buffer, not counting the leading length word. Thus, a total of (buff[0]+1)*4 bytes is taken as the total size of the buffer.
Definition at line 379 of file HDEVIOWriter.cc.
References sprintf(), str, swap_bank_out(), and swap_block_out().
vector< uint32_t > * HDEVIOWriter::GetBufferFromPool |
( |
void |
| ) |
|
void * HDEVIOWriter::HDEVIOOutputThread |
( |
void |
| ) |
|
This is run in a dedicated thread and is responsible for writing events to the ouput, one at a time. EVIO buffers, one per event, are created by the processing threads using the WriteEvent method of this class. It stores them in a queue which this thread monitors, writing out events as it finds them. If the queue is empty, this thread will sleep until either one becomes available, or the thread is told to Quit.
Definition at line 278 of file HDEVIOWriter.cc.
References japp.
void HDEVIOWriter::Quit |
( |
void |
| ) |
|
void HDEVIOWriter::ReturnBufferToPool |
( |
vector< uint32_t > * |
buff | ) |
|
uint32_t HDEVIOWriter::blocks_written_to_output |
|
protected |
vector< vector<uint32_t>* > HDEVIOWriter::buff_pool |
|
protected |
pthread_mutex_t HDEVIOWriter::buff_pool_mutex |
|
protected |
bool HDEVIOWriter::DEBUG_FILES |
|
protected |
uint32_t HDEVIOWriter::events_written_to_output |
|
protected |
ofstream* HDEVIOWriter::evioout |
|
protected |
uint32_t HDEVIOWriter::MAX_HOLD_TIME |
|
protected |
uint32_t HDEVIOWriter::MAX_OUTPUT_BUFFER_SIZE |
|
protected |
uint32_t HDEVIOWriter::MAX_OUTPUT_QUEUE_SIZE |
|
protected |
uint32_t HDEVIOWriter::NEVENTS_PER_BLOCK |
|
protected |
ofstream* HDEVIOWriter::ofs_debug_output |
|
protected |
vector<uint32_t> HDEVIOWriter::output_block |
|
protected |
deque< vector<uint32_t>* > HDEVIOWriter::output_deque |
|
protected |
pthread_mutex_t HDEVIOWriter::output_deque_mutex |
|
protected |
The documentation for this class was generated from the following files: