otsdaq  v2_01_00
ARTDAQProducer.h
1 #ifndef _ots_ARTDAQProducer_h_
2 #define _ots_ARTDAQProducer_h_
3 
4 #include "otsdaq-core/DataManager/DataProducer.h"
5 #include "otsdaq-core/Configurable/Configurable.h"
6 #include "artdaq/Application/BoardReaderApp.hh"
7 
8 
9 #include <future>
10 #include <memory>
11 #include <string>
12 
13 namespace ots
14 {
15 
16 //ARTDAQProducer
17 // This class is a Data Producer Plugin that allows a single artdaq Event Builder to be instantiate as a Producer to an otsdaq Buffer.
19 {
20 
21 public:
22  ARTDAQProducer (std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID, const ConfigurationTree& theXDAQContextConfigTree, const std::string& configurationPath);
23  virtual ~ARTDAQProducer(void);
24 
25  void initLocalGroup (int rank);
26  //void destroy (void);
27 
28  //void configure (fhicl::ParameterSet const& pset);
29  void configure (int rank);
30  void halt (void);
31  void pauseProcessingData (void);
32  void resumeProcessingData(void);
33  void startProcessingData (std::string runNumber) override;
34  void stopProcessingData (void);
35  //int universalRead (char *address, char *returnValue) override {;}
36  //void universalWrite (char *address, char *writeValue) override {;}
37  //artdaq::BoardReaderCore* getFragmentReceiverPtr(){return fragment_receiver_ptr_.get();}
38  //void ProcessData_(artdaq::FragmentPtrs & frags) override;
39 
40 private:
41  bool workLoopThread(toolbox::task::WorkLoop* workLoop){return false;}
42 
43  std::unique_ptr<artdaq::BoardReaderApp> fragment_receiver_ptr_;
44  std::string name_;
45 
46  //FIXME These should go...
47  std::string report_string_;
48  bool external_request_status_;
49  fhicl::ParameterSet fhiclConfiguration_;
50 };
51 
52 }
53 
54 #endif