DABC (Data Acquisition Backbone Core)  2.9.9
Player.h
Go to the documentation of this file.
1 // $Id: Player.h 3862 2018-05-11 10:06:18Z linev $
2 
3 /************************************************************
4  * The Data Acquisition Backbone Core (DABC) *
5  ************************************************************
6  * Copyright (C) 2009 - *
7  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
8  * Planckstr. 1, 64291 Darmstadt, Germany *
9  * Contact: http://dabc.gsi.de *
10  ************************************************************
11  * This software can be used under the GPL license *
12  * agreements as stated in LICENSE.txt file *
13  * which is part of the distribution. *
14  ************************************************************/
15 
16 #ifndef FESA_Player
17 #define FESA_Player
18 
19 
20 #ifndef DABC_ModuleAsync
21 #include "dabc/ModuleAsync.h"
22 #endif
23 
24 #ifndef DABC_Hierarchy
25 #include "dabc/Hierarchy.h"
26 #endif
27 
28 class rdaDeviceHandle;
29 class rdaRDAService;
30 class MySniffer;
31 
32 namespace fesa {
33 
41  class Player : public dabc::ModuleAsync {
42  protected:
43  virtual void BeforeModuleStart() {}
44 
45  virtual void AfterModuleStop() {}
46 
47  unsigned fCounter;
48 
49  MySniffer* fSniffer;
50  void* fHist;
51 
52  std::string fServerName;
53  std::string fDeviceName;
54  std::string fCycles;
55  std::string fService;
56  std::string fField;
57 
58  rdaRDAService* fRDAService;
59  rdaDeviceHandle* fDevice;
60 
61  double doGet(const std::string &service, const std::string &field);
62 
63  public:
64 
65  Player(const std::string &name, dabc::Command cmd = nullptr);
66  virtual ~Player();
67 
68  virtual void ModuleCleanup() {}
69 
70  virtual void ProcessTimerEvent(unsigned timer);
71 
72  virtual int ExecuteCommand(dabc::Command cmd);
73  };
74 }
75 
76 
77 #endif
Represents command with its arguments.
Definition: Command.h:99
Base class for user-derived code, implementing event-processing.
Definition: ModuleAsync.h:32
Player of FESA data.
Definition: Player.h:41
void * fHist
ROOT histogram.
Definition: Player.h:50
rdaRDAService * fRDAService
Definition: Player.h:58
virtual void BeforeModuleStart()
Definition: Player.h:43
std::string fCycles
cycles parameter
Definition: Player.h:54
virtual ~Player()
Definition: Player.cxx:125
virtual void AfterModuleStop()
Definition: Player.h:45
virtual void ProcessTimerEvent(unsigned timer)
Method called by framework when timer event is produced.
Definition: Player.cxx:129
virtual int ExecuteCommand(dabc::Command cmd)
Main method where commands are executed.
Definition: Player.cxx:211
std::string fService
service name
Definition: Player.h:55
std::string fServerName
FESA server name.
Definition: Player.h:52
double doGet(const std::string &service, const std::string &field)
Definition: Player.cxx:256
std::string fDeviceName
FESA device name.
Definition: Player.h:53
Player(const std::string &name, dabc::Command cmd=nullptr)
Definition: Player.cxx:64
std::string fField
field name in the service
Definition: Player.h:56
rdaDeviceHandle * fDevice
Definition: Player.h:59
unsigned fCounter
Definition: Player.h:47
MySniffer * fSniffer
binary producer for ROOT objects
Definition: Player.h:49
virtual void ModuleCleanup()
Method, which can be reimplemented by user and should cleanup all references on buffers and other obj...
Definition: Player.h:68
Support for FESA - the control system of GSI/FAIR accelerator.
Definition: Factory.h:25