Belle II Software development
DQMHistAnalysisEpicsOutput.cc
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// Own header.
10#include <dqm/analysis/modules/DQMHistAnalysisEpicsOutput.h>
11
12using namespace std;
13using namespace Belle2;
14
15//-----------------------------------------------------------------
16// Register module
17//-----------------------------------------------------------------
18
19REG_MODULE(DQMHistAnalysisEpicsOutput);
20
23{
24 // set module description (e.g. insert text)
25 setDescription("EPICS output enabler/flusher module");
27}
28
30{
31 // Crosscheck
32 if (!getUseEpics()) {
33 B2ERROR("EPICS is not enabled, most likely DQMHistAnalysisEpicsEnableModule is missing in the beginning of the process chain.");
34 } else {
35 // -> now trigger flush to network
36 // this is the reason we want to have this module after all other Analysis modules
37 auto state = updateEpicsPVs(5.0); // 5 seconds
38 // be aware that any "error" arising from a PV in an analysis module, may only show up here (timeout etc)
39 if (state != ECA_NORMAL) checkPVStatus();
40 }
41}
42
44{
46}
47
49{
51}
52
54{
55 // -> now trigger flush to network
56 // this is the reason we want to have this module after all other Analysis modules
57 auto state = updateEpicsPVs(5.0); // 5 seconds
58 // be aware that any "error" arising from a PV in an analysis module, may only show up here (timeout etc)
59 if (state != ECA_NORMAL) checkPVStatus();
60}
void initialize(void) override final
Initialize the Module.
void endRun(void) override final
End run action.
void beginRun(void) override final
End run action.
void event(void) override final
Event action.
The base class for the histogram analysis module.
void checkPVStatus(void)
Check the status of all PVs and report if disconnected or not found.
bool getUseEpics(void)
Getter for EPICS usage.
int updateEpicsPVs(float timeout)
Update all EPICS PV (flush to network)
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
Abstract base class for different kinds of events.
STL namespace.