ALICE
Forward Detectors: T0, V0 and FMD
Example FMD FSM
	Test of Forward Multiplicity Detector Finite State Machine
	==========================================================

This is a small test project I made.  The aim is to try to understand
how one can set up the Forward Multiplicity Detector (FMD) Detector
Control System (DCS) top-level Finite State Machine (FSM).

The FSM is encoded using State Manager Interface (SMI) available from 

    http://cern.ch/smi

Architecture/Hierarchy:
-----------------------

The FSM consist of 4 classes of objects, of which only one is
logical.  The three other FSMs are "associated" meaning that there's a
process associated with the object.   The hierarchy (in terms of
classes) is as follows: 


          +-------------+
          | SubDetector |             ! The numbers indicate majority
          +-------------+             ! of the relation. 
            |    |   |
        ___/     |    \__
  1..4 /    1..4 |       \ 1
    +----+    +----+   +------+
    | Lv |    | Hv |   | Fero |
    +----+    +----+   +------+


SubDetector: This logical FSM class is the top of the hierarchy.  It
  captures the state of the lower state machines, and it is where
  commands initially goes. Objects of this class could be FMD1, FMD2,
  and FMD3.

Lv: This state machine captures the state of the low-voltage power
  supply for a half-ring in a sub-detector.  Although the FSM defines
  a BEAM_TUNING state, it does nothing.  This is mostly defined in
  case of that state should ever be used.  Objects of this class could
  be LV_INNER_TOP, LV_OUTER_TOP, LV_INNER_BOTTOM, LV_OUTER_BOTTOM. 

Hv: This state machine captures the state of the high-voltage power
  supply for a half-ring in a sub-detector.  In the BEAM_TUNING state
  we should turn the high-voltage down, to avoid damage to the
  silicon in case of beam-spills or the like.   Objects of this class
  could be HV_INNER_TOP, HV_OUTER_TOP, HV_INNER_BOTTOM,
  HV_OUTER_BOTTOM.  

Fero: This state machine captures the state of the Front-End and
  Read-Out electronics.  For each sub-detector there's only one such
  object.   It's job is to turn on the low-voltage for the FERO cards,
  and configure the FERO cards for a particular set-up.  Objects of
  this class could be RCU. 

Associated processes:
---------------------

There's actually only one process in this test setup.   The code is in
"fmd_fsm.cc".  This program makes objects of the classes Hv, LV, and
Fero.  The classes Hv, Lv, and Fero (in files "Hv.hh", "Lv.hh", and
"Fero.hh") mirrors the SMI classes outlined above.  All the classes
lives in the name space "FmdFsm" and derive from the base class
"Base" to slim the code. 

Running the example:
--------------------

The provided Makefile will, in its default target, build the
associated program and translate the SMI description.  You need SMI
installed for this to work.  To build, simply do 

    make 

The top-level Makefile also provides are target for running the
example.  To run the example, do 

    make run 

This target (more or less) does 

    ./fmd_fsm 
    smiSM -d 0 FMD fmd_fsm.sobj	
    smiGUI FMD FMD.dat 

One can then use the generic SMI GUI to control the FSMs. 
SRCSource
Sub-detector state-machineLow-voltage state-machine

Back to FEE pages

Fero state-machine
High-voltage state-machine
Last modified 11:16:53 07/21/11 CEST Webmaster: Hosted by HEHI