Belle II Software development
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/core/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
25namespace 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
55
59 void initialize(void) override final;
60
64 void beginRun(void) override final;
65
69 void endRun(void) override final;
70
74 void event(void) override final;
75
79 void terminate(void) override final;
80
81 private:
82
84 void copyToLast(void);
86 void cleanPVs(void);
87
88 // Data members
90 std::vector< std::vector<std::string>> m_histlist;
91
93 bool m_dirty = false;
94
95#ifdef _BELLE2_EPICS
96 std::vector<MYNODE*> pmynode;
97#endif
98
99 };
101} // end namespace Belle2
102
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
Initializer.
void endRun(void) override final
This method is called for each event.
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 and data not copied to last PV.
void beginRun(void) override final
Called when entering a new run.
void event(void) override final
This method is called if the current run ends.
Abstract base class for different kinds of events.