otsdaq  v2_05_02_indev
ARTDAQReaderProcessorBase.h
1 #ifndef _ots_ARTDAQReaderProcessorBase_h_
2 #define _ots_ARTDAQReaderProcessorBase_h_
3 
4 #include "artdaq/Application/BoardReaderApp.hh"
5 #include "otsdaq/Configurable/Configurable.h"
6 
7 #include <future>
8 #include <memory>
9 #include <string>
10 
11 namespace ots
12 {
13 // ARTDAQReaderProcessorBase
14 // This class is a Data Processor base class for the Consumer and Producer Plugin that
15 // allows a single artdaq Board Reader to be
16 // instantiated on an otsdaq Buffer.
18 {
19  public:
20  ARTDAQReaderProcessorBase(std::string supervisorApplicationUID,
21  std::string bufferUID,
22  std::string processorUID,
23  const ConfigurationTree& theXDAQContextConfigTree,
24  const std::string& configurationPath);
25  virtual ~ARTDAQReaderProcessorBase(void);
26 
27  // void destroy (void);
28  // void configure (fhicl::ParameterSet const& pset);
29 
30  // these functions are not inherited, they define the core reader functionality
31  void initLocalGroup(int rank);
32  void configure(int rank);
33  void halt(void);
34  void pause(void);
35  void resume(void);
36  void start(const std::string& runNumber);
37  void stop(void);
38 
39  // void pauseProcessingData(void);
40  // void resumeProcessingData(void);
41  // void startProcessingData(std::string runNumber) override;
42  // void stopProcessingData(void);
43 
44  // int universalRead (char *address, char *returnValue) override {;}
45  // void universalWrite (char *address, char *writeValue) override {;}
46  // artdaq::BoardReaderCore* getFragmentReceiverPtr(){return
47  // fragment_receiver_ptr_.get();} void ProcessData_(artdaq::FragmentPtrs & frags)
48  // override;
49 
50  private:
51  // bool workLoopThread(toolbox::task::WorkLoop* workLoop) { return false; }
52 
53  std::unique_ptr<artdaq::BoardReaderApp> fragment_receiver_ptr_;
54  const std::string name_;
55  fhicl::ParameterSet fhiclConfiguration_;
56 };
57 
58 } // namespace ots
59 
60 #endif