artdaq
v3_09_01
|
GenericFragmentSimulator creates simulated Generic events, with data distributed according to a "histogram" provided in the configuration data. More...
#include <artdaq/DAQdata/GenericFragmentSimulator.hh>
Classes | |
struct | Config |
Configuration of the GenericFragmentSimulator. May be used for parameter validation More... | |
Public Types | |
enum | content_selector_t : uint8_t { content_selector_t::EMPTY = 0, content_selector_t::FRAG_ID = 1, content_selector_t::RANDOM = 2, content_selector_t::DEAD_BEEF } |
What type of content should the GenericFragmentSimulator put in Fragment objects? More... | |
using | Parameters = fhicl::WrappedTable< Config > |
Used for ParameterSet validation (if desired) | |
Public Member Functions | |
GenericFragmentSimulator (fhicl::ParameterSet const &ps) | |
GenericFragmentSimulator Constructor. More... | |
bool | getNext (Fragment::sequence_id_t sequence_id, Fragment::fragment_id_t fragment_id, FragmentPtr &frag_ptr) |
Generate a Fragment according to the value of the content_selectior_t enum. More... | |
bool | getNext (FragmentPtrs &output) override |
Get the next Fragment from the generator. More... | |
std::vector < Fragment::fragment_id_t > | fragmentIDs () override |
Get the Fragment IDs generated by this instance. More... | |
GenericFragmentSimulator creates simulated Generic events, with data distributed according to a "histogram" provided in the configuration data.
With this implementation, a single call to getNext(frags) will return a complete event (event ids are incremented automatically); fragment ids are sequential. Event size and content are both configurable; see the implementation for details.
Definition at line 26 of file GenericFragmentSimulator.hh.
|
strong |
What type of content should the GenericFragmentSimulator put in Fragment objects?
Definition at line 64 of file GenericFragmentSimulator.hh.
|
explicit |
GenericFragmentSimulator Constructor.
ps | ParameterSet used to configure the GenericFragmentSimulator. See artdaq::GenericFragmentSimulator::Config |
Definition at line 11 of file GenericFragmentSimulator_generator.cc.
|
inlineoverride |
Get the Fragment IDs generated by this instance.
Definition at line 100 of file GenericFragmentSimulator.hh.
bool artdaq::GenericFragmentSimulator::getNext | ( | Fragment::sequence_id_t | sequence_id, |
Fragment::fragment_id_t | fragment_id, | ||
FragmentPtr & | frag_ptr | ||
) |
Generate a Fragment according to the value of the content_selectior_t enum.
sequence_id | Sequence ID of generated Fragment | |
fragment_id | Fragment ID of generated Fragment | |
[out] | frag_ptr | Generated Fragment |
Definition at line 42 of file GenericFragmentSimulator_generator.cc.
|
inlineoverride |
Get the next Fragment from the generator.
[out] | output | List of FragmentPtr objects to add the new Fragment to |
Definition at line 91 of file GenericFragmentSimulator.hh.