otsdaq  v1_01_03
 All Classes Namespaces Functions
DataBufferConfiguration.h
1 #ifndef ots_DataBufferConfiguration_h
2 #define ots_DataBufferConfiguration_h
3 
4 #include "otsdaq-core/ConfigurationDataFormats/ConfigurationBase.h"
5 
6 #include <string>
7 #include <map>
8 #include <vector>
9 
10 namespace ots
11 {
12 
14 {
15 
16 public:
17 
19  virtual ~DataBufferConfiguration(void);
20 
21  //Methods
22  void init(ConfigurationManager *configManager);
23 
24  //Getter
25  std::vector<std::string> getProcessorIDList (std::string dataBufferID) const;
26 
27  std::vector<std::string> getProducerIDList (std::string dataBufferID) const;
28  bool getProducerStatus (std::string dataBufferID, std::string producerID) const;
29  std::string getProducerClass (std::string dataBufferID, std::string producerID) const;
30 
31  std::vector<std::string> getConsumerIDList (std::string dataBufferID) const;
32  bool getConsumerStatus (std::string dataBufferID, std::string consumerID) const;
33  std::string getConsumerClass (std::string dataBufferID, std::string consumerID) const;
34 
35 private:
36 
37  enum{
38  UniqueID,
39  DataBufferID,
40  ProcessorID,
41  ProcessorType,
42  ProcessorClass,
43  ProcessorStatus
44  };
45 
46  struct Info
47  {
48  std::string class_;
49  bool status_;
50  };
51 
52  struct BufferProcessors
53  {
54  std::map<std::string, Info> producers_;
55  std::map<std::string, Info> consumers_;
56  std::map<std::string, Info> processors_;
57  };
58  //DataBufferID,
59  std::map<std::string, BufferProcessors> processorInfos_;
60 
61 };
62 }
63 #endif