|
MarlinMT
0.1.0
|
Sequence class A sequence is a list of processors wrapped in SequenceItem objects. More...
#include <Sequence.h>
Public Types | |
| using | Container = std::vector< std::shared_ptr< SequenceItem > > |
| using | Index = Container::size_type |
| using | SizeType = Container::size_type |
| using | ClockMeasureMap = std::map< std::string, ClockMeasure > |
| using | SkippedEventMap = std::map< std::string, int > |
Public Member Functions | |
| Sequence ()=default | |
| ~Sequence ()=default | |
| Sequence & | operator= (const Sequence &)=delete |
| Sequence (const Sequence &)=delete | |
| std::shared_ptr< SequenceItem > | createItem (std::shared_ptr< Processor > processor, std::shared_ptr< std::mutex > lock) const |
| Create a sequence item. More... | |
| void | addItem (std::shared_ptr< SequenceItem > item) |
| Add an item to the sequence. More... | |
| std::shared_ptr< SequenceItem > | at (Index index) const |
| Get a sequence item at the specified index. More... | |
| SizeType | size () const |
| Get the number of items in the sequence. More... | |
| void | processRunHeader (std::shared_ptr< RunHeader > rhdr) |
| Process the run header. More... | |
| void | processEvent (std::shared_ptr< EventStore > event) |
| Process the event. More... | |
| ClockMeasure | clockMeasureSummary () const |
| Generate a clock measure summary of all items. More... | |
| const ClockMeasureMap & | clockMeasures () const |
| Get all the clock measurements of the sequence. More... | |
| const SkippedEventMap & | skippedEvents () const |
| Get all the skipped events of the sequence. More... | |
Private Attributes | |
| Container | _items {} |
| < The sequence items (processor list) More... | |
| ClockMeasureMap | _clockMeasures {} |
| The map of skipped events. More... | |
| SkippedEventMap | _skipEventMap {} |
Sequence class A sequence is a list of processors wrapped in SequenceItem objects.
SequenceItem objects allow for calling processor methods in a critical section. This methods are :
Definition at line 128 of file Sequence.h.
| using marlinmt::Sequence::ClockMeasureMap = std::map<std::string, ClockMeasure> |
Definition at line 133 of file Sequence.h.
| using marlinmt::Sequence::Container = std::vector<std::shared_ptr<SequenceItem> > |
Definition at line 130 of file Sequence.h.
| using marlinmt::Sequence::Index = Container::size_type |
Definition at line 131 of file Sequence.h.
| using marlinmt::Sequence::SizeType = Container::size_type |
Definition at line 132 of file Sequence.h.
| using marlinmt::Sequence::SkippedEventMap = std::map<std::string, int> |
Definition at line 134 of file Sequence.h.
|
default |
|
default |
|
delete |
| void marlinmt::Sequence::addItem | ( | std::shared_ptr< SequenceItem > | item | ) |
Add an item to the sequence.
| item | the item to add |
Definition at line 90 of file Sequence.cc.
| std::shared_ptr< SequenceItem > marlinmt::Sequence::at | ( | Index | index | ) | const |
Get a sequence item at the specified index.
| index | the lookup index |
Definition at line 103 of file Sequence.cc.
| const Sequence::ClockMeasureMap & marlinmt::Sequence::clockMeasures | ( | ) | const |
Get all the clock measurements of the sequence.
Definition at line 162 of file Sequence.cc.
| ClockMeasure marlinmt::Sequence::clockMeasureSummary | ( | ) | const |
Generate a clock measure summary of all items.
Definition at line 150 of file Sequence.cc.
References marlinmt::ClockMeasure::_appClock.
| std::shared_ptr< SequenceItem > marlinmt::Sequence::createItem | ( | std::shared_ptr< Processor > | processor, |
| std::shared_ptr< std::mutex > | lock | ||
| ) | const |
Create a sequence item.
The item is not added. Use addItem() to add it.
| processor | a processor pointer |
| lock | the lock to use on processEvent/modifyEvent calls |
Definition at line 84 of file Sequence.cc.
References marlinmt::SequenceItem::processor().
| void marlinmt::Sequence::processEvent | ( | std::shared_ptr< EventStore > | event | ) |
Process the event.
Call processEvent() for each item in the sequence
| event | the event to process |
Definition at line 123 of file Sequence.cc.
| void marlinmt::Sequence::processRunHeader | ( | std::shared_ptr< RunHeader > | rhdr | ) |
Process the run header.
Call processRunHeader() for each item in the sequence
| rhdr | the run header to process |
Definition at line 115 of file Sequence.cc.
| Sequence::SizeType marlinmt::Sequence::size | ( | ) | const |
Get the number of items in the sequence.
Definition at line 109 of file Sequence.cc.
| const Sequence::SkippedEventMap & marlinmt::Sequence::skippedEvents | ( | ) | const |
Get all the skipped events of the sequence.
Definition at line 168 of file Sequence.cc.
|
private |
The map of skipped events.
Definition at line 204 of file Sequence.h.
|
private |
< The sequence items (processor list)
The processor clock measurements
Definition at line 202 of file Sequence.h.
|
private |
Definition at line 206 of file Sequence.h.