Belle II Software development
DQMHistAnalysisEpicsEnable.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/DQMHistAnalysisEpicsEnable.h>
11
12using namespace std;
13using namespace Belle2;
14
15//-----------------------------------------------------------------
16// Register module
17//-----------------------------------------------------------------
18
19REG_MODULE(DQMHistAnalysisEpicsEnable);
20
23{
24 // set module description (e.g. insert text)
25 setDescription("EPICS output enabler module");
27
28 addParam("useEpicsReadOnly", m_useEpicsRO, "use Epics Read Only", false);
29 addParam("PVPrefix", m_locPVPrefix, "Set EPICS PV prefix", std::string("TEST:"));
30
31#ifdef _BELLE2_EPICS
32 if (!ca_current_context()) SEVCHK(ca_context_create(ca_disable_preemptive_callback), "ca_context_create");
33#endif
34}
35
37{
38#ifdef _BELLE2_EPICS
39 if (ca_current_context()) ca_context_destroy();
40#endif
41}
42
44{
45#ifdef _BELLE2_EPICS
46 setUseEpics(true); // set always true
49#endif
50}
void initialize() override final
Initialize the Module.
std::string m_locPVPrefix
local PVPrefix for setting as global
bool m_useEpicsRO
Read Only local flag for EPICS.
The base class for the histogram analysis module.
void setPVPrefix(std::string &prefix)
set global Prefix for EPICS PVs
void setUseEpics(bool flag)
Setter for EPICS usage.
void setUseEpicsReadOnly(bool flag)
Setter EPICS flag in read only mode.
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
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#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.