FACT++  1.0
StateMachineFAD< T > Class Template Reference
+ Inheritance diagram for StateMachineFAD< T >:
+ Collaboration diagram for StateMachineFAD< T >:

Public Types

enum  states_t {
  kSM_Disconnected = 1, kSM_Connecting, kSM_Connected, kSM_Running,
  kSM_SomeRunning, kSM_Starting, kSM_Stopping, kSM_Reconnect,
  kSM_SetUrl
}
 
typedef map< string, FAD::Configuration > Configs
 

Public Member Functions

 StateMachineFAD (const string &name="", ostream &out=cout)
 
int Command (const EventImp &evt)
 
int Start (const EventImp &evt, int i)
 
void Close ()
 
int Execute ()
 
int Transition (const Event &evt)
 
int Configure (const Event &evt)
 
 StateMachineFAD (ostream &out=cout)
 
 ~StateMachineFAD ()
 
tcp::endpoint GetEndpoint (const string &base)
 
template<class V >
bool CheckConfigVal (Configuration &conf, V max, const string &name, const string &sub)
 
int EvalOptions (Configuration &conf)
 
- Public Member Functions inherited from StateMachineAsio< T >
 StateMachineAsio (std::ostream &out, const std::string &server)
 
void Stop (int code=0)
 
- Public Member Functions inherited from EventBuilderWrapper
 EventBuilderWrapper (MessageImp &imp)
 
virtual ~EventBuilderWrapper ()
 
uint32_t StartNewRun (int64_t maxtime, int64_t maxevt, const pair< string, FAD::Configuration > &ref)
 
bool IsThreadRunning ()
 
void SetMaxMemory (unsigned int mb) const
 
void SetEventTimeout (uint16_t to) const
 
void StartThread (const vector< tcp::endpoint > &addr)
 
void ConnectSlot (unsigned int i, const tcp::endpoint &addr)
 
void IgnoreSlot (unsigned int i)
 
void Abort ()
 
void ResetThread (bool soft)
 
void Exit ()
 
bool IsConnected (int i) const
 
bool IsConnecting (int i) const
 
bool IsDisconnected (int i) const
 
bool IsRunInProgress () const
 
void SetIgnore (int i, bool b) const
 
bool IsIgnored (int i) const
 
void SetOutputFormat (FAD::FileFormat_t f)
 
void LoadDrsCalibration (const char *fname)
 
void UpdateRuns (const string &fname="")
 
bool UpdateDimEvents (const pair< Time, array< uint32_t, 4 >> &stat)
 
bool UpdateDimTrigger (const tuple< Time, char, array< uint32_t, 8 >> &stat)
 
bool runOpen (const EVT_CTRL2 &evt)
 
bool runWrite (const EVT_CTRL2 &e)
 
void runClose (const EVT_CTRL2 &evt)
 
bool UpdateDimRoi (const pair< Time, array< uint16_t, 2 >> &roi)
 
bool UpdateDimTempRefClk (const tuple< Time, array< uint32_t, 40 >, array< int16_t, 160 >> &dat)
 
bool eventCheck (const EVT_CTRL2 &evt)
 
bool UpdateDimRawData (const vector< char > &v)
 
bool UpdateDimEventData (const tuple< Time, uint32_t, EventData > &tup)
 
void applyCalib (const EVT_CTRL2 &evt, const size_t &size)
 
bool IsRunWaiting ()
 
uint32_t GetRunNumber () const
 
bool IncreaseRunNumber (uint32_t run)
 
void gotNewRun (RUN_CTRL2 &run)
 
void runFinished ()
 
void factOut (int severity, const char *message)
 
bool UpdateDimStatistics1 (const pair< Time, GUI_STAT > &stat)
 
void factStat (const GUI_STAT &stat)
 
void factReportIncomplete (uint64_t rep)
 
template<typename T , class S >
array< T, 42 > Compare (const S *vec, const T *t)
 
template<typename T >
array< T, 42 > CompareBits (const FAD::EventHeader *h, const T *t)
 
template<typename T , size_t N>
void Update (DimDescribedService &svc, const array< T, N > &data, const Time &t=Time(), int n=N)
 
template<typename T >
void Print (const char *name, const pair< bool, array< T, 43 >> &data)
 
bool procHeader (const tuple< Time, bool, FAD::EventHeader > &dat)
 
void debugHead (const FAD::EventHeader &h)
 

Public Attributes

ConnectionFAD c1
 
ConnectionFAD c2
 
ConnectionFAD c3
 
ConnectionFAD c4
 
ConnectionFAD c5
 
ConnectionFAD c6
 
ConnectionFAD c7
 
ConnectionFAD c8
 
ConnectionFAD c9
 
Timers fTimers
 
Configs fConfigs
 
Configs::const_iterator fTargetConfig
 
- Public Attributes inherited from EventBuilderWrapper
MessageImpfMsg
 
map< uint32_t, FAD::RunDescription > fExpectedRuns
 
mutex mtx_newrun
 
shared_ptr< DataProcessorImpfFile
 
Time fLastDimRawData
 
Time fLastDimEventData
 
array< FAD::EventHeader, 40 > fVecHeader
 
vector< uint > fNumConnected
 

Private Types

typedef map< uint8_t, ConnectionFAD * > BoardList
 

Private Member Functions

bool CheckEventSize (size_t has, const char *name, size_t size)
 
int Cmd (FAD::Enable command)
 
int SendCmd (const EventImp &evt)
 
int SendCmdData (const EventImp &evt)
 
int CmdEnable (const EventImp &evt, FAD::Enable command)
 
bool Check (const uint32_t *dat, uint32_t maxaddr, uint32_t maxval)
 
int SetRegister (const EventImp &evt)
 
int SetRoi (const EventImp &evt)
 
int SetDac (const EventImp &evt)
 
int Trigger (int n)
 
int SendTriggers (const EventImp &evt)
 
int PhaseShift (const EventImp &evt)
 
int SetTriggerRate (const EventImp &evt)
 
int SetRunNumber (const EventImp &evt)
 
int SetMaxMemoryBuffer (const EventImp &evt)
 
int SetEventTimeoutSec (const EventImp &evt)
 
int SetFileFormat (const EventImp &evt)
 
int StartDrsCalibration ()
 
int ResetSecondaryDrsBaseline ()
 
int LoadDrsCalibration (const EventImp &evt)
 
int SetVerbosity (const EventImp &evt)
 
int SetHexOutput (const EventImp &evt)
 
int SetDataOutput (const EventImp &evt)
 
int SetDebugTx (const EventImp &evt)
 
const BoardList::iterator GetSlot (uint16_t slot)
 
int PrintEvent (const EventImp &evt)
 
int SetBlockTransmission (const EventImp &evt)
 
int SetBlockTransmissionRange (const EventImp &evt)
 
int SetIgnoreSlot (const EventImp &evt)
 
int SetIgnoreSlots (const EventImp &evt)
 
int StartConfigure (const EventImp &evt)
 
int ResetConfig ()
 
void CloseRun (uint32_t runid)
 
int AddAddress (const EventImp &evt)
 
int RemoveSlot (const EventImp &evt)
 
int ListSlots ()
 
void EnableConnection (ConnectionFAD *ptr, bool enable=true)
 
void EnableAll (bool enable=true)
 
int CloseOpenFiles ()
 
int EnableSlot (const EventImp &evt, bool enable)
 
int ToggleSlot (const EventImp &evt)
 
int StartConnection ()
 
int StopConnection ()
 
int AbortConnection ()
 
int Reset (bool soft)
 
int SetupZFits (const EventImp &evt, const std::function< void(int32_t)> &func)
 
int Execute ()
 
void AddEndpoint (const tcp::endpoint &addr)
 
void UpdateConnectionStatus (const vector< uint8_t > &stat1, const vector< uint8_t > &stat2, bool thread)
 

Private Attributes

BoardList fBoards
 
bool fIsVerbose
 
bool fIsHexOutput
 
bool fIsDataOutput
 
bool fDebugTx
 
vector< uint8_t > fStatus1
 
vector< uint8_t > fStatus2
 
bool fStatusT
 
DimDescribedService fDimStartRun
 
DimDescribedService fDimConnection
 

Additional Inherited Members

- Static Public Attributes inherited from EventBuilderWrapper
static EventBuilderWrapperThis = 0
 
- Protected Member Functions inherited from EventBuilderWrapper
bool InitRunNumber (const string &path="")
 

Detailed Description

template<class T>
class StateMachineFAD< T >

Definition at line 179 of file dclient5.cc.


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