$treeview $search $mathjax $extrastylesheet
artdaq
v3_04_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 #ifndef artdaq_ArtModules_TransferWrapper_hh 00002 #define artdaq_ArtModules_TransferWrapper_hh 00003 00004 00005 #include <string> 00006 #include <memory> 00007 #include <iostream> 00008 00009 #include "artdaq/TransferPlugins/TransferInterface.hh" 00010 #include "artdaq/ExternalComms/CommanderInterface.hh" 00011 00012 #include <TBufferFile.h> 00013 00014 namespace fhicl 00015 { 00016 class ParameterSet; 00017 } 00018 00019 namespace artdaq 00020 { 00021 class Fragment; 00022 00034 class TransferWrapper 00035 { 00036 public: 00037 00057 explicit TransferWrapper(const fhicl::ParameterSet& pset); 00058 00062 virtual ~TransferWrapper(); 00063 00068 void receiveMessage(std::unique_ptr<TBufferFile>& msg); 00069 00074 void receiveInitMessage(std::unique_ptr<TBufferFile>& msg) { receiveMessage(msg); } 00075 00076 private: 00077 00078 void extractTBufferFile(const artdaq::Fragment&, std::unique_ptr<TBufferFile>&); 00079 00080 void checkIntegrity(const artdaq::Fragment&) const; 00081 00082 void unregisterMonitor(); 00083 00084 std::size_t timeoutInUsecs_; 00085 std::unique_ptr<TransferInterface> transfer_; 00086 std::unique_ptr<CommanderInterface> commander_; 00087 const std::string dispatcherHost_; 00088 const std::string dispatcherPort_; 00089 const std::string serverUrl_; 00090 const std::size_t maxEventsBeforeInit_; 00091 const std::vector<int> allowedFragmentTypes_; 00092 const bool quitOnFragmentIntegrityProblem_; 00093 bool monitorRegistered_; 00094 }; 00095 } 00096 00097 #endif /* artdaq_ArtModules_TransferWrapper_hh */