artdaq_demo  v3_04_00
AsciiSimulator.hh
1 #ifndef artdaq_demo_Generators_AsciiSimulator_hh
2 #define artdaq_demo_Generators_AsciiSimulator_hh
3 
4 #include "fhiclcpp/fwd.h"
5 #include "artdaq-core/Data/Fragment.hh"
6 #include "artdaq/Application/CommandableFragmentGenerator.hh"
7 #include "artdaq-core-demo/Overlays/AsciiFragment.hh"
8 #include "artdaq-core-demo/Overlays/FragmentType.hh"
9 
10 #include <random>
11 #include <vector>
12 #include <atomic>
13 
14 namespace demo
15 {
26  {
27  public:
33  explicit AsciiSimulator(fhicl::ParameterSet const& ps);
34 
35  private:
36 
46  bool getNext_(artdaq::FragmentPtrs& output) override;
47 
48  // Explicitly declare that there is nothing special to be done
49  // by the start, stop, and stopNoMutex methods in this class
50  void start() override {}
51  void stop() override {}
52  void stopNoMutex() override {}
53 
54  // FHiCL-configurable variables. Note that the C++ variable names
55  // are the FHiCL variable names with a "_" appended
56 
57  std::size_t const throttle_usecs_;
58 
59  // Members needed to generate the simulated data
60  std::string string1_;
61  std::string string2_;
62  };
63 }
64 
65 #endif /* artdaq_demo_Generators_AsciiSimulator_hh */
Generates ASCIIFragments filled with user-specified ASCII strings.
AsciiSimulator(fhicl::ParameterSet const &ps)
AsciiSimulator Constructor.
std::list< FragmentPtr > FragmentPtrs