Belle II Software  release-06-00-14
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/analysis/modules/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 
29 namespace Belle2 {
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 
59 
61  virtual void initialize() override;
62 
64  virtual void beginRun() override;
65  virtual void event() override;
66  virtual void endRun() override;
67  virtual void terminate() override;
68 
69  // Data members
70  private:
74  bool m_callback;
76  bool m_server;
77  //THttpServer* m_serv{0};
78  //int m_nhist = 0;
79 
81  std::vector< std::vector<std::string>> m_histlist;
82 
83 #ifdef _BELLE2_EPICS
84  std::vector<MYNODE*> pmynode;
85 #endif
86 
89 
91  unsigned int m_expno = 0;
93  unsigned int m_runno = 0;
95  unsigned int m_count = 0;
96  };
98 } // end namespace Belle2
99 
Class definition for the output module of Sequential ROOT I/O.
virtual void initialize() override
Module functions to be called from main process.
virtual void event() override
This method is the core of the module.
virtual void endRun() override
This method is called if the current run ends.
virtual void terminate() override
This method is called at the end of the event processing.
virtual void beginRun() override
Module functions to be called from event process.
bool m_server
Whether to start http server on port 8082.
std::vector< std::vector< std::string > > m_histlist
Parameter list for histograms.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
The metadata for each event.
bool m_callback
Whether to use EPICS callback for changes.
DQMHistAnalysisInputPVSrvModule()
Constructor / Destructor.
The base class for the histogram analysis module.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:95
Abstract base class for different kinds of events.