artdaq  v3_12_02
ArtdaqGlobalsService.h
1 #ifndef artdaq_ArtModules_ArtdaqGlobalsService_h
2 #define artdaq_ArtModules_ArtdaqGlobalsService_h
3 
4 #include "art/Framework/Services/Registry/ServiceMacros.h"
5 #include "artdaq-core/Data/RawEvent.hh"
6 #include "artdaq/ArtModules/ArtdaqSharedMemoryServiceInterface.h"
7 #include "fhiclcpp/types/Atom.h"
8 
9 // ----------------------------------------------------------------------
10 
17 {
18 public:
22  struct Config
23  {
24  };
26  using Parameters = fhicl::WrappedTable<Config>;
27 
31  virtual ~ArtdaqGlobalsService();
32 
37  ArtdaqGlobalsService(fhicl::ParameterSet const& pset, art::ActivityRegistry&);
38 
43  std::unordered_map<artdaq::Fragment::type_t, std::unique_ptr<artdaq::Fragments>> ReceiveEvent(bool) override
44  {
45  return std::unordered_map<artdaq::Fragment::type_t, std::unique_ptr<artdaq::Fragments>>();
46  }
47 
52  size_t GetQueueSize() override { return 0; }
57  size_t GetQueueCapacity() override { return 0; }
62  std::shared_ptr<artdaq::detail::RawEventHeader> GetEventHeader() override { return nullptr; }
63 
64 private:
67  ArtdaqGlobalsService& operator=(ArtdaqGlobalsService const&) = delete;
68  ArtdaqGlobalsService& operator=(ArtdaqGlobalsService&&) = delete;
69 };
70 
71 DECLARE_ART_SERVICE_INTERFACE_IMPL(ArtdaqGlobalsService, ArtdaqSharedMemoryServiceInterface, LEGACY)
72 
73 #endif /* artdaq_ArtModules_ArtdaqGlobalsService_h */
74 
75 // Local Variables:
76 // mode: c++
77 // End:
Interface for ArtdaqSharedMemoryService. This interface is declared to art as part of the required re...
virtual ~ArtdaqGlobalsService()
ArtdaqGlobalsService Destructor. Calls disconnect().
size_t GetQueueCapacity() override
Get the maximum number of events which can be stored in the shared memory (0)
Allowed Configuration parameters of ArtdaqGlobalsService. May be used for configuration validation ...
std::unordered_map< artdaq::Fragment::type_t, std::unique_ptr< artdaq::Fragments > > ReceiveEvent(bool) override
Pretend to receive an event from the shared memory.
std::shared_ptr< artdaq::detail::RawEventHeader > GetEventHeader() override
Get a shared_ptr to the current event header, if any.
fhicl::WrappedTable< Config > Parameters
Used for ParameterSet validation (if desired)
ArtdaqGlobalsService(fhicl::ParameterSet const &pset, art::ActivityRegistry &)
ArtdaqGlobalsService Constructor.
ArtdaqGlobalsService extends ArtdaqSharedMemoryServiceInterface. It manages the artdaq Global varaibl...
size_t GetQueueSize() override
Get the number of events which are ready to be read (0)