MIDAS
Loading...
Searching...
No Matches
FeExample Class Reference
Inheritance diagram for FeExample:
Collaboration diagram for FeExample:

Public Member Functions

 FeExample ()
 
TMFeResult HandleFrontendInit (const std::vector< std::string > &args)
 
TMFeResult HandleFrontendReady (const std::vector< std::string > &args)
 
void HandleFrontendExit ()
 
 FeExample ()
 
- Public Member Functions inherited from TMFrontend
 TMFrontend ()
 
virtual ~TMFrontend ()
 
int FeMain (int argc, char *argv[])
 
int FeMain (const std::vector< std::string > &args)
 
void FeUsage (const char *argv0)
 
virtual TMFeResult HandleArguments (const std::vector< std::string > &args)
 
virtual void HandleUsage ()
 
void FeSetName (const char *program_name)
 
TMFeResult FeAddEquipment (TMFeEquipment *eq)
 
TMFeResult FeRemoveEquipment (TMFeEquipment *eq)
 
TMFeResult FeInitEquipments (const std::vector< std::string > &args)
 
void FeDeleteEquipments ()
 
void FeStopEquipmentPollThreads ()
 
double FePeriodicTasks ()
 
double FePollTasks (double next_periodic_time)
 
TMFeResult FeInit (const std::vector< std::string > &args)
 
void FeMainLoop ()
 
void FeShutdown ()
 
void FePollMidas (double sleep_sec)
 
void FePeriodicThread ()
 
void FeStartPeriodicThread ()
 
void FeStopPeriodicThread ()
 

Additional Inherited Members

- Public Attributes inherited from TMFrontend
TMFEfMfe = NULL
 
TMFrontendRpcHelperfFeRpcHelper = NULL
 
int fFeIndex = 0
 
bool fFeIfRunningCallExit = false
 
bool fFeIfRunningCallBeginRun = true
 
std::mutex fFeMutex
 
std::vector< TMFeEquipment * > fFeEquipments
 
std::thread * fFePeriodicThread = NULL
 
std::atomic_bool fFePeriodicThreadStarting {false}
 
std::atomic_bool fFePeriodicThreadRunning {false}
 
std::atomic_bool fFePeriodicThreadShutdownRequested {false}
 
double fFeFlushWriteCachePeriodSec = 0.5
 
double fFeFlushWriteCacheNextCallTime = 0
 

Detailed Description

Definition at line 225 of file tmfe_example_frontend.cxx.

Constructor & Destructor Documentation

◆ FeExample() [1/2]

FeExample::FeExample ( )
inline

Definition at line 228 of file tmfe_example_frontend.cxx.

229 {
230 /* register with the framework */
231 FeSetName("Sample Frontend");
232 FeAddEquipment(new EqTrigger("Trigger", __FILE__));
233 FeAddEquipment(new EqPeriodic("Periodic", __FILE__));
234 }
void FeSetName(const char *program_name)
Definition tmfe.cxx:1647
TMFeResult FeAddEquipment(TMFeEquipment *eq)
Definition tmfe.cxx:1600
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24
Here is the call graph for this function:

◆ FeExample() [2/2]

FeExample::FeExample ( )
inline

Definition at line 57 of file tmfe_example_indexed.cxx.

58 {
59 /* register with the framework */
60 FeSetName("example_%02d");
61 FeAddEquipment(new EqPeriodic("example_%02d", __FILE__));
62 }
Here is the call graph for this function:

Member Function Documentation

◆ HandleFrontendExit()

void FeExample::HandleFrontendExit ( )
inlinevirtual

Reimplemented from TMFrontend.

Definition at line 260 of file tmfe_example_frontend.cxx.

261 {
262 /* hardware shutdown goes here */
263
264 printf("frontend exit!\n");
265 };
Here is the call graph for this function:

◆ HandleFrontendInit()

TMFeResult FeExample::HandleFrontendInit ( const std::vector< std::string > &  args)
inlinevirtual

Reimplemented from TMFrontend.

Definition at line 236 of file tmfe_example_frontend.cxx.

237 {
238 /* called before equipment HandleInit(), do all hardware initialization here */
239
240 printf("frontend init!\n");
241
242 return TMFeOk();
243 };
TMFeResult TMFeOk()
Definition tmfe.h:106
Here is the call graph for this function:

◆ HandleFrontendReady()

TMFeResult FeExample::HandleFrontendReady ( const std::vector< std::string > &  args)
inlinevirtual

Reimplemented from TMFrontend.

Definition at line 245 of file tmfe_example_frontend.cxx.

246 {
247 /* called after equipment HandleInit(), anything that needs to be done
248 * before starting the main loop goes here */
249
250 printf("frontend ready!\n");
251
252 /* start periodic and rpc threads here */
253
254 //fMfe->StartPeriodicThread();
255 //fMfe->StartRpcThread();
256
257 return TMFeOk();
258 };
Here is the call graph for this function:

The documentation for this class was generated from the following files: