Midas C++ API - TMFE frontend framework
This page contains the full API reference for TMFE, the object-oriented C++ framework for writing frontends (tmfe.h).
For the concepts and day-to-day use, see Frontends: overview.
For explanations and examples of writing frontends, see Frontends: programming.
TMFrontend
Defined in include/tmfe.h:308
Methods
FeAddEquipment
TMFeResult FeAddEquipment(TMFeEquipment* eq)
NOTE: not thread-safe, we modify the fEquipments object. K.O.
Declared in include/tmfe.h:341, defined in src/tmfe.cxx:1657
FeDeleteEquipments
void FeDeleteEquipments()
NOTE: this is thread-safe: we do not modify the fEquipments object. K.O. NOTE: this is not thread-safe, we will race against ourselves and do multiple delete of fEquipents[i]. K.O.
Declared in include/tmfe.h:350, defined in src/tmfe.cxx:1638
FeInit
TMFeResult FeInit(const std::vector<std::string>& args)
main loop
Declared in include/tmfe.h:358, defined in src/tmfe.cxx:2346
FeInitEquipments
TMFeResult FeInitEquipments(const std::vector<std::string>& args)
NOTE: cannot use range-based for() loop, it uses an iterator and will crash if HandleInit() modifies fEquipments. K.O.
Declared in include/tmfe.h:349, defined in src/tmfe.cxx:1613
FeMain
Note: this method has 2 different signatures.
FeMain
int FeMain(int argc, char* argv[])
main program, main event loop
Declared in include/tmfe.h:328, defined in src/tmfe.cxx:2336
FeMain
int FeMain(const std::vector<std::string>& args)
Declared in include/tmfe.h:329, defined in src/tmfe.cxx:2511
FeMainLoop
void FeMainLoop()
Declared in include/tmfe.h:359, defined in src/tmfe.cxx:2494
FePeriodicTasks
double FePeriodicTasks()
Declared in include/tmfe.h:354, defined in src/tmfe.cxx:507
FePeriodicThread
void FePeriodicThread()
periodic thread methods, thread-safe
Declared in include/tmfe.h:366, defined in src/tmfe.cxx:883
FePollMidas
void FePollMidas(double sleep_sec)
scheduler
Declared in include/tmfe.h:363, defined in src/tmfe.cxx:745
FePollTasks
double FePollTasks(double next_periodic_time)
printf("poll %f next %f diff %f\n", TMFE::GetTime(), next_periodic_time, next_periodic_time - TMFE::GetTime());
Declared in include/tmfe.h:355, defined in src/tmfe.cxx:583
FeRemoveEquipment
TMFeResult FeRemoveEquipment(TMFeEquipment* eq)
NOTE: this is thread-safe, we do not modify the fEquipments object. K.O.
Declared in include/tmfe.h:347, defined in src/tmfe.cxx:1687
FeSetName
void FeSetName(const char* program_name)
frontend init functions
Declared in include/tmfe.h:340, defined in src/tmfe.cxx:1704
FeShutdown
void FeShutdown()
Declared in include/tmfe.h:360, defined in src/tmfe.cxx:2501
FeStartPeriodicThread
void FeStartPeriodicThread()
NOTE: this is thread safe
Declared in include/tmfe.h:367, defined in src/tmfe.cxx:919
FeStopEquipmentPollThreads
void FeStopEquipmentPollThreads()
NOTE: should not use range-based for() loop, it uses an iterator and it not thread-safe. K.O.
Declared in include/tmfe.h:352, defined in src/tmfe.cxx:1628
FeStopPeriodicThread
void FeStopPeriodicThread()
NOTE: this is thread safe
Declared in include/tmfe.h:368, defined in src/tmfe.cxx:963
FeUsage
void FeUsage(const char* argv0)
Declared in include/tmfe.h:330, defined in src/tmfe.cxx:2307
HandleArguments
virtual
virtual TMFeResult HandleArguments(const std::vector<std::string>& args)
user provided handlers, see tmfe.md
Defined in include/tmfe.h:333
HandleFrontendExit
virtual
virtual void HandleFrontendExit()
Defined in include/tmfe.h:337
HandleFrontendInit
virtual
virtual TMFeResult HandleFrontendInit(const std::vector<std::string>& args)
Defined in include/tmfe.h:335
HandleFrontendReady
virtual
virtual TMFeResult HandleFrontendReady(const std::vector<std::string>& args)
Defined in include/tmfe.h:336
HandleUsage
virtual
virtual void HandleUsage()
Defined in include/tmfe.h:334
TMFrontend
TMFrontend()
ctor
Declared in include/tmfe.h:324, defined in src/tmfe.cxx:1597
~TMFrontend
virtual
virtual ~TMFrontend()
dtor
Declared in include/tmfe.h:325, defined in src/tmfe.cxx:1602
Attributes
fFeEquipments
std::vector<TMFeEquipment*> fFeEquipments
equipment functions NOTE: fFeEquipments must be protected against multithreaded write access. K.O.
Defined in include/tmfe.h:345
fFeFlushWriteCacheNextCallTime
double fFeFlushWriteCacheNextCallTime = 0
Defined in include/tmfe.h:378
fFeFlushWriteCachePeriodSec
double fFeFlushWriteCachePeriodSec = 0.5
flush write cache
Defined in include/tmfe.h:377
fFeIfRunningCallBeginRun
bool fFeIfRunningCallBeginRun = true
Defined in include/tmfe.h:318
fFeIfRunningCallExit
bool fFeIfRunningCallExit = false
Defined in include/tmfe.h:317
fFeIndex
int fFeIndex = 0
configuration < frontend index
Defined in include/tmfe.h:315
fFeMutex
std::mutex fFeMutex
multithreaded lock
Defined in include/tmfe.h:321
fFePeriodicThread
std::thread* fFePeriodicThread = NULL
periodic thread internal data
Defined in include/tmfe.h:371
fFePeriodicThreadRunning
std::atomic_bool fFePeriodicThreadRunning {false}
Defined in include/tmfe.h:373
fFePeriodicThreadShutdownRequested
std::atomic_bool fFePeriodicThreadShutdownRequested {false}
Defined in include/tmfe.h:374
fFePeriodicThreadStarting
std::atomic_bool fFePeriodicThreadStarting {false}
Defined in include/tmfe.h:372
fFeRpcHelper
TMFrontendRpcHelper* fFeRpcHelper = NULL
Defined in include/tmfe.h:312
fMfe
TMFE* fMfe = NULL
configuration
Defined in include/tmfe.h:311
TMFeEquipment
class TMFeEquipment : public TMFeRpcHandlerInterface
Defined in include/tmfe.h:157
Methods
BkClose
const
TMFeResult BkClose(char* pevent, void* ptr) const
Declared in include/tmfe.h:291, defined in src/tmfe.cxx:2265
BkInit
const
TMFeResult BkInit(char* pevent, size_t size) const
Declared in include/tmfe.h:289, defined in src/tmfe.cxx:2252
BkOpen
const
void*BkOpen(char* pevent, const char* bank_name, int bank_type) const
Declared in include/tmfe.h:290, defined in src/tmfe.cxx:2258
BkSize
const
int BkSize(const char* pevent) const
Declared in include/tmfe.h:292, defined in src/tmfe.cxx:2247
ComposeEvent
const
TMFeResult ComposeEvent(char* pevent, size_t size) const
temporary event composition methods, to bre replaced by the "event object"
Declared in include/tmfe.h:288, defined in src/tmfe.cxx:2052
EqInit
TMFeResult EqInit(const std::vector<std::string>& args)
Initialize equipment
Declared in include/tmfe.h:249, defined in src/tmfe.cxx:1757
EqPollThread
void EqPollThread()
Declared in include/tmfe.h:280, defined in src/tmfe.cxx:621
EqPostInit
TMFeResult EqPostInit()
Initialize equipment, after EquipmentBase::Init()
Declared in include/tmfe.h:251, defined in src/tmfe.cxx:1910
EqPreInit
TMFeResult EqPreInit()
Initialize equipment, before EquipmentBase::Init()
Declared in include/tmfe.h:250, defined in src/tmfe.cxx:1860
EqReadCommon
TMFeResult EqReadCommon()
Read TMFeEqInfo from ODB /Equipment/NAME/Common
Declared in include/tmfe.h:252, defined in src/tmfe.cxx:1776
EqSendEvent
Note: this method has 4 different signatures.
EqSendEvent
TMFeResult EqSendEvent(const char* pevent, bool write_to_odb = true)
thread-safe methods
Declared in include/tmfe.h:295, defined in src/tmfe.cxx:2063
EqSendEvent
TMFeResult EqSendEvent(const std::vector<char>& event, bool write_to_odb = true)
Declared in include/tmfe.h:296, defined in src/tmfe.cxx:2102
EqSendEvent
TMFeResult EqSendEvent(const std::vector<std::vector<char>>& event, bool write_to_odb = true)
Declared in include/tmfe.h:297, defined in src/tmfe.cxx:2140
EqSendEvent
TMFeResult EqSendEvent(int sg_n, const char* sg_ptr[], const size_t sg_len[], bool write_to_odb = true)
Declared in include/tmfe.h:298, defined in src/tmfe.cxx:2180
EqSetStatus
TMFeResult EqSetStatus(const char* status, const char* color)
Declared in include/tmfe.h:302, defined in src/tmfe.cxx:2272
EqStartPollThread
void EqStartPollThread()
NOTE: this is thread safe
Declared in include/tmfe.h:281, defined in src/tmfe.cxx:648
EqStopPollThread
void EqStopPollThread()
NOTE: this is thread safe
Declared in include/tmfe.h:282, defined in src/tmfe.cxx:665
EqWriteCommon
TMFeResult EqWriteCommon(bool create = false)
Write TMFeEqInfo to ODB /Equipment/NAME/Common
Declared in include/tmfe.h:253, defined in src/tmfe.cxx:1819
EqWriteEventToOdb
TMFeResult EqWriteEventToOdb(const char* pevent)
Declared in include/tmfe.h:299, defined in src/tmfe.cxx:2220
EqWriteStatistics
TMFeResult EqWriteStatistics()
Declared in include/tmfe.h:301, defined in src/tmfe.cxx:2007
EqZeroStatistics
TMFeResult EqZeroStatistics()
Declared in include/tmfe.h:300, defined in src/tmfe.cxx:1982
HandleBeginRun
virtual
virtual TMFeResult HandleBeginRun(int run_number)
optional RPC handlers are called by the RPC thread
Defined in include/tmfe.h:263
HandleBinaryRpc
virtual
virtual TMFeResult HandleBinaryRpc(const char* cmd, const char* args, std::vector<char>& result)
Defined in include/tmfe.h:269
HandleEndRun
virtual
virtual TMFeResult HandleEndRun(int run_number)
Defined in include/tmfe.h:264
HandleInit
virtual
virtual TMFeResult HandleInit(const std::vector<std::string>& args)
handlers for initialization are called by the main thread
Defined in include/tmfe.h:259
HandlePauseRun
virtual
virtual TMFeResult HandlePauseRun(int run_number)
Defined in include/tmfe.h:265
HandlePeriodic
virtual
virtual void HandlePeriodic()
optional periodic equipment handler is called by the periodic thread
Defined in include/tmfe.h:272
HandlePoll
virtual
virtual bool HandlePoll()
optional polled equipment handler is called by the per-equipment poll thread
Defined in include/tmfe.h:275
HandlePollRead
virtual
virtual void HandlePollRead()
Defined in include/tmfe.h:276
HandleResumeRun
virtual
virtual TMFeResult HandleResumeRun(int run_number)
Defined in include/tmfe.h:266
HandleRpc
virtual
virtual TMFeResult HandleRpc(const char* cmd, const char* args, std::string& response)
Defined in include/tmfe.h:268
HandleStartAbortRun
virtual
virtual TMFeResult HandleStartAbortRun(int run_number)
Defined in include/tmfe.h:267
HandleUsage
virtual
virtual void HandleUsage()
Defined in include/tmfe.h:260
TMFeEquipment
TMFeEquipment(const char* eqname, const char* eqfilename)
ctor
Declared in include/tmfe.h:247, defined in src/tmfe.cxx:1710
~TMFeEquipment
virtual
virtual ~TMFeEquipment()
dtor
Declared in include/tmfe.h:248, defined in src/tmfe.cxx:1724
Attributes
fEqConfBuffer
std::string fEqConfBuffer = "SYSTEM"
Defined in include/tmfe.h:174
fEqConfBufferSize
size_t fEqConfBufferSize = 0
requested event buffer size
Defined in include/tmfe.h:202
fEqConfEnabled
bool fEqConfEnabled = true
Defined in include/tmfe.h:171
fEqConfEnablePeriodic
bool fEqConfEnablePeriodic = true
Defined in include/tmfe.h:166
fEqConfEnablePoll
bool fEqConfEnablePoll = false
Defined in include/tmfe.h:167
fEqConfEnableRpc
bool fEqConfEnableRpc = true
Defined in include/tmfe.h:165
fEqConfEventID
uint16_t fEqConfEventID = 1
Defined in include/tmfe.h:172
fEqConfEventLimit
double fEqConfEventLimit = 0
Defined in include/tmfe.h:180
fEqConfFormat
std::string fEqConfFormat = "MIDAS"
TBI
Defined in include/tmfe.h:177
fEqConfHidden
bool fEqConfHidden = false
Defined in include/tmfe.h:183
fEqConfLogHistory
int fEqConfLogHistory = 0
Defined in include/tmfe.h:182
fEqConfMaxEventSize
size_t fEqConfMaxEventSize = 0
requested maximum event size
Defined in include/tmfe.h:201
fEqConfNumSubEvents
uint32_t fEqConfNumSubEvents = 0
not used
Defined in include/tmfe.h:181
fEqConfPeriodMilliSec
int fEqConfPeriodMilliSec = 1000
Defined in include/tmfe.h:179
fEqConfPeriodStatisticsSec
double fEqConfPeriodStatisticsSec = 1.0
period for updating ODB statistics
Defined in include/tmfe.h:199
fEqConfPollSleepSec
double fEqConfPollSleepSec = 0.000100
shortest sleep for linux is 50-6-70 microseconds
Defined in include/tmfe.h:200
fEqConfReadConfigFromOdb
bool fEqConfReadConfigFromOdb = true
read equipment common from ODB
Defined in include/tmfe.h:169
fEqConfReadOn
int fEqConfReadOn = 0
Defined in include/tmfe.h:178
fEqConfReadOnlyWhenRunning
fEqConfSource
int fEqConfSource = 0
not used
Defined in include/tmfe.h:176
fEqConfTriggerMask
uint16_t fEqConfTriggerMask = 0
Defined in include/tmfe.h:173
fEqConfType
int fEqConfType = 0
not used
Defined in include/tmfe.h:175
fEqConfWriteCacheSize
int fEqConfWriteCacheSize = 10000000
Defined in include/tmfe.h:187
fEqConfWriteEventsToOdb
fEqEventBuffer
TMEventBuffer* fEqEventBuffer = NULL
connection to event buffer pointer to buffer entry inside TMFE
Defined in include/tmfe.h:219
fEqFilename
std::string fEqFilename
Defined in include/tmfe.h:161
fEqMutex
std::mutex fEqMutex
multithread lock
Defined in include/tmfe.h:205
fEqName
std::string fEqName
general configuration, should not be changed by user
Defined in include/tmfe.h:160
fEqPeriodicLastCallTime
double fEqPeriodicLastCallTime = 0
periodic scheduler
Defined in include/tmfe.h:238
fEqPeriodicNextCallTime
double fEqPeriodicNextCallTime = 0
Defined in include/tmfe.h:239
fEqPollThread
std::thread* fEqPollThread = NULL
per-equipment poll thread
Defined in include/tmfe.h:279
fEqPollThreadRunning
std::atomic_bool fEqPollThreadRunning {false}
Defined in include/tmfe.h:243
fEqPollThreadShutdownRequested
std::atomic_bool fEqPollThreadShutdownRequested {false}
Defined in include/tmfe.h:244
fEqPollThreadStarting
std::atomic_bool fEqPollThreadStarting {false}
poll scheduler
Defined in include/tmfe.h:242
fEqSerial
int fEqSerial = 0
Defined in include/tmfe.h:220
fEqStatBytes
double fEqStatBytes = 0
Defined in include/tmfe.h:224
fEqStatEpS
double fEqStatEpS = 0
events/sec
Defined in include/tmfe.h:225
fEqStatEvents
double fEqStatEvents = 0
statistics
Defined in include/tmfe.h:223
fEqStatKBpS
double fEqStatKBpS = 0
kbytes/sec (factor 1000, not 1024)
Defined in include/tmfe.h:226
fEqStatLastBytes
double fEqStatLastBytes = 0
Defined in include/tmfe.h:231
fEqStatLastEvents
double fEqStatLastEvents = 0
Defined in include/tmfe.h:230
fEqStatLastTime
double fEqStatLastTime = 0
statistics rate computations
Defined in include/tmfe.h:229
fEqStatLastWrite
double fEqStatLastWrite = 0
statistics write to odb timer
Defined in include/tmfe.h:234
fEqStatNextWrite
double fEqStatNextWrite = 0
Defined in include/tmfe.h:235
fFe
TMFrontend* fFe = NULL
Defined in include/tmfe.h:209
fMfe
TMFE* fMfe = NULL
connection to MIDAS
Defined in include/tmfe.h:208
fOdbEq
MVOdb* fOdbEq = NULL
ODB Equipment/EQNAME
Defined in include/tmfe.h:212
fOdbEqCommon
MVOdb* fOdbEqCommon = NULL
ODB Equipment/EQNAME/Common
Defined in include/tmfe.h:213
fOdbEqSettings
MVOdb* fOdbEqSettings = NULL
ODB Equipment/EQNAME/Settings
Defined in include/tmfe.h:214
fOdbEqStatistics
MVOdb* fOdbEqStatistics = NULL
ODB Equipment/EQNAME/Statistics
Defined in include/tmfe.h:216
fOdbEqVariables
MVOdb* fOdbEqVariables = NULL
ODB Equipment/EQNAME/Variables
Defined in include/tmfe.h:215
TMFE
Defined in include/tmfe.h:382
Methods
AddRpcHandler
void AddRpcHandler(TMFeRpcHandlerInterface* h)
Declared in include/tmfe.h:468, defined in src/tmfe.cxx:1583
Connect
TMFeResult Connect(const char* progname = NULL, const char*hostname = NULL, const char*exptname = NULL)
Declared in include/tmfe.h:428, defined in src/tmfe.cxx:65
DeregisterTransitionPause
void DeregisterTransitionPause()
Declared in include/tmfe.h:479, defined in src/tmfe.cxx:1547
DeregisterTransitionResume
void DeregisterTransitionResume()
Declared in include/tmfe.h:480, defined in src/tmfe.cxx:1552
DeregisterTransitions
void DeregisterTransitions()
Declared in include/tmfe.h:476, defined in src/tmfe.cxx:1528
DeregisterTransitionStart
void DeregisterTransitionStart()
Declared in include/tmfe.h:477, defined in src/tmfe.cxx:1537
DeregisterTransitionStartAbort
void DeregisterTransitionStartAbort()
Declared in include/tmfe.h:481, defined in src/tmfe.cxx:1557
DeregisterTransitionStop
void DeregisterTransitionStop()
Declared in include/tmfe.h:478, defined in src/tmfe.cxx:1542
Disconnect
TMFeResult Disconnect()
Declared in include/tmfe.h:429, defined in src/tmfe.cxx:154
EventBufferCloseAll
TMFeResult EventBufferCloseAll()
Declared in include/tmfe.h:443, defined in src/tmfe.cxx:484
EventBufferFlushCacheAll
TMFeResult EventBufferFlushCacheAll(bool wait = true)
Declared in include/tmfe.h:442, defined in src/tmfe.cxx:448
EventBufferOpen
TMFeResult EventBufferOpen(TMEventBuffer** pbuf, const char* bufname, size_t bufsize = 0)
event buffer methods, thread-safe
Declared in include/tmfe.h:441, defined in src/tmfe.cxx:413
GetThreadId
static
static std::string GetThreadId()
return identification of this thread
Declared in include/tmfe.h:488, defined in src/tmfe.cxx:1140
GetTime
static
static double GetTime()
return current time in seconds, with micro-second precision
Declared in include/tmfe.h:486, defined in src/tmfe.cxx:1011
Instance
static
static TMFE*Instance()
TMFE is a singleton class. Call instance() to get a reference to the one instance of this class.
Declared in include/tmfe.h:424, defined in src/tmfe.cxx:57
MidasPeriodicTasks
void MidasPeriodicTasks()
Declared in include/tmfe.h:456, defined in src/tmfe.cxx:852
Msg
Note: this method has 2 different signatures.
Msg
void Msg(int message_type, const char *filename, int line, const char *routine, const char *format, ...)
Declared in include/tmfe.h:461, defined in src/tmfe.cxx:991
Msg
void Msg(int message_type, const char *filename, int line, const char *routine, const std::string& message)
printf("message [%s]\n", message.c_str());
Declared in include/tmfe.h:463, defined in src/tmfe.cxx:1004
RegisterRPCs
void RegisterRPCs()
Declared in include/tmfe.h:483, defined in src/tmfe.cxx:1567
RegisterTransitionStartAbort
void RegisterTransitionStartAbort()
Declared in include/tmfe.h:482, defined in src/tmfe.cxx:1562
RemoveRpcHandler
void RemoveRpcHandler(TMFeRpcHandlerInterface* h)
Declared in include/tmfe.h:469, defined in src/tmfe.cxx:1588
ResetAlarm
TMFeResult ResetAlarm(const char* name)
Declared in include/tmfe.h:459, defined in src/tmfe.cxx:2296
RpcThread
void RpcThread()
RPC thread methods, thread-safe
Declared in include/tmfe.h:432, defined in src/tmfe.cxx:857
SetTransitionSequencePause
void SetTransitionSequencePause(int seqno)
Declared in include/tmfe.h:473, defined in src/tmfe.cxx:1513
SetTransitionSequenceResume
void SetTransitionSequenceResume(int seqno)
Declared in include/tmfe.h:474, defined in src/tmfe.cxx:1518
SetTransitionSequenceStart
void SetTransitionSequenceStart(int seqno)
Declared in include/tmfe.h:471, defined in src/tmfe.cxx:1503
SetTransitionSequenceStartAbort
void SetTransitionSequenceStartAbort(int seqno)
Declared in include/tmfe.h:475, defined in src/tmfe.cxx:1523
SetTransitionSequenceStop
void SetTransitionSequenceStop(int seqno)
Declared in include/tmfe.h:472, defined in src/tmfe.cxx:1508
SetWatchdogSec
TMFeResult SetWatchdogSec(int sec)
Declared in include/tmfe.h:453, defined in src/tmfe.cxx:144
Sleep
static
static void Sleep(double sleep_time_sec)
sleep, with micro-second precision
Declared in include/tmfe.h:487, defined in src/tmfe.cxx:1019
StartRpcThread
void StartRpcThread()
NOTE: this is thread safe
Declared in include/tmfe.h:433, defined in src/tmfe.cxx:903
StartRun
void StartRun()
Declared in include/tmfe.h:450, defined in src/tmfe.cxx:714
StopRpcThread
void StopRpcThread()
NOTE: this is thread safe
Declared in include/tmfe.h:434, defined in src/tmfe.cxx:935
StopRun
void StopRun()
Declared in include/tmfe.h:449, defined in src/tmfe.cxx:687
TriggerAlarm
TMFeResult TriggerAlarm(const char* name, const char* message, const char* aclass)
Declared in include/tmfe.h:458, defined in src/tmfe.cxx:2285
Yield
void Yield(double sleep_sec)
Declared in include/tmfe.h:455, defined in src/tmfe.cxx:821
Attributes
fDB
int fDB = 0
ODB database handle
Defined in include/tmfe.h:396
fEventBuffers
std::vector<TMEventBuffer*> fEventBuffers
Defined in include/tmfe.h:438
fEventBuffersMutex
std::mutex fEventBuffersMutex
event buffer data
Defined in include/tmfe.h:437
fExptname
std::string fExptname
experiment name, blank if only one experiment defined in exptab
Defined in include/tmfe.h:386
fHostname
std::string fHostname
hostname we are running on
Defined in include/tmfe.h:390
fMserverHostname
std::string fMserverHostname
hostname where the mserver is running, blank if using shared memory
Defined in include/tmfe.h:387
fMutex
std::mutex fMutex
multithreaded lock
Defined in include/tmfe.h:393
fOdbRoot
MVOdb* fOdbRoot = NULL
ODB root
Defined in include/tmfe.h:397
fProgramName
std::string fProgramName
frontend program name
Defined in include/tmfe.h:389
fRpcHandlers
std::vector<TMFeRpcHandlerInterface*> fRpcHandlers
run transitions and RPCs
Defined in include/tmfe.h:466
fRpcThread
std::thread* fRpcThread = NULL
internal threads
Defined in include/tmfe.h:407
fRpcThreadRunning
std::atomic_bool fRpcThreadRunning {false}
Defined in include/tmfe.h:409
fRpcThreadShutdownRequested
std::atomic_bool fRpcThreadShutdownRequested {false}
Defined in include/tmfe.h:410
fRpcThreadStarting
std::atomic_bool fRpcThreadStarting {false}
Defined in include/tmfe.h:408
fRunNumber
int fRunNumber = 0
current run number
Defined in include/tmfe.h:403
fRunStartTime
double fRunStartTime = 0
start a new run at this time
Defined in include/tmfe.h:447
fRunStopRequested
bool fRunStopRequested = false
run stop was requested by equipment
Defined in include/tmfe.h:446
fShutdownRequested
std::atomic_bool fShutdownRequested {false}
shutdown was requested by Ctrl-C or by RPC command
Defined in include/tmfe.h:400
fStateRunning
bool fStateRunning = false
run state is running or paused
Defined in include/tmfe.h:404
gfVerbose
static
static bool gfVerbose = false
static data members
Defined in include/tmfe.h:426
TMFeRpcHandlerInterface
Defined in include/tmfe.h:144
Methods
HandleBeginRun
virtual
virtual TMFeResult HandleBeginRun(int run_number)
Defined in include/tmfe.h:147
HandleBinaryRpc
virtual
virtual TMFeResult HandleBinaryRpc(const char* cmd, const char* args, std::vector<char>& result)
Defined in include/tmfe.h:153
HandleEndRun
virtual
virtual TMFeResult HandleEndRun(int run_number)
Defined in include/tmfe.h:148
HandlePauseRun
virtual
virtual TMFeResult HandlePauseRun(int run_number)
Defined in include/tmfe.h:149
HandleResumeRun
virtual
virtual TMFeResult HandleResumeRun(int run_number)
Defined in include/tmfe.h:150
HandleRpc
virtual
virtual TMFeResult HandleRpc(const char* cmd, const char* args, std::string& result)
Defined in include/tmfe.h:152
HandleStartAbortRun
virtual
virtual TMFeResult HandleStartAbortRun(int run_number)
Defined in include/tmfe.h:151
~TMFeRpcHandlerInterface
virtual
virtual ~TMFeRpcHandlerInterface()
Defined in include/tmfe.h:154
TMEventBuffer
Defined in include/tmfe.h:115
Methods
AddRequest
TMFeResult AddRequest(int event_id, int trigger_mask, const char* sampling_type_string)
Declared in include/tmfe.h:129, defined in src/tmfe.cxx:272
CloseBuffer
TMFeResult CloseBuffer()
Declared in include/tmfe.h:127, defined in src/tmfe.cxx:235
FlushCache
TMFeResult FlushCache(bool wait = true)
Declared in include/tmfe.h:135, defined in src/tmfe.cxx:374
OpenBuffer
TMFeResult OpenBuffer(const char* bufname, size_t bufsize = 0)
Declared in include/tmfe.h:126, defined in src/tmfe.cxx:183
ReceiveEvent
TMFeResult ReceiveEvent(std::vector<char> *e, int timeout_msec = 0)
Declared in include/tmfe.h:130, defined in src/tmfe.cxx:303
SendEvent
Note: this method has 4 different signatures.
SendEvent
TMFeResult SendEvent(const char *e)
Declared in include/tmfe.h:131, defined in src/tmfe.cxx:326
SendEvent
TMFeResult SendEvent(const std::vector<char>& e)
Declared in include/tmfe.h:132, defined in src/tmfe.cxx:334
SendEvent
TMFeResult SendEvent(const std::vector<std::vector<char>>& e)
Declared in include/tmfe.h:133, defined in src/tmfe.cxx:346
SendEvent
TMFeResult SendEvent(int sg_n, const char* const sg_ptr[], const size_t sg_len[])
Declared in include/tmfe.h:134, defined in src/tmfe.cxx:358
SetCacheSize
TMFeResult SetCacheSize(size_t read_cache_size, size_t write_cache_size)
Declared in include/tmfe.h:128, defined in src/tmfe.cxx:258
TMEventBuffer
TMEventBuffer(TMFE* mfe)
ctor
Declared in include/tmfe.h:124, defined in src/tmfe.cxx:169
~TMEventBuffer
~TMEventBuffer()
dtor
Declared in include/tmfe.h:125, defined in src/tmfe.cxx:175
Attributes
fBufHandle
int fBufHandle = 0
internal state, user can read but should not write these variables bm_open_buffer() handle
Defined in include/tmfe.h:138
fBufMaxEventSize
size_t fBufMaxEventSize = 0
buffer max event size
Defined in include/tmfe.h:121
fBufName
std::string fBufName
Defined in include/tmfe.h:119
fBufReadCacheSize
size_t fBufReadCacheSize = 0
Defined in include/tmfe.h:139
fBufRequests
std::vector<int> fBufRequests
Defined in include/tmfe.h:141
fBufSize
size_t fBufSize = 0
buffer size
Defined in include/tmfe.h:120
fBufWriteCacheSize
size_t fBufWriteCacheSize = 0
Defined in include/tmfe.h:140
fMfe
TMFE* fMfe = NULL
Defined in include/tmfe.h:118
TMFeResult
Defined in include/tmfe.h:86
Methods
TMFeResult
Note: this method has 2 different signatures.
TMFeResult
TMFeResult()
default ctor for success
Defined in include/tmfe.h:94
TMFeResult
TMFeResult(int code, const std::string& str)
ctor
Defined in include/tmfe.h:97
Attributes
error_code
int error_code = 0
Defined in include/tmfe.h:90
error_flag
bool error_flag = false
Defined in include/tmfe.h:89
error_message
std::string error_message = "success"
Defined in include/tmfe.h:91
TMFeOk
inline
inline TMFeResult TMFeOk()
Defined in include/tmfe.h:106
TMFeErrorMessage
TMFeResult TMFeErrorMessage(const std::string& message)
Declared in include/tmfe.h:107, defined in src/tmfe.cxx:29
TMFeMidasError
TMFeResult TMFeMidasError(const std::string& message, const char* midas_function_name, int midas_status)
Declared in include/tmfe.h:108, defined in src/tmfe.cxx:34