QualityControl  1.5.1
O2 Data Quality Control Framework
DataDumpGui.h
Go to the documentation of this file.
1 // Copyright CERN and copyright holders of ALICE O2. This software is
2 // distributed under the terms of the GNU General Public License v3 (GPL
3 // Version 3), copied verbatim in the file "COPYING".
4 //
5 // See http://alice-o2.web.cern.ch/license for full licensing information.
6 //
7 // In applying this license CERN does not waive the privileges and immunities
8 // granted to it by virtue of its status as an Intergovernmental Organization
9 // or submit itself to any jurisdiction.
10 //
11 
16 
17 #ifndef QC_CORE_DATADUMP_H
18 #define QC_CORE_DATADUMP_H
19 
20 #include <string>
21 
22 #include <fairmq/FairMQDevice.h>
23 
25 {
26 
30 struct Chunk {
31  size_t size;
32  unsigned char* data;
33 
34  Chunk()
35  {
36  size = 0;
37  data = nullptr;
38  }
39 };
40 
45 struct GUIState {
46  GUIState() { newDataAvailable = false; }
47 
48  bool newDataAvailable;
49  std::string actionMessage;
50  std::string dataAvailableMessage;
51  Chunk current_payload;
52  Chunk next_payload;
53  Chunk current_header;
54  Chunk next_header;
55 };
56 
60 class DataDumpGui : public FairMQDevice
61 {
62  public:
63  DataDumpGui() = default;
64  virtual ~DataDumpGui() = default;
65 
66  static GUIState guiState;
67  static void* window;
68 
69  protected:
70  void InitTask() override;
71  bool ConditionalRun() override;
72  bool handleParts(FairMQParts& parts);
73 
74  private:
75  static void assignDataToChunk(void* data, size_t size, Chunk& chunk);
76 };
77 } // namespace o2::quality_control::core
78 
79 #endif // QC_CORE_DATADUMP_H
Definition: DataDumpGui.h:30
Definition: DataDumpGui.h:60
These methods can be used to build a complex processing topology. It spawns 3 separate dummy processi...
Definition: Activity.h:19
Definition: DataDumpGui.h:45