artdaq  v2_03_02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
TransferWrapper.hh
1 #ifndef artdaq_ArtModules_TransferWrapper_hh
2 #define artdaq_ArtModules_TransferWrapper_hh
3 
4 
5 #include <string>
6 #include <memory>
7 #include <iostream>
8 
9 #include "artdaq/TransferPlugins/TransferInterface.hh"
10 
11 #include <TBufferFile.h>
12 
13 namespace fhicl
14 {
15  class ParameterSet;
16 }
17 
18 namespace artdaq
19 {
20  class Fragment;
21 
34  {
35  public:
36 
56  explicit TransferWrapper(const fhicl::ParameterSet& pset);
57 
61  virtual ~TransferWrapper();
62 
67  void receiveMessage(std::unique_ptr<TBufferFile>& msg);
68 
69  private:
70 
71  void extractTBufferFile(const artdaq::Fragment&, std::unique_ptr<TBufferFile>&);
72 
73  void checkIntegrity(const artdaq::Fragment&) const;
74 
75  void unregisterMonitor();
76 
77  std::size_t timeoutInUsecs_;
78  std::unique_ptr<TransferInterface> transfer_;
79  const std::string dispatcherHost_;
80  const std::string dispatcherPort_;
81  const std::string serverUrl_;
82  const std::size_t maxEventsBeforeInit_;
83  const std::vector<int> allowedFragmentTypes_;
84  const bool quitOnFragmentIntegrityProblem_;
85  const size_t debugLevel_;
86  bool monitorRegistered_;
87  };
88 }
89 
90 #endif /* artdaq_ArtModules_TransferWrapper_hh */
void receiveMessage(std::unique_ptr< TBufferFile > &msg)
Receive a Fragment from the TransferInterface, and send it to art.
TransferWrapper(const fhicl::ParameterSet &pset)
TransferWrapper Constructor.
virtual ~TransferWrapper()
TransferWrapper Destructor.
TransferWrapper wraps a TransferInterface so that it can be used in the ArtdaqInput class to make an ...