Belle II Software  release-06-00-14
DQMHistOutputToEPICS.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 //+
9 // File : DQMHistOutputToEPICS.h
10 // Description : Write Histogram Content to EPICS Arrays
11 //-
12 
13 #pragma once
14 
15 #include <dqm/analysis/modules/DQMHistAnalysis.h>
16 #include <string>
17 
18 #ifdef _BELLE2_EPICS
19 #include "cadef.h"
20 #include "dbDefs.h"
21 #include "epicsString.h"
22 #include "cantProceed.h"
23 #endif
24 
25 namespace Belle2 {
33 
34 #ifdef _BELLE2_EPICS
35  typedef struct {
36  chid mychid;
37  chid mychid_last;
38  std::string histoname;
39  std::vector <double> data;
40  } MYNODE;
41 #endif
42 
43  // Public functions
44  public:
45 
50 
51  private:
52 
54  void initialize(void) override final;
55 
57  void beginRun(void) override final;
58  void endRun(void) override final;
59  void event(void) override final;
60  void terminate(void) override final;
61 
63  void copyToLast(void);
65  void cleanPVs(void);
66 
67  // Data members
69  std::vector< std::vector<std::string>> m_histlist;
70 
72  bool m_dirty = false;
73 
74 #ifdef _BELLE2_EPICS
75  std::vector<MYNODE*> pmynode;
76 #endif
77 
78  };
80 } // end namespace Belle2
81 
The base class for the histogram analysis module.
Write DQM Histogram Content to EPICS Arrays.
void terminate(void) override final
This method is called at the end of the event processing.
void initialize(void) override final
Module functions to be called from main process.
void endRun(void) override final
This method is called if the current run ends.
void cleanPVs(void)
set PVs to zero content (at run start)
std::vector< std::vector< std::string > > m_histlist
Parameter list for histograms.
void copyToLast(void)
copy over to "last" PV
bool m_dirty
Flag to mark that a new runs as started anddata not copied to last PV.
void beginRun(void) override final
Module functions to be called from event process.
void event(void) override final
This method is the core of the module.
Abstract base class for different kinds of events.