tdaq-develop-2025-02-12
ots::FEVInterfacesManager Class Reference

#include <otsdaq/FECore/FEVInterfacesManager.h>

Inheritance diagram for ots::FEVInterfacesManager:
ots::Configurable ots::VStateMachine

Public Member Functions

 FEVInterfacesManager (const ConfigurationTree &theXDAQContextConfigTree, const std::string &supervisorConfigurationPath)
 
void init (void)
 Methods.
 
void destroy (void)
 
void createInterfaces (void)
 
virtual void configure (void) override
 State Machine Methods.
 
virtual void halt (void) override
 
virtual void pause (void) override
 
virtual void resume (void) override
 
virtual void start (std::string runNumber) override
 
virtual void stop (void) override
 
virtual std::string getStatusProgressDetail (void) override
 overriding VStateMachine::getStatusProgressDetail More...
 
void universalRead (const std::string &interfaceID, char *address, char *returnValue)
 used by MacroMaker More...
 
void universalWrite (const std::string &interfaceID, char *address, char *writeValue)
 used by MacroMaker More...
 
std::string getFEListString (const std::string &supervisorLid)
 used by MacroMaker More...
 
std::string getFEMacrosString (const std::string &supervisorName, const std::string &supervisorLid)
 used by MacroMaker More...
 
void runFEMacro (const std::string &interfaceID, const FEVInterface::frontEndMacroStruct_t &feMacro, const std::string &inputArgs, std::string &outputArgs)
 used by MacroMaker and FE calling indirectly More...
 
void runFEMacro (const std::string &interfaceID, const std::string &feMacroName, const std::string &inputArgs, std::string &outputArgs)
 used by MacroMaker More...
 
void runMacro (const std::string &interfaceID, const std::string &macroObjectString, const std::string &inputArgs, std::string &outputArgs)
 used by MacroMaker More...
 
void runFEMacroByFE (const std::string &callingInterfaceID, const std::string &interfaceID, const std::string &feMacroName, const std::string &inputArgs, std::string &outputArgs)
 used by FE calling (i.e. FESupervisor) More...
 
void startFEMacroMultiDimensional (const std::string &requester, const std::string &interfaceID, const std::string &feMacroName, const bool enableSavingOutput, const std::string &outputFilePath, const std::string &outputFileRadix, const std::string &inputArgs)
 used by iterator calling (i.e. FESupervisor) More...
 
void startMacroMultiDimensional (const std::string &requester, const std::string &interfaceID, const std::string &macroName, const std::string &macroString, const bool enableSavingOutput, const std::string &outputFilePath, const std::string &outputFileRadix, const std::string &inputArgs)
 used by iterator calling (i.e. FESupervisor) More...
 
bool checkMacroMultiDimensional (const std::string &interfaceID, const std::string &macroName)
 used by iterator calling (i.e. FESupervisor) More...
 
unsigned int getInterfaceUniversalAddressSize (const std::string &interfaceID)
 used by MacroMaker More...
 
unsigned int getInterfaceUniversalDataSize (const std::string &interfaceID)
 used by MacroMaker More...
 
bool allFEWorkloopsAreDone (void)
 used by Iterator, e.g.
 
const FEVInterfacegetFEInterface (const std::string &interfaceID) const
 getFEInterface
 
const std::map< std::string, std::unique_ptr< FEVInterface > > & getFEInterfaces (void) const
 
FEVInterfacegetFEInterfaceP (const std::string &interfaceID)
 getFEInterfaceP
 
- Public Member Functions inherited from ots::Configurable
 Configurable (const ConfigurationTree &theXDAQContextConfigTree, const std::string &theConfigurationPath)
 
ConfigurationTree getSelfNode () const
 
const ConfigurationManagergetConfigurationManager () const
 
const std::string & getContextUID () const
 
const std::string & getApplicationUID () const
 
unsigned int getApplicationLID () const
 
std::string getContextAddress () const
 
unsigned int getContextPort () const
 
- Public Member Functions inherited from ots::VStateMachine
 VStateMachine (const std::string &name)
 
virtual bool running (void)
 States.
 
virtual void paused (void)
 
virtual void halted (void)
 
virtual void configured (void)
 
virtual void initial (void)
 
virtual void inError (void)
 
void setTransitionName (const std::string &transitionName)
 
const std::string & getTransitionName (void)
 
void setIterationIndex (unsigned int i)
 
void setSubIterationIndex (unsigned int i)
 
unsigned int getIterationIndex (void)
 
unsigned int getSubIterationIndex (void)
 
void indicateIterationWork (void)
 
void clearIterationWork (void)
 
bool getIterationWork (void)
 
void indicateSubIterationWork (void)
 
void clearSubIterationWork (void)
 
bool getSubIterationWork (void)
 

Public Attributes

std::mutex frontEndCommunicationReceiveMutex_
 FE communication helpers.
 
std::map< std::string, std::map< std::string, std::queue< std::string > > > frontEndCommunicationReceiveBuffer_
 
std::mutex macroMultiDimensionalDoneMutex_
 multi-dimensional FE Macro helpers
 
std::map< std::string, std::string > macroMultiDimensionalStatusMap_
 
- Public Attributes inherited from ots::VStateMachine
CoreSupervisorBaseparentSupervisor_
 

Additional Inherited Members

- Protected Attributes inherited from ots::Configurable
const ConfigurationTree theXDAQContextConfigTree_
 
const std::string theConfigurationPath_
 
const std::string theConfigurationRecordName_
 
- Protected Attributes inherited from ots::VStateMachine
std::map< std::string, std::map< unsigned int, std::string > > iterationAliasMap_
 
std::map< std::string, std::map< unsigned int, std::string > > subIterationAliasMap_
 

Detailed Description

FEVInterfacesManager This class is a virtual class that handles a collection of front-end interface plugins.

Definition at line 18 of file FEVInterfacesManager.h.

Member Function Documentation

◆ checkMacroMultiDimensional()

bool FEVInterfacesManager::checkMacroMultiDimensional ( const std::string &  interfaceID,
const std::string &  macroName 
)

used by iterator calling (i.e. FESupervisor)

checkFEMacroMultiDimensional Checks for the completion of the thread that manages the multi-dimensional loop running the FE Macro or MacroMaker Macro in the specified FE interface. Called by iterator (for now).

Returns true if multi-dimensional launch is done

Definition at line 1877 of file FEVInterfacesManager.cc.

◆ getFEListString()

std::string FEVInterfacesManager::getFEListString ( const std::string &  supervisorLid)

used by MacroMaker

getFEListString returns string with each new line for each FE each line: <interface type>:<parent supervisor lid>:<interface UID>

Definition at line 573 of file FEVInterfacesManager.cc.

◆ getFEMacrosString()

std::string FEVInterfacesManager::getFEMacrosString ( const std::string &  supervisorName,
const std::string &  supervisorLid 
)

used by MacroMaker

getFEMacrosString returns string with each new line indicating the macros for a FE each line: <parent supervisor name>;<parent supervisor lid>;<interface type>;<interface UID> ;<macro name>;<macro permissions req>;<macro tooltip>;<macro num of inputs>;...<input names ; separated>... ;<macro num of outputs>;...<output names ; separated>... do not use :-separator because of the : in user permissions strings

Definition at line 2342 of file FEVInterfacesManager.cc.

◆ getInterfaceUniversalAddressSize()

unsigned int FEVInterfacesManager::getInterfaceUniversalAddressSize ( const std::string &  interfaceID)

used by MacroMaker

getInterfaceUniversalAddressSize used by MacroMaker

Definition at line 543 of file FEVInterfacesManager.cc.

◆ getInterfaceUniversalDataSize()

unsigned int FEVInterfacesManager::getInterfaceUniversalDataSize ( const std::string &  interfaceID)

used by MacroMaker

getInterfaceUniversalDataSize used by MacroMaker

Definition at line 552 of file FEVInterfacesManager.cc.

◆ getStatusProgressDetail()

std::string FEVInterfacesManager::getStatusProgressDetail ( void  )
overridevirtual

overriding VStateMachine::getStatusProgressDetail

virtual progress string that can be overridden with more info e.g. steps and substeps however integer 0-100 should be first number, then separated by : colons e.g. 94:FE0:1:2

Reimplemented from ots::VStateMachine.

Definition at line 176 of file FEVInterfacesManager.cc.

◆ runFEMacro() [1/2]

void FEVInterfacesManager::runFEMacro ( const std::string &  interfaceID,
const FEVInterface::frontEndMacroStruct_t feMacro,
const std::string &  inputArgs,
std::string &  outputArgs 
)

used by MacroMaker and FE calling indirectly

runFEMacro Runs the FE Macro in the specified FE interface.

inputs:

  • inputArgs: semicolon-separated name/value pairs, and then comma-separated
  • outputArgs: comma-separated

outputs:

  • throws exception on failure
  • outputArgs: colon-separate name/value pairs, and then comma-separated

Definition at line 2178 of file FEVInterfacesManager.cc.

◆ runFEMacro() [2/2]

void FEVInterfacesManager::runFEMacro ( const std::string &  interfaceID,
const std::string &  feMacroName,
const std::string &  inputArgs,
std::string &  outputArgs 
)

used by MacroMaker

runFEMacro Runs the FE Macro in the specified FE interface.

inputs:

  • inputArgs: colon-separated name/value pairs, and then comma-separated
  • outputArgs: comma-separated

outputs:

  • throws exception on failure
  • outputArgs: colon-separate name/value pairs, and then comma-separated

Definition at line 2145 of file FEVInterfacesManager.cc.

◆ runFEMacroByFE()

void FEVInterfacesManager::runFEMacroByFE ( const std::string &  callingInterfaceID,
const std::string &  interfaceID,
const std::string &  feMacroName,
const std::string &  inputArgs,
std::string &  outputArgs 
)

used by FE calling (i.e. FESupervisor)

runFEMacroByFE Runs the FE Macro in the specified FE interface. Called by another FE.

inputs:

  • inputArgs: colon-separated name/value pairs, and then comma-separated
  • outputArgs: comma-separated (Note: resolved for FE, allowing FE to not know output arguments)

outputs:

  • throws exception on failure
  • outputArgs: colon-separate name/value pairs, and then comma-separated

Definition at line 1926 of file FEVInterfacesManager.cc.

◆ runMacro()

void FEVInterfacesManager::runMacro ( const std::string &  interfaceID,
const std::string &  macroObjectString,
const std::string &  inputArgs,
std::string &  outputArgs 
)

used by MacroMaker

runMacro Runs the MacroMaker Macro in the specified FE interface.

inputs:

  • inputArgs: colon-separated name/value pairs, and then comma-separated
  • outputArgs: comma-separated

outputs:

  • throws exception on failure
  • outputArgs: colon-separate name/value pairs, and then comma-separated

Definition at line 1991 of file FEVInterfacesManager.cc.

◆ startFEMacroMultiDimensional()

void FEVInterfacesManager::startFEMacroMultiDimensional ( const std::string &  requester,
const std::string &  interfaceID,
const std::string &  feMacroName,
const bool  enableSavingOutput,
const std::string &  outputFilePath,
const std::string &  outputFileRadix,
const std::string &  inputArgs 
)

used by iterator calling (i.e. FESupervisor)

startFEMacroMultiDimensional Launches a thread that manages the multi-dimensional loop running the FE Macro in the specified FE interface. Called by iterator (for now).

Note: no output arguments are returned, but outputs are optionally saved to file.

inputs:

  • inputArgs: dimensional semi-colon-separated, comma separated: dimension iterations and arguments (colon-separated name/value/stepsize sets)

outputs:

  • throws exception on failure

Definition at line 1181 of file FEVInterfacesManager.cc.

◆ startMacroMultiDimensional()

void FEVInterfacesManager::startMacroMultiDimensional ( const std::string &  requester,
const std::string &  interfaceID,
const std::string &  macroName,
const std::string &  macroString,
const bool  enableSavingOutput,
const std::string &  outputFilePath,
const std::string &  outputFileRadix,
const std::string &  inputArgs 
)

used by iterator calling (i.e. FESupervisor)

startMacroMultiDimensional Launches a thread that manages the multi-dimensional loop running the Macro on the specified FE interface. Called by iterator (for now).

Note: no output arguments are returned, but outputs are optionally saved to file.

inputs:

  • inputArgs: dimensional semi-colon-separated, comma separated: dimension iterations and arguments (colon-separated name/value/stepsize sets)

outputs:

  • throws exception on failure

current value‍/,

initial value‍/,

step value‍/))));

Definition at line 604 of file FEVInterfacesManager.cc.

◆ universalRead()

void FEVInterfacesManager::universalRead ( const std::string &  interfaceID,
char *  address,
char *  returnValue 
)

used by MacroMaker

universalRead used by MacroMaker throw std::runtime_error on error/timeout

Definition at line 533 of file FEVInterfacesManager.cc.

◆ universalWrite()

void FEVInterfacesManager::universalWrite ( const std::string &  interfaceID,
char *  address,
char *  writeValue 
)

used by MacroMaker

universalWrite used by MacroMaker

Definition at line 561 of file FEVInterfacesManager.cc.


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