00001 #ifndef artdaq_Application_CompositeDriver_hh
00002 #define artdaq_Application_CompositeDriver_hh
00003
00004 #include "fhiclcpp/fwd.h"
00005 #include "artdaq/Application/CommandableFragmentGenerator.hh"
00006 #include "artdaq-core/Data/Fragment.hh"
00007 #include <vector>
00008
00009 namespace artdaq
00010 {
00017 class CompositeDriver : public CommandableFragmentGenerator
00018 {
00019 public:
00030 explicit CompositeDriver(fhicl::ParameterSet const& ps);
00031
00035 virtual ~CompositeDriver() noexcept;
00036
00040 void start() override;
00041
00045 void stopNoMutex() override;
00046
00050 void stop() override;
00051
00055 void pause() override;
00056
00060 void resume() override;
00061
00062 private:
00063 std::vector<artdaq::Fragment::fragment_id_t> fragmentIDs() override;
00064
00065 bool getNext_(artdaq::FragmentPtrs& output) override;
00066
00067 bool makeChildGenerator_(fhicl::ParameterSet const&);
00068
00069 std::vector<std::unique_ptr<CommandableFragmentGenerator>> generator_list_;
00070 std::vector<bool> generator_active_list_;
00071 };
00072 }
00073 #endif