DABC (Data Acquisition Backbone Core)  2.9.9
RecalibrateModule.h
Go to the documentation of this file.
1 // $Id: RecalibrateModule.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 STREAM_RecalibrateModule
17 #define STREAM_RecalibrateModule
18 
19 #ifndef DABC_ModuleAsync
20 #include "dabc/ModuleAsync.h"
21 #endif
22 
23 namespace hadaq {
24  class HldProcessor;
25 }
26 
27 namespace stream {
28 
29  class DabcProcMgr;
30 
31 
38 
39  protected:
40 
41  int fNumSub; // number of sub-modules
42  bool fReplace; // replace or not TDC messages
43  DabcProcMgr *fProcMgr; // central process manager
44  hadaq::HldProcessor *fHLD; // processor of HLD events
45 
46  virtual int ExecuteCommand(dabc::Command cmd);
47 
48  virtual void OnThreadAssigned();
49 
50  bool retransmit();
51 
52  public:
53 
54  RecalibrateModule(const std::string &name, dabc::Command cmd = nullptr);
55  virtual ~RecalibrateModule();
56 
57  virtual bool ProcessRecv(unsigned) { return retransmit(); }
58 
59  virtual bool ProcessSend(unsigned) { return retransmit(); }
60 
61  virtual bool ProcessBuffer(unsigned) { return retransmit(); }
62 
63  virtual void BeforeModuleStart();
64 
65  virtual void AfterModuleStop();
66  };
67 }
68 
69 
70 #endif
Represents command with its arguments.
Definition: Command.h:99
Base class for user-derived code, implementing event-processing.
Definition: ModuleAsync.h:32
Runs code of stream framework.
virtual int ExecuteCommand(dabc::Command cmd)
Main method where commands are executed.
hadaq::HldProcessor * fHLD
virtual bool ProcessBuffer(unsigned)
Method called by framework when at least one buffer available in pool handle.
RecalibrateModule(const std::string &name, dabc::Command cmd=nullptr)
virtual bool ProcessRecv(unsigned)
Method called by framework when at least one buffer available in input port.
virtual bool ProcessSend(unsigned)
Method called by framework when at least one buffer can be send to output port.
Support for HADAQ - HADES DAQ
Definition: api.h:27
Support for stream framework in DABC
Definition: DabcProcMgr.h:25