1 #ifndef artdaq_ArtModules_NetMonTransportService_h
2 #define artdaq_ArtModules_NetMonTransportService_h
4 #include "art/Framework/Services/Registry/ServiceMacros.h"
6 #include "artdaq/ArtModules/NetMonTransportServiceInterface.h"
7 #include "artdaq/DAQrate/DataSenderManager.hh"
8 #include "artdaq-core/Core/SharedMemoryEventReceiver.hh"
25 fhicl::Atom<uint32_t>
shared_memory_key{ fhicl::Name{
"shared_memory_key"},fhicl::Comment{
"Key to use when connecting to shared memory. Will default to 0xBEE70000 + getppid()."},0xBEE70000 };
27 fhicl::Atom<uint32_t>
broadcast_shared_memory_key{ fhicl::Name{
"broadcast_shared_memory_key" },fhicl::Comment{
"Key to use when connecting to broadcast shared memory. Will default to 0xCEE70000 + getppid()."},0xCEE70000 };
29 fhicl::Atom<int>
rank{ fhicl::Name{
"rank"}, fhicl::Comment{
"Rank of this artdaq application. Used for data transfers"} };
31 fhicl::Atom<double>
init_fragment_timeout{ fhicl::Name{
"init_fragment_timeout_seconds"}, fhicl::Comment{
"Amount of time to wait, in seconds, for init Fragment to arrive"}, 1.0 };
74 void sendMessage(uint64_t sequenceId, uint8_t messageType, TBufferFile& msg)
override;
90 fhicl::ParameterSet data_pset_;
92 double init_timeout_s_;
94 std::unique_ptr<artdaq::DataSenderManager> sender_ptr_;
95 std::unique_ptr<artdaq::SharedMemoryEventReceiver> incoming_events_;
96 std::unique_ptr<std::vector<artdaq::Fragment>> recvd_fragments_;
98 void setupEventReceiver_();
void receiveInitMessage(TBufferFile *&msg) override
Receive the init message.
fhicl::Atom< int > rank
"rank" (OPTIONAL) : The rank of this applicaiton, for use by non - artdaq applications running NetMon...
fhicl::Atom< double > init_fragment_timeout
"init_fragment_timeout_seconds" (Default: 1.0): Amount of time to wait, in seconds, for init Fragment to arrive
void sendMessage(uint64_t sequenceId, uint8_t messageType, TBufferFile &msg) override
Send ROOT data, wrapped in an artdaq::Fragment object.
fhicl::TableFragment< artdaq::DataSenderManager::Config > dataSenderConfig
Configuration for DataSenderManager. See artdaq::DataSenderManager::Config.
fhicl::Atom< uint32_t > broadcast_shared_memory_key
"shared_memory_key" (Default: 0xCEE70000 + pid): Key to use when connecting to broadcast shared memor...
NetMonTransportService extends NetMonTransportServiceInterface. It sends events using DataSenderManag...
void receiveMessage(TBufferFile *&msg) override
Receive data from the ConcurrentQueue.
Allowed Configuration parameters of NetMonTransportService. May be used for configuration validation ...
fhicl::Atom< uint32_t > shared_memory_key
"shared_memory_key" (Default: 0xBEE70000 + pid): Key to use when connecting to shared memory...
size_t dataReceiverCount() const
Get the number of data receivers.
void connect() override
Reconnect the NetMonTransportService.
virtual ~NetMonTransportService()
NetMonTransportService Destructor. Calls disconnect().
NetMonTransportService(fhicl::ParameterSet const &pset, art::ActivityRegistry &)
NetMonTransportService Constructor.
void disconnect() override
Disconnects the NetMonTranportService.
Interface for NetMonTranportService. This interface is declared to art as part of the required regist...
fhicl::WrappedTable< Config > Parameters
Used for ParameterSet validation (if desired)
void listen() override
Listen for connections. This method is a No-Op.