Belle II Software  release-05-01-25
ERecoEventSampler.h
1 #ifndef ERECO_EVENT_SAMPLER_H
2 #define ERECO_EVENT_SAMPLER_H
3 //+
4 // File : ERecoEventSampler.h
5 // Description : Fetch events from event processes and place them in a RingBuffer
6 //
7 // Author : Ryosuke Itoh, IPNS, KEK
8 // Date : 17 - Dec - 2013
9 //-
10 
11 #include <string>
12 
13 #include <daq/rfarm/manager/RFConf.h>
14 #include <daq/rfarm/manager/RFProcessManager.h>
15 #include <daq/rfarm/manager/RFLogManager.h>
16 #include <daq/rfarm/manager/RFServerBase.h>
17 
18 #include <framework/pcore/RingBuffer.h>
19 
20 #include <nsm2/nsm2.h>
21 
22 #define MAXEVTSIZE 80000000
23 
24 namespace Belle2 {
30  public:
31  ERecoEventSampler(std::string conffile);
33 
34  // Functions to be hooked to NSM
35  int Configure(NSMmsg*, NSMcontext*);
36  int UnConfigure(NSMmsg*, NSMcontext*);
37  int Start(NSMmsg*, NSMcontext*);
38  int Stop(NSMmsg*, NSMcontext*);
39  int Restart(NSMmsg*, NSMcontext*);
40 
41  // Server function
42  void server();
43 
44  private:
45  RFConf* m_conf;
46  std::string m_conffile;
47  RFProcessManager* m_proc;
48  RFLogManager* m_log;
49  RingBuffer* m_rbufout;
50 
51  int m_pid_sampler;
52  int m_pid_server;
53 
54  };
55 
57 }
58 #endif
NSMmsg
Definition: nsm2.h:217
Belle2::RFLogManager
Definition: RFLogManager.h:18
Belle2::RingBuffer
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition: RingBuffer.h:36
Belle2::RFProcessManager
Definition: RFProcessManager.h:22
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::RFServerBase
Definition: RFServerBase.h:20
Belle2::ERecoEventSampler
Definition: ERecoEventSampler.h:29
Belle2::RFConf
Definition: RFConf.h:24
NSMcontext_struct
Definition: nsmlib2.h:66