DABC (Data Acquisition Backbone Core)  2.9.9
MonitorSlowControl.h
Go to the documentation of this file.
1 // $Id: MonitorSlowControl.h 4479 2020-04-15 14:30:52Z 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 MBS_MonitorSlowControl
17 #define MBS_MonitorSlowControl
18 
19 #ifndef DABC_ModuleAsync
20 #include "dabc/ModuleAsync.h"
21 #endif
22 
23 #ifndef MBS_Iterator
24 #include "mbs/Iterator.h"
25 #endif
26 
27 #ifndef MBS_SlowControlData
28 #include "mbs/SlowControlData.h"
29 #endif
30 
31 namespace mbs {
32 
40  protected:
42  bool fDoRec;
43  unsigned fSubeventId;
44  unsigned fEventNumber;
47  double fFlushTime;
48 
49  void SendDataToOutputs();
50 
51  virtual unsigned GetRecRawSize() { return fRec.GetRawSize(); }
52  virtual unsigned GetNextEventNumber() { return ++fEventNumber; }
53  virtual unsigned GetNextEventTime();
54  virtual unsigned WriteRecRawData(void* ptr, unsigned maxsize)
55  { return fRec.Write(ptr, maxsize); }
56 
57  public:
58 
59  MonitorSlowControl(const std::string &name, const std::string &prefix, dabc::Command cmd = nullptr);
60  virtual ~MonitorSlowControl();
61 
62  virtual void ProcessTimerEvent(unsigned timer);
63 
64  };
65 }
66 
67 
68 #endif
Represents command with its arguments.
Definition: Command.h:99
Base class for user-derived code, implementing event-processing.
Definition: ModuleAsync.h:32
Base class for monitoring of slow control data.
dabc::TimeStamp fLastSendTime
last time when buffer was send, used for flushing
virtual unsigned GetNextEventNumber()
unsigned fSubeventId
full id number for subevent
virtual unsigned GetRecRawSize()
virtual unsigned WriteRecRawData(void *ptr, unsigned maxsize)
virtual unsigned GetNextEventTime()
MonitorSlowControl(const std::string &name, const std::string &prefix, dabc::Command cmd=nullptr)
mbs::SlowControlData fRec
record used to store selected variables
bool fDoRec
when true, record should be filled
double fFlushTime
time to flush event
mbs::WriteIterator fIter
iterator for creating of MBS events
virtual void ProcessTimerEvent(unsigned timer)
Method called by framework when timer event is produced.
unsigned fEventNumber
Event number, written to MBS event.
Record for manipulation with slow control data.
unsigned Write(void *buf, unsigned buflen)
Write iterator for MBS events/subevents.
Definition: Iterator.h:97
Support for MBS - standard GSI DAQ.
Definition: api.h:36
Class for acquiring and holding timestamps.
Definition: timing.h:40