MarlinMT
0.1.0
|
SequenceItem class Handle a processor pointer and call Processor::processEvent in a critical section if configured accordingly. More...
#include <Sequence.h>
Public Member Functions | |
~SequenceItem ()=default | |
SequenceItem (std::shared_ptr< Processor > proc) | |
Constructor. More... | |
SequenceItem (std::shared_ptr< Processor > proc, std::shared_ptr< std::mutex > lock) | |
Constructor. More... | |
void | processRunHeader (std::shared_ptr< RunHeader > rhdr) |
Process the run header. More... | |
clock::pair | processEvent (std::shared_ptr< EventStore > event) |
Call Processor::processEvent. More... | |
std::shared_ptr< Processor > | processor () const |
Call Processor::modifyEvent. More... | |
const std::string & | name () const |
Get the processor name. More... | |
Private Attributes | |
std::shared_ptr< Processor > | _processor {nullptr} |
< The processor instance More... | |
std::shared_ptr< std::mutex > | _mutex {nullptr} |
SequenceItem class Handle a processor pointer and call Processor::processEvent in a critical section if configured accordingly.
Definition at line 34 of file Sequence.h.
|
default |
marlinmt::SequenceItem::SequenceItem | ( | std::shared_ptr< Processor > | proc | ) |
Constructor.
No internal locking
proc | a pointer on a processor |
Definition at line 16 of file Sequence.cc.
References _processor.
marlinmt::SequenceItem::SequenceItem | ( | std::shared_ptr< Processor > | proc, |
std::shared_ptr< std::mutex > | lock | ||
) |
Constructor.
proc | a pointer on a processor |
lock | the mutex instance to use |
Definition at line 26 of file Sequence.cc.
References _processor.
const std::string & marlinmt::SequenceItem::name | ( | ) | const |
Get the processor name.
Definition at line 77 of file Sequence.cc.
References _processor.
Referenced by marlinmt::SuperSequence::addProcessor().
clock::pair marlinmt::SequenceItem::processEvent | ( | std::shared_ptr< EventStore > | event | ) |
Call Processor::processEvent.
Lock if the mutex has been initialized. Call time is returned in a pair as :
event | the event to process |
Definition at line 48 of file Sequence.cc.
References _mutex, _processor, and marlinmt::clock::now().
std::shared_ptr< Processor > marlinmt::SequenceItem::processor | ( | ) | const |
Call Processor::modifyEvent.
Lock if the mutex has been initialized Call time is returned in a pair as :
event | the event to modify Get the processor instance |
Definition at line 71 of file Sequence.cc.
References _processor.
Referenced by marlinmt::SuperSequence::addProcessor(), and marlinmt::Sequence::createItem().
void marlinmt::SequenceItem::processRunHeader | ( | std::shared_ptr< RunHeader > | rhdr | ) |
Process the run header.
rhdr | the run header to process |
Definition at line 36 of file Sequence.cc.
References _mutex, and _processor.
|
private |
Definition at line 94 of file Sequence.h.
Referenced by processEvent(), and processRunHeader().
|
private |
< The processor instance
The mutex instance
Definition at line 92 of file Sequence.h.
Referenced by name(), processEvent(), processor(), processRunHeader(), and SequenceItem().