00001 #ifndef _ots_EventBuilderInterface_h_
00002 #define _ots_EventBuilderInterface_h_
00003
00004 #include <future>
00005 #include <memory>
00006 #include <string>
00007 #include "artdaq/Application/EventBuilderCore.hh"
00008
00009 namespace ots
00010 {
00011
00012
00013
00014 class EventBuilderInterface
00015 {
00016 public:
00017
00018
00019 EventBuilderInterface (int mpi_rank, std::string name);
00020 EventBuilderInterface (EventBuilderInterface const&) = delete;
00021 virtual ~EventBuilderInterface();
00022 EventBuilderInterface& operator=(EventBuilderInterface const&) = delete;
00023
00024 void configure (fhicl::ParameterSet const& pset);
00025 void halt (void);
00026 void pause (void);
00027 void resume (void);
00028 void start (std::string runNumber);
00029 void stop (void);
00030
00031 std::string getBuilderName (void){return name_;}
00032
00033 protected:
00034
00035 private:
00036 int mpi_rank_;
00037 std::string name_;
00038 std::unique_ptr<artdaq::EventBuilderCore> event_builder_ptr_;
00039 std::future<size_t> event_building_future_;
00040
00041
00042 std::string report_string_;
00043 bool external_request_status_;
00044 };
00045
00046 }
00047
00048 #endif