Belle II Software  release-08-00-10
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 
12 #include <TH1F.h>
13 
14 using namespace std;
15 using namespace Belle2;
16 
17 //-----------------------------------------------------------------
18 // Register module
19 //-----------------------------------------------------------------
20 
21 REG_MODULE(DQMHistAnalysisEpicsOutput);
22 
23 DQMHistAnalysisEpicsOutputModule::DQMHistAnalysisEpicsOutputModule()
25 {
26  // set module description (e.g. insert text)
27  setDescription("EPICS output enabler/flusher module");
29 }
30 
32 {
33  // Crosscheck
34  if (!getUseEpics()) {
35  B2ERROR("EPICS is not enabled, most likely DQMHistAnalysisEpicsEnableModule is missing in the beginning of the process chain.");
36  }
37 }
38 
40 {
41  // -> now trigger flush to network
42  // this is the reason we want to have this modul after all other Analysis modules
43  updateEpicsPVs(5.0); // 5 seconds
44  // be aware that any "error" arising from a PV in an analysis module, may only show up here (timeout etc)
45 }
void initialize() override final
Initialize the Module.
The base class for the histogram analysis module.
void updateEpicsPVs(float timeout)
Update all EPICS PV (flush to network)
bool getUseEpics(void)
Getter for EPICS usage.
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.