Belle II Software development
DQMHistAnalysisInputPVSrv.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 : DQMHistAnalysisInputPVSrv.h
10// Description : Input module for DQM Histogram analysis
11//-
12
13#pragma once
14
15#include <framework/dataobjects/EventMetaData.h>
16#include <framework/datastore/StoreObjPtr.h>
17
18#include <dqm/core/DQMHistAnalysis.h>
19//#include <THttpServer.h>
20
21#include <string>
22#ifdef _BELLE2_EPICS
23#include "cadef.h"
24#include "dbDefs.h"
25#include "epicsString.h"
26#include "cantProceed.h"
27#endif
28
29namespace Belle2 {
35
36#ifdef _BELLE2_EPICS
37#define MAX_PV_NAME_LEN 40
38
39 typedef struct {
40 char name[MAX_PV_NAME_LEN];
41 chid mychid;
42 evid myevid;
43 bool changed;
44 TH1* histo;
45 unsigned int binx; // not needed until now
46 unsigned int biny; // not needed until now
47 unsigned int binmax; // store bincount to prevent overflow
48 } MYNODE;
49#endif
50
52
53 // Public functions
54 public:
55
60
64 void initialize() override final;
65
69 void beginRun() override final;
70
74 void event() override final;
75
79 void endRun() override final;
80
84 void terminate() override final;
85
86 // Data members
87 private:
94 //THttpServer* m_serv{0};
95 //int m_nhist = 0;
96
98 std::vector< std::vector<std::string>> m_histlist;
99
100#ifdef _BELLE2_EPICS
101 std::vector<MYNODE*> pmynode;
102#endif
103
106
108 unsigned int m_expno = 0;
110 unsigned int m_runno = 0;
112 unsigned int m_count = 0;
113 };
114
115} // end namespace Belle2
116
void initialize() override final
Definition of the histograms.
void terminate() override final
This method is called at the end of the event processing.
void event() override final
This method is called for each event.
void endRun() override final
This method is called if the current run ends.
bool m_server
Whether to start http server on port 8082.
std::vector< std::vector< std::string > > m_histlist
Parameter list for histograms.
void beginRun() override final
Called when entering a new run.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
The metadata for each event.
bool m_callback
Whether to use EPICS callback for changes.
DQMHistAnalysisModule()
Constructor / Destructor.
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
Abstract base class for different kinds of events.