ALICE DCS USER INTERFACE ISTALLATION

Document Sample
ALICE DCS USER INTERFACE ISTALLATION Powered By Docstoc
					ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                      GDC/AF




                      The standard DCS
                   USER INTERFACE in ALICE
                                       Ver. 3.0.2 - 04/10/2007

    History
         01/03/2007 : Create
         04/10/2007 : Bug Fixing and E-Log extension




    Acronyms list
    AC Access Control                                       FSM       Finite State Machine
    DU Device Unit                                          FW        Frame Work
    CSV       Comma Separated Values                        LU Logical Unit
    CU Control Unit                                         UI User Interface
    DP PVSS Data Point                                      UP        User Panel
    DPE       PVSS Data Point Element

                                                    INDEX

          Changes in the new release v 3.0.0                                                             3
                 GUI changes                                                                              3
                 INSTALLATION changes                                                                     3
                 PROGRAMERS RULES                                                                         3
                 PROGRAMMING changes                                                                      3
                 COMPONENT PACKAGING files                                                                4
          The standard DCS USER INTERFACE in ALICE v3.0                                                  7
                 INTRODUCTION                                                                             7
                 Standard DCS UI description                                                              9
                 DETECTOR LOGO USER LOGIN & TIME                                                          9
                 FSM NODE CONTROL                                                                         9
                 FSM NODE STATE                                                                          10
                 DETECTOR GRAPHIC LOCATOR                                                                11
                 TITLE BAR                                                                               11
                 USER TOOL BAR                                                                           11
                 ENVIRONMENT PARAMETERS                                                                  13
                 LHC STATUS                                                                              13
                 The TREE BROWSER for the FSM HIERARCHY                                                  13
                 The USER PANEL FOR MONITORING                                                           14
                 The MESSENGER READER                                                                    15
                 AUXILIARY MONITORING ZONE OF THE FSM MAJOR NODES                                        16
                 HOSTS STATE & MAIN FSM CONTROL PANEL for a DISTRIBUTED project                          16
                 CLOSE WINDOW button                                                                     23
          USER INTERFACE INSTALLATION                                                                    24

04/10/2007 - 3:55 PM                         1/37                                  AliceDcsUi_v3.0.doc
ALICE DCS                            ALICE DCS USER INTERFACE COMPONENT         GDC/AF
         I –Pre-requisite for the installation                                           24
         II –Component Installation                                                      24
         III – Look & Feel                                                               24
         III – Modify the config file : config/dcsUi.config                              24
              [Hierarchy] section                                                         25
              [AccessControl] section                                                     25
              [General] section                                                           25
              [HowToFacility] section                                                     25
              [Environment] section                                                       25
              [GraphicLocator] section                                                    26
              [AuxiliaryMonitoringZone] section                                           26
              [HostsStatusZone] section                                                   27
              [ELogFacility] section                                                      27
         IV – User Panel Template                                                        28
         VI – Graphic Locator Template                                                   29
      APPENDIX A – dcsUiBase library                                                     31
      COOKBOOK for the GRAPHIC LOCATOR CREATION                                          34




04/10/2007 - 3:55 PM                              2/37                    AliceDcsUi_v3.0.doc
ALICE DCS                          ALICE DCS USER INTERFACE COMPONENT                     GDC/AF


                             Changes in the new release v 3.0.0


    GUI changes
         •    The Date & Time widget is moved on the upper left corner; the timer counter is deleted
              and the dcsUi version number is now shown.
         •    The Environmental Parameters widget is now placed on a “single row” .
         •    The upper right corner hosts the LHC Status display.
         •    The Developer Tools button is moved in the upper ‘User tool bar’:.
         •    The Auxiliary Monitoring Zone (lower left corner) is modified in a 4x5 items Table
              View.
         •    The length of the Host Status & FSM Control Bar is increased to display more then 7
              systems with more detailed status information.
         •    Pre-release of FSM-Chart Panel. A FSM tool devoted to display FSM
              status/commands v.s. time is now available.
         •    Pre-release of FSM-Hierarchy Enable/Disable configuration. A FSM tool devoted to
              produce a configuration file with enable/disable information of the FSM hierarchy
              elements is provided.
         •    Integration with the ALICE DCS ELOG service.




    INSTALLATION changes
         •    Removed the SubServicesSystems variable into the [Hyerarchy] section.
         •    Redefined the [AccessControl] section adding new variables.
         •    Added the new section [AuxiliaryMonitoringZone].
         •    Added the new section [HostStatusZone].
         •    Added the new section [ELogFacility].


    PROGRAMERS RULES
         •    Please don’t use Layer number 8 in your project, this layer is
              used by the dcsUi and is intended as reserved.
         •    In order to integrate your project into the ALICE DCS project it
              is mandatory to include libraries in your scripts using the
              instruction “#uses” and NOT the “LoadCtrlLib” sentence in the
              config file.




    PROGRAMMING changes
         •    In dcsUiBase.ctl library : modified the parameters of dcsUiBase_getACGrants
              function, the new version (prototype) is (the change is just in formal names, back
              compatible with previous release):

                       void dcsUiBase_getACGrants(bool &isDeveloper, bool &isExpert,
                                                 bool &isOperator, bool &isObserver)



04/10/2007 - 3:55 PM                           3/37                                 AliceDcsUi_v3.0.doc
ALICE DCS                          ALICE DCS USER INTERFACE COMPONENT                       GDC/AF
         •    In dcsUiBase.ctl library : added a function to check the Status of a PVSS manager :

                       bool dcsUiBase_getMgrState(string sSystemName, string
                                     sManagerName, string sManType, int iManNum = -1 )


         •    In dcsUiBase.ctl library : added two functions to decode LHC status :

                       bool dcsUiBase_LHCStatus2Mess(int iStatus, int iType=0)
                       string dcsUiBase_LHCStatus2Col(int iStatus)

         •    Usage of named colours; colour table definition is in the file : dcsUiBaseColours
         •    No need more the removeSymbol in the panel Event Terminate


    COMPONENT PACKAGING files
                   Directory                             FileName                         Action


    colorDB                      dcsUiBaseColours                  Modified
    config                       dcsUi_example.config
                                 dcsUiSet.config
                                 dcsUiSet.init
                                 dcsUiSet.postInstall
    Data\Themes                  dcsUiAcid.Theme
                                 dcsUiBase.Theme
                                 dcsUiHighContrast.Theme
    help\en_US.iso88591\xxxHowTo xxxHowTo.html
    panels\dcsFsmChart           dcsFsmChart.pnl
                                 dcsFsmChartAxis.pnl
                                 dcsFsmChartAxisscale.pnl
                                 dcsFsmChartBar.pnl
                                 dcsFsmChartBino.pnl
                                 dcsFsmChartCalendar.pnl
                                 dcsFsmChartCalendarday.pnl
                                 dcsFsmChartCommand.pnl
                                 dcsFsmChartDateTime.pnl
                                 dcsFsmChartExecuting.pnl
                                 dcsFsmChartStato.pnl
    panels\dcsFsmSynoptics       dcsFsmSynoptics.pnl
                                 dcsFsmSynopticsCUIcon.pnl
                                 dcsFsmSynopticsDUIcon.pnl
                                 dcsFsmSynopticsHorLine.pnl
                                 dcsFsmSynopticsLUIcon.pnl
                                 dcsFsmSynopticsVerLine.pnl
                                 dcsFsmSynopticsWidget.pnl
    panels\dcsFsmTools           dcsDimDnsStatusWidget.pnl
                                 dcsFsmArchiving.pnl
                                 dcsFSMControl_example.pnl
                                 dcsFsmControllHierarchyWidget.pnl
                                 dcsFsmHostStatusWidget.pnl
                                 dcsFsmObjNodeWidget.pnl
                                 dcsFsmSrvHostWidget.pnl

04/10/2007 - 3:55 PM                           4/37                                   AliceDcsUi_v3.0.doc
ALICE DCS                ALICE DCS USER INTERFACE COMPONENT              GDC/AF
                               dcsFsmTailoring.pnl
                               dcsFSMTailorWidget.pnl
                               dcsHostPMon.pnl
                               dcsHostStatus.pnl
    panels\dcsUi               dcsUiACLogin.pnl
                               dcsUiAuxiliaryWindow.pnl
                               dcsUiDataExtraction.pnl
                               dcsUiElogSendItem.pnl            Added
                               dcsUiEnvirParam.pnl
                               dcsUiEnvirTrend.pnl
                               dcsUiFsmDevLock.pnl
                               dcsUiFsmLock.pnl
                               dcsUiFSMObjStatusDisplay.pnl
                               dcsUiFsmObjWithDevLock.pnl
                               dcsUiFsmObjWithLock.pnl
                               dcsUiFSMStatus.pnl
                               dcsUiFSMtree.pnl
                               dcsUiFsmUi.pnl
                               dcsUiGeneralDialog.pnl           Added
                               dcsUiHostFSMStatusWidget.pnl
                               dcsUiHostStatusWidget.pnl
                               dcsUiHostStatusWidgetSmall.pnl
                               dcsUiHwStatus.pnl
                               dcsUiInfoDialog.pnl
                               dcsUiLHCStatus.pnl
                               dcsUiMainPanel.pnl
                               dcsUiMessangerReader.pnl
                               dcsUiSplash.pnl
                               dcsUiSQLExtractor.pnl
                               dcsUiTimer.pnl
                               dcsUiTools.pnl
    panels\xxxDetector         xxxDetector.pnl
                               xxxUiLocator.pnl
    pictures\dcsUi             alarm.bmp
                               archiveset.bmp
                               back.jpg
                               backup.bmp
                               check.bmp
                               dat.bmp
                               elog.gif                         Added
                               fsmcontrol.bmp
                               fsmengine.bmp
                               FSMLO_disco.bmp
                               FSMLO_dispa.bmp
                               FSMLO_enaco.bmp
                               FSMLO_enapa.bmp
                               FSMLO_excco.bmp
                               FSMLO_excpa.bmp
                               FSMLO_incco.bmp
                               FSMLO_incpa.bmp
                               FSMTV_cuc.bmp
                               FSMTV_cue.bmp

04/10/2007 - 3:55 PM                 5/37                          AliceDcsUi_v3.0.doc
ALICE DCS              ALICE DCS USER INTERFACE COMPONENT              GDC/AF
                             FSMTV_cus.bmp
                             FSMTV_duc.bmp
                             FSMTV_dus.bmp
                             FSMTV_luc.bmp
                             FSMTV_lue.bmp
                             FSMTV_lus.bmp
                             help.bmp
                             logo.bmp
                             note.bmp
                             notewrite.bmp
                             off.bmp
                             off_small.bmp
                             printer.bmp
                             restart.bmp
                             restart_small.bmp
                             splash.jpg                     Modified
                             tools.bmp
                             users.bmp
    scripts\libs             dcsUiBase.ctc
                             dcsUiBase.txt




04/10/2007 - 3:55 PM               6/37                         AliceDcsUi_v3.0.doc
ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                         GDC/AF


              The standard DCS USER INTERFACE in ALICE v3.0


    INTRODUCTION

    In the ALICE control room each DCS workplace will be equipped with one 19” display. To
    reduce the risk of getting the DCS operator confused while dealing with many overlapping
    windows, the ACC has considered the DCS operation as more effective and less risky if
    performed via one or very few specialized window. This strategy has been adopted in the
    Standard UI design (fig.1) separating the FSM hierarchy browsing and monitoring action
    (mostly used during the normal detector operation) from the FSM control.

    How it works
    On the UI left side is located the FSM hierarchy tree browser while on the right side of the same
    window is located the User Panel (UP). The UP is meant to show monitoring information
    related to the selected FSM node which is highlighted in the tree browser by a red square
    surrounding the relevant icon. In this way, while navigating trough the FSM three, in the
    monitoring zone will appear only the corresponding UP without popping up new windows.
    The different UPs for the FSM nodes have to be designed and implemented according to the
    requirements of the sub-detector experts.

    For the selected node,, provided the relevant privileges are granted at the Access Control (AC),
    the standard FSM control panel for the command issue (detector control) can be opened in a
    smaller overlapping window.

    This strategy of separating in different windows actions carried out with different frequencies
    allows for profiting in the browsing phase of almost all the screen for the UP where in a clear
    way the detector details can be represented.

    Standard UI installation
    In order to facilitate the installation in a PVSS project, the UI is provided as a FW component.
    In the following table are reported the software version of the different applications requested to
    run the UI:


                  PVSS           FW           FW_FSM                         AC
                3.6           3.0.0            r25v10             Related to FW




04/10/2007 - 3:55 PM                          7/37                                    AliceDcsUi_v3.0.doc
ALICE DCS                    ALICE DCS USER INTERFACE COMPONENT                  GDC/AF




                        FSM NODE
                          STATE
          DATE-TIME                                TITLE BAR        LHC STATUS

     USER LOGIN                    DETECTOR                                ENVIRONMENT
                                    GRAPHIC                USER TOOL       PARAMETERS
    DETECTOR                       LOCATOR                    BAR
      LOGO


  FSM NODE
  CONTROL


                                                                           USER PANEL
                                                                              FOR
                                                                           MONITORING
      FSM
   HIERARCHY
      TREE
   BROWSER
                                                                            MESSANGER
                                                                             READER




     AUXILIARY MONITORING
       ZONE OF THE FSM                               HOSTS STATE &             CLOSE
         MAJOR NODES                               FSM MAIN CONTROL           WINDOWS


                       Figure 1. The Standard DCS UI provided by the ACC




04/10/2007 - 3:55 PM                     8/37                              AliceDcsUi_v3.0.doc
ALICE DCS                       ALICE DCS USER INTERFACE COMPONENT                       GDC/AF



    Standard DCS UI description

    DETECTOR LOGO USER LOGIN & TIME




    A bitmap image representing the “Detector Logo” (60 x 45 pixels) is contained in the following
    file:

         <PROJECT_PATH>/pictures/dscUi/logo.bmp

    The sub detector developer can change the logo changing the logo.bmp file.

    To the right is display the current time and date, mouse right-click event displays the starting
    time of the current session. Closest the time the version number of dcsUi is showed.

    On the above row, the window displays the name of the logged user “User Name” (NO USER if
    nobody is logged).
    Pressing the Key button then the Login Window opens. It allows for the User Name changing.
    This is the standard FW Access Control Toolbar button.




    The Settings of the “Grant List” for the ALICE UI, can be done by editing the
    [AccessControl] section into the dscUi.config file.

    Note: for details on the ALICE AC policy and the FW Access Control component, please refer
    respectively to the “The ALICE DCS Integration Guidelines v.1.3.1” document and the relevant
    JCOP FW documentation.

    On the right side of the key icons, two bars show the Memory and Disk occupancy in
    percentage.


    FSM NODE CONTROL
    This push button opens the standard “FSM Control Window” corresponding to the selected
    node in the tree browser. The button FSM node control is enabled only for the following AC
    grant levels: Operator, Expert and Developer. The Observer is excluded.




04/10/2007 - 3:55 PM                         9/37                                  AliceDcsUi_v3.0.doc
ALICE DCS                       ALICE DCS USER INTERFACE COMPONENT                        GDC/AF


    For the Operator the FSM Control Window is opened in Modal mode, otherwise it is opened
    Modless.




       Figure 2. The FSM Control Window, to the left the single page window and to the right the
                                       multi page window

    The FSM Control Window can display an FSM hierarchy tree that have up to 126 children, if
    the System displayed have more then 14 sub nodes, a multi page windows is open.

    Note: In order to define the FSM Access Control, please refer to: http://lhcb-
    online.web.cern.ch/lhcb-online/ecs/fw/FwFSM_v24r11.readme.txt

    FSM NODE STATE




    This widget displays some relevant information of the selected FSM node: the NAME (the
    FSM Label property: in this case HMPID), the STATE (by the state name and related color)
    and operation MODE by the lock state (Included/Excluded or Enabled/Disabled).

    In case of long FSM names (typically for the DU), only the last 22 characters are displayed.




04/10/2007 - 3:55 PM                         10/37                                  AliceDcsUi_v3.0.doc
ALICE DCS                            ALICE DCS USER INTERFACE COMPONENT                        GDC/AF
    DETECTOR GRAPHIC LOCATOR




    If of interest, this area is devoted to host a “detector specific widget”. It shows the detector part
    corresponding to the selected node in the tree browser. The widget must be developed by the
    Detector Control system expert. A template file is provided in:

         <PROJECT_PATH>/panels/xxxDetector/xxxUiLocator.pnl

    The “Graphic Locator facility” can be enabled/disabled editing the dcsUi.config file in the
    section [GraphicLocator] setting respectively YES/NO the variable UseGraphicLocator


    TITLE BAR




    A two lines text space is used to show the main info about the displayed UP. In order to set the
    title, in the Event_Initialize routine of the UP must call a function:

       // ---------------- Set the title into the main window ------------------
       dcsUiBase_setMainTitle("Node XXX – monitoring etc…");
       // ----------------------------------------------------------------------


    An example is provided in the template file:

         <PROJECT_PATH>/panels/xxxDetector/xxxDetector.pnl



    USER TOOL BAR
    This bar contains the push buttons that run some user facilities.




        ICON                                 DESCRIPTION                                 GRANTED
                       Open the FW Standard Alarm Panel                                  Operator,
                                                                                         Expert,
                                                                                         Developer
                       Open the WEB Browser at the Detector HowTo home page. This
                       HTML page is located at:                                          All
                       <PROJECT_PATH>/help/en_US.iso88591/xxxHowTo/xxxHowTo.ht
                       ml where “xxx” represent the three letters detector prefix


04/10/2007 - 3:55 PM                            11/37                                  AliceDcsUi_v3.0.doc
ALICE DCS                              ALICE DCS USER INTERFACE COMPONENT                      GDC/AF
                       Open the FW Help page related to the panel showed. Please
                       refer to FW documentation.                                        All
                       Print the actual displayed panel                                  Operator,
                                                                                         Expert,
                                                                                         Developer
                       Open the Windows browser at the ALICE DCS ELOG Server             Operator,
                       page                                                              Expert,
                                                                                         Developer
                       Open a devoted panel to send a Message into the ALICE DCS         Operator,
                       ELOG. Figure 3                                                    Expert,
                                                                                         Developer
                       Open a devoted panel for the DCS Developer containing
                       debugging tools, etc. Their precise functionalities are being     Developer
                       discussed in the ACC team following some agreed policies and
                       are upgraded as new UI versions are released.
                       The referenced panel is located in

                             <PROJECT_PATH>/panels/dcsUi/dcsUiTools.pnl


    Additional buttons will be put only after proved necessity and agreed with the ACC. Any
    comment and/or suggestion from the user are welcome.

    A display zone on the right is devoted to display messages to the dcsUi Operator. Three types of
    messages could be showed using some dcsUi library functions:
       • Simple Text Info
                 void dcsUiBase_setInfoText(string title, bool highlight = false)

         •    A Percentage Progress Bar
                void dcsUiBase_setProgresBar(float progres)
                void dcsUiBase_switchProgresBar(bool bOn)

         •    A Busy Bar
                void dcsUiBase_switchBusyBar(bool bOn)




                              Figure 3. The ALICE DCS ELOG message sender panel




04/10/2007 - 3:55 PM                               12/37                               AliceDcsUi_v3.0.doc
ALICE DCS                       ALICE DCS USER INTERFACE COMPONENT                      GDC/AF
    ENVIRONMENT PARAMETERS




    This widget shows the values of two PVSS DPs; one devoted to monitor the environment
    Temperature and the second the environment Pressure. Format and Units are displayed
    according the PVSS settings.

    The “Environment Parameters facility” can be enabled/disabled, editing the dcsUi.config file in
    the section [Environment], and setting the variable UseIt to YER/NO accordingly. The DPs
    and the DPE that trace the environment parameters (DP are specified as FW LOGICAL VIEW
    names), can be chosen.

    LHC STATUS
    This widget shows the status of the LHC: the Scheduled Task, the Beam Status and the
    Radiation Status. These information will be published via DIM server running on the ALICE
    DCS computer dedicated to the external services




    For more details on the meaning of the LHC status please refer to: “LHC Operational Mode”
    document (EDMS doc No. :580728).


    The TREE BROWSER for the FSM HIERARCHY




                           Figure 4 The tree browser of the FSM hierarchy.


    In the figure 4 is displayed the tree browser for the detector FSM hierarchy. Each node,
    according to a legend, is represented via a small icon (yellow toothed wheel for CU, cyan


04/10/2007 - 3:55 PM                        13/37                                 AliceDcsUi_v3.0.doc
ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                          GDC/AF
    toothed wheel for LU and green rectangle for DU) followed by its name (FSM Label property
    for CU and LU).

    A red box surrounding the icon, the bold font and the surrounding “« »” of the name,
    highlights the selected FSM node.

    The navigation with the tree browser is quite similar to the one of the “standard Windows”.
    Clicking on the mouse right button, a FSM node is selected and the associated UP is then
    automatically displayed in the dedicated area of the UI.

    If commands have to be issued, then pushing the FSM Node Control button, the standard FSM
    control panel (smaller than the UI) opens. This is the only case when two panels are opened.
    Once the control operations are over then it can be closed and the browsing trough the tree can
    restart.

    The root node of hierarchy to be first displayed at the start up can be chosen setting the variables
    RootNode and RootObjec, in the dcsUi.config file in the section [Hierarchy].


    The USER PANEL FOR MONITORING
    Once a FSM node is selected then the corresponding UP appears in the reserved area of the UI.
    It is intended to provide complementing monitoring information. In addition, according to the
    user grant, in the UP, tables for the HV-LV channel settings (Vset, Iset,..etc), or pressure and/or
    temperature limit settings, can be made available.
    Its dimensions are: 970 x 680 pixels.

    The association between the FSM node and the panel must be done with the standard
    procedure in the FW Device & Editor Navigator.

    A template file of detector UP is available in:

         <PROJECT_PATH>/panels/xxxDetector/xxxDetector.pnl

    In order to exploit in the UP the user’s grants provided by the FW Access Control (AC), the
    DCS programmer is asked to strictly follow the schema reported in the template. He has to write
    all the relevant code for Enabling/Disabling the widgets, the setting tables, etc.

    For the exploitation of the user’s grants in the FSM control please refers to http://lhcb-
    online.web.cern.ch/lhcb-online/ecs/fw/FwFSM_v24r11.readme.txt



       //Function (NoName)_General()
       // ------     Access Control related Functions --------------------------
       void xxxDetector_DisableAllAC()
       {
         // Put Here all commands to disable objects on the panel
       }
       void xxxDetector_EnableAC(bool isObserver, bool isOperator,
                                  bool isExpert,   bool isDeveloper)
       {
                if(isObserver) {
                       // Put Here all commands to enable objects on panel
                       // related to Guest grants
                }
                if(isOperator) {
                       // Put Here all commands to enable objects on panel

04/10/2007 - 3:55 PM                          14/37                                    AliceDcsUi_v3.0.doc
ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                  GDC/AF
                        // related to Operator grants
                  }
                  if(isExpert) {
                         // Put Here all commands to enable objects on panel
                         // related to Expert grants
                  }
                  if(isDeveloper) {
                         // Put Here all commands to enable objects on panel
                         // related to Administrator grants
                  }
       }
       void xxxDetector_LoggedUserAC(string dp, string username_from_ui)
       {
         // Set the minimum users grants
         bool isObserver=false;
         bool isOperator=false;
         bool isExpert=false;
         bool isDeveloper=false;

           // Disable all items in the panel
           xxxDetector_DisableAllAC();
           // Get Grants for the specified user
           dcsUiBase_getACGrants(isDeveloper, isExpert, isOperator, isObserver);
           // Now enable - this is related to the specific Policy rules
           xxxDetector_EnableAC(isObserver,isOperator,isExpert,isDeveloper);
       }
       // ---------------------------------------------------------------------




    This is the template for the EventIntailize routine of the UP panel

       //Function (NoName)_EventInitialize()

       main()
       {

           // --------   Access control ----------------------------------------
           // Set the CB Function that Hook the change of Logged User
           dyn_string exceptionInfo;
           fwAccessControl_setupPanel("xxxDetector_LoggedUserAC",exceptionInfo);
           if (dynlen(exceptionInfo)) {
                  xxxDetector_LoggedUserAC("",""); // global "reject"
           }
           // -------------------------------------------------------------------


           // ---------------- Set the title into the main window ---------------
           dcsUiBase_setMainTitle("XXX - Detector View");
           // -------------------------------------------------------------------

       }




    The MESSENGER READER




04/10/2007 - 3:55 PM                          15/37                            AliceDcsUi_v3.0.doc
ALICE DCS                       ALICE DCS USER INTERFACE COMPONENT                       GDC/AF
    This widget shows the Info Messenger messages. The first line contains the last one arrived,
    while below all the others received during the session (if any).
    According to the privileges granted at the user (Operator, Expert or Developer), two buttons
    allows for to open a logbook utility. From there messages on the detector operation and state
    can be entered. The browsing on the archived messages can be done as well.




    AUXILIARY MONITORING ZONE OF THE FSM MAJOR NODES
    This widget can monitor the state and operation mode of a list of critical FSM nodes. Only as
    suggestion: these nodes can refer to devices of the detector infrastructure (power supplies,
    cooling and gas plants, etc…) which states, a priori, are relevant for the operation of detector
    parts as Super module, Module, Sector …..
    For the FSM operation of the critical nodes (command issue), the normal browsing and control
    panel opening procedure, has to be followed.




    Up to twenty nodes, arranged on five rows, can be displayed. A mouse click on the node opens
    in a child window the panel related to that.

    The list of the FSM nodes to be displayed can be defined editing the dcsUi.config in the
    [AuxiliaryMonitoringZone] section.

    The variable Title has to be set with a string containing the title.
    Then five variables named Row1.. Row5 contains a comma separated list of, up to four, FSM
    nodes, using the following format:

    Rowi = “<Rowi Label>,<Node 1 Label>,<Domain>.<Object>[,<Node j
    Label>,<Domain>.<Object>]



       [AuxiliaryMonitoringZone]
       # ----- This display the table -------
       Title = "XXX DETECTOR Auxiliary Zone"
       Row1 = "xxx R1,Node One,SECTOR1.DEV1_1,Node Two,SECTOR1.DEV1_2"
       Row2 = "xxx R2,Plant One,INFRAS.PLANT1,Plant Two,INFRAS.PLANT1"
       # -------------------------------------




    HOSTS STATE & MAIN FSM CONTROL PANEL for a DISTRIBUTED project




04/10/2007 - 3:55 PM                        16/37                                  AliceDcsUi_v3.0.doc
ALICE DCS                         ALICE DCS USER INTERFACE COMPONENT                        GDC/AF




    This bar contains one push button that opens the FSM Expert Control Panel (fig. 3). From there
    the start/stop of the entire FSM machinery for a distributed PVSS project can be carried out. It
    is enabled only if the Expert/Admin privileges are granted at the FW AC.
    On the right side of the button there are a series of small widgets that automatically displays the
    state of systems running in the distributed system.
    There are three types of widgets, the simplest represented by a small square that shows just the
    status of the connection, the second shows the status and the system name for a defined
    Distributed System, the third that is able to show also information about FSM
    processes/managers status and the last, .

    The dcsHostFSMStatusWidget display this information:

        Name of PVSS system and
        Status of Distribution
        Connection. The ToolTip text
        shows the Host name

                                                         Status of the FSM
                                                         Engine




        Status of the FSM
        Control API process,                               Status of the FSM
        PVSS00smi.exe                                      Device Handler
                                   Status of the FSM       Manager
                                   Server manager :
                                   fwFsmSrvr.ctl




    The list of the Systems to be displayed can be defined editing the dcsUi.config in the
    [HostsStatusZone] section.

    The variable ExternalFSMPanel has to be set, with a string that specify the name of FSM
    Control panel that will be opened pushing the FSM button..
    Then the variable named Hosts contains a comma separated list of System names that will be
    displayed with the first type of widget, using the following format:

         Hosts = "<HostName>:<SystemName>[,<HostName>:<SystemName>]"


    The variable named FSMHosts contains a comma separated list of System names that will be
    displayed with the second type of widget, using the following format:

         FSMHosts = "<HostName>:<SystemName>[,<HostName>:<SystemName>]"



04/10/2007 - 3:55 PM                          17/37                                   AliceDcsUi_v3.0.doc
ALICE DCS                          ALICE DCS USER INTERFACE COMPONENT                  GDC/AF
    Finally, the variable named HostsSmall contains a comma separated list of System names that
    will be displayed with the third type of widget, using the following format:

         HostsSmall = "<HostName>:<SystemName>[,<HostName>:<SystemName>]"



       [HostsStatusZone]
       ExternalFSMPanel = "dcsFsmTools\dcsFSMControl.pnl"
       Hosts = "ALIDCS001:dcs_system1,ALIDCS002:dcs_system2"
       HostsSmall = "ALIDCS001:dcs_system1,HMPIDCS3:hmp_main"
       FSMHosts = "HMPIDCS3:hmp_main,HMPIDCS4:hmp_hvlv"
       # -------------------------------------


    The FSM Expert Control Panel (fig. 3) contains all relevant information about FSM detailed
    status & control. In order to adapt the panel at the sub-detector FSM structure, the DCS
    programmer is asked to modify the panel putting the suitable number of the requested objects.




                                                Figure 5

    An example panel is in the :

         <PROJECT_PATH>/panels/dcsFsmTools/dcsFSMControl_example.pnl

    Some widgets are furnished in order to arrange this panel:

         •    dcsDimDnsStatusWidget.pnl : Display the status of DIM DNS Server node.




04/10/2007 - 3:55 PM                          18/37                              AliceDcsUi_v3.0.doc
ALICE DCS                          ALICE DCS USER INTERFACE COMPONENT                         GDC/AF
         •    dcsFsmControllHierarchyWidget.pnl : Display two push buttons able to made the
              Stop Start/restart of the entire Hierarchy for all systems in the distributed architecture.



         •    dcsFsmHostStatusWidget.pnl : Display a small square that represent a Host into the
              Distributed system. Two parameters have to be specified: $HostName (DNS Name of
              Host without the domain suffix) and $SystemName (the PVSS project system name
              without the colon character).




              A click on the square opens a related panel showing relevant information about the
              distributed host.




04/10/2007 - 3:55 PM                            19/37                                   AliceDcsUi_v3.0.doc
ALICE DCS                          ALICE DCS USER INTERFACE COMPONENT                      GDC/AF




         •    dcsFsmSrvHostWidget.pnl : It displays the status of a FSM Server Manager. One
              parameter has to be specified: $SysName (the PVSS project system name without the
              colon character).



              Then, the name of system, the status of fwFsmSrvr.ctl manager, and the status of the
              FSM server are showed.

         •    dcsFsmObjNodeWidget.pnl: It displays the status of a FSM Domain node. Two
              parameters have to be specified: $sysName (the PVSS project system name without the
              colon character) and $node (the FSM domain node name).



              The name of node, two push buttons to restart and to stop the FSM tree recursively, then
              the status of FSM Domain node, and the ownership of that domain are shown.

         •    dcsFSMTailorWidget.pnl : It displays the controls used to set and create the
              FSM enable/disable configuration file then edit, save and apply the operation
              mode of all the CUs in the FSM (include, exclude, disable, enable).




    In fact, since the CU operation mode is lost at each FSM Start/Stop, or at the PVSS
    project restart, then for hierarchies with many CUs, the configuration file can be very
    useful. Since this facility is under development it has been included in the UI as a pre-
    release version for test purposes.




04/10/2007 - 3:55 PM                           20/37                                 AliceDcsUi_v3.0.doc
ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                     GDC/AF




    In the upper part of the FSM MAIN CONTROL panel there are three others buttons to access
    additional FSM features as:
    -    the FSM synoptic panel, showing at one glance the state and the operational mode of
         all the FSM objects in the project;




    -    the FSM Chart panel showing the FSM_State vs. Time of the FSM objects in the
         project. Also the commands and the command execution of FSMs can be displayed.

04/10/2007 - 3:55 PM                        21/37                                 AliceDcsUi_v3.0.doc
ALICE DCS                       ALICE DCS USER INTERFACE COMPONENT                       GDC/AF




    In order to display the chart it is mandatory to archive the states of the FSM CUs/DUs. For this
    a dedicated tool is provided. A panel, opened by means of a “FSM Archive” button, gives the
    possibility to set the “Archive” property of all the FSM nodes of a system.




04/10/2007 - 3:55 PM                        22/37                                  AliceDcsUi_v3.0.doc
ALICE DCS                      ALICE DCS USER INTERFACE COMPONENT                     GDC/AF




    CLOSE WINDOW button
    The CLOSE button can be optionally displayed into the main panel. However, to prevent
    accidental panel closure, editing the dcsUi.config in the [General] section, and setting the
    variable CloseButton with NO, the main UI is left continuously running under the control of
    the PVSS consol process.




04/10/2007 - 3:55 PM                       23/37                                AliceDcsUi_v3.0.doc
ALICE DCS                             ALICE DCS USER INTERFACE COMPONENT                       GDC/AF


                               USER INTERFACE INSTALLATION
    I –Pre-requisite for the installation
         •    Istallation of JCOP FrameWork component
         •    Setting of Access Control Domain/Privileges/Groups/Users according the
              centralized AC mechanism managed by ACC
         •    Definition of the FSM Hierarchy for the Sub-detector
         •    Settings inside the FSM Hierarchy of labels for each node
         •    Settings for the FSM Hierarchy of AC privileges for Operator and Expert grants
         •    Settings for the FSM Hierarchy the association between nodes and User panels

    II –Component Installation
    In order to install the standard UI component ‘Extract’ all zipped files into a temporary
    directory. Then, start your PVSS Project and run the standard JCOP FW
    “fwInstallation/fwInstallation.pnl” panel.

    Install the component Alice DCS UI.

    Restart the project.


    III – Look & Feel
    In order to change the Look & Feel of the dcsUi the sub detector developer can replace this
    files:
                 •     displayed logo in the upper left corner of the UI : the user can replace the
                       file: pictures/dcsUi/logo.bmp with a customized one. (60 pixel width, 43
                       pixel height, 256 colours).
                 •     displayed background : replace the file pictures/dcsUi/back.jpg with a
                       JPEG texture image (1280 x 1024 pixel)
                 •     default user monitoring zone background : replace the                     file
                       pictures/dcsUi/splash.jpg with a JPEG image (975 x 695 pixel)
                 •     color table : replace the file colorDB/dcsUiBaseColours with a new color
                       table. Some examples are give in the directory data/Themes, this files can be
                       edited with the PVSS color editor.



    III – Modify the config file : config/dcsUi.config

    The UI configuration file config/dcsUi.config concentrates in one place all the possible
    settings the user can do for the UI.

                       In the package an example file named dcsUi_example.config is present. After the
                       first installation and before the customization of the configuration, rename it as
                       dcsUi.config this action prevents to overwrite this file during the installation of
                       next releases.


04/10/2007 - 3:55 PM                              24/37                                  AliceDcsUi_v3.0.doc
ALICE DCS                         ALICE DCS USER INTERFACE COMPONENT                          GDC/AF




    [Hierarchy] section
    This section contains specifications about the FSM Hierarchy:

      RootNode = <NodeName>                         Name of Root FSM Domain
      RootObject = <ObjName>                        Name of Root FSM Object




     [AccessControl] section
    This section contains two lines devoted to the Centralizaed Access Control mechanism:

    UseCentralizedAC=YES
    CentralizedACServer=dcs_system2

    Actually these lines are left as they are.

    Then one line specifies detector Access Control Domain name:

    ACDomain=<AC detector domain>

    For more details on the Access Control please refer to the Manual Page of the JCOP Framework
    Access Control component and to ACC Access control responsible.

    FSMExcludeAC=<Privileges>
    FSMDisableAC=<Privileges>

    This two items specify the level of privileges needed to operate changes of FSM Operation
    Mode (Esclude/Include and Enable/Disable). Privileges are that specified into by AC list :
    Modify, Debug, Control, Monitoring.




    [General] section
    This section contains indication on some additional options of the UI.

    CloseButton = <YES|NO>                Specify if the Main Panel have the “CLOSE” button



    [HowToFacility] section
    This section specifies the path and the file name of the “Detector Related HowTo” home page.
    The PathName is specified starting from the “<PROJ_PATH>\ help \en_US.iso88591\”
    directory.

    HowToFileName = <FileName>            Specify the HomePage path for the HowTo Pages facility



    [Environment] section
    This section contains indication about the widget for the Environment parameters

04/10/2007 - 3:55 PM                             25/37                                 AliceDcsUi_v3.0.doc
ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                           GDC/AF


    UseIt = <YES|NO>                   Specify if the EnviromentParam Widget will be displayed
    TemperatureDP = <AliasDPName>      Alias name of DP that contains the environment temperature
    PressureDP = <AliasDPName>         Alias name of DP that contains the environment pressure
    DPElement = <DPEName>              Name of the DP Element that contains the P/T value

    Example :

    Let’s suppose that in the project we have two DP of FwAi type that are used to read the
    environment parameters, and their names into the Logical View are: ENVIRON/TEMP and
    ENVIRON/PRES. The settings are:

        [Environment]
       UseIt=YES
       TemperatureDP = ENVIRON/TEMP
       PressureDP = ENVIRON/PRES
       DPElement = actual.value


    [GraphicLocator] section
    This section contains details about the Graphic Locator widget

    UseGraphicLocator = <YES|NO>          Specify if the Widget will be displayed
    GraphLocatorfile = <FileName>         Specify the path and filename of panel that realize the
                                          Detector specific Graphic Locator

    Example :

       [GraphicLocator]
       UseGraphicLocator=YES
       GraphLocatorFile=xxxDetector\xxxUiLocator.pnl




    [AuxiliaryMonitoringZone] section
    This section contains details about the Auxiliary Monitoring Zone widget

    Title = <String>                  Specify the Title of the Monitoring zone
    Row1= <List of FSM nodes>         Specify the list of nodes that are displayed into the first row
    Row2= <List of FSM nodes>         Specify the list of nodes that are displayed into the second row
    Row3= <List of FSM nodes>         Specify the list of nodes that are displayed into the third row
    Row4= <List of FSM nodes>         Specify the list of nodes that are displayed into the fourth row
    Row5= <List of FSM nodes>         Specify the list of nodes that are displayed into the fifth row


    The syntax of the < List of FSM nodes> is :

               <Label of row>,<Label of Node 1>,<Node1>, . . ,<Label of Node 4>,<Node4>

    And for the <Node> is:

                  <Domain>.<Object>

    Example :

    Assuming that in the project the FSM Hierarchy is:

04/10/2007 - 3:55 PM                        26/37                                       AliceDcsUi_v3.0.doc
ALICE DCS                         ALICE DCS USER INTERFACE COMPONENT                         GDC/AF


    Hierarchy                                  FSM
                                               Type
    XXX_DETECTOR                               C.U.
       XXX_SECTOR1                             C.U.
             XXX_PART1_1                       L.U.
             XXX_PART1_2                       L.U.
                XXX_DEV_2A                     D.U.
       XXX_SECTOR2                             C.U.
             XXX_PART2_1                       L.U.
       XXX_INFRASTRUCTURE                      C.U.
             XXX_INFR_CRATE1                   L.U.
             XXX_INFR_CRATE2                   L.U.

    And we want to display in the Auxiliary Zone the status of nodes “XXX_PART1_1”,
    “XXX_PART2_1”, “XXX_DEV_2A” , “XXX_INFR_CRATE1” and “XXX_INFR_CRATE2”

    The configuration file could be:

[AuxiliaryMonitoringZone]
Title = "XXX detector relevant nodes"
Row1 = "Partitions,FIRST,XXX_SECTOR1.XXX_PART1_1,SECOND,XXX_SECTOR2.XXX_PART2_1
Row2 = "Devices,DEV OF SEC1,XXX_SECTOA1.XXX_DEV_2A
Row3 = "Crates,POWER,XXX_INFRASTRUCTURE.XXX_INFR_CRATE1,
GAS,XXX_INFRASTRUCTURE.XXX_INFR_CRATE1




    [HostsStatusZone] section
    This section contains details about the Hosts Status Zone widget

    ExternalFSMPanel = <String>          Specify the name of the panel open with the FSM Control push
                                         button. The standard one is : "dcsFsmTools\dcsFSMControl.pnl"
    Hosts=<List of hosts>                Specify the list of distributed hosts that are displayed with the
                                         “simple host widget”
    HostsSmall= <List of hosts>          Specify the list of distributed hosts that are displayed with the
                                         “small host widget”
    FSMHosts= <List of hosts>            Specify the list of distributed hosts that are displayed with the
                                         “complex host widget”


    The syntax of the < List of hosts> is :

                       <Host Name>:<System Name>[,<Host Name>:<System Name>…]

    For the <Host Name> is a string contain the DNS host name without the domain suffix

    For the <System Name> is a string contain the PVSS System name without the colon character

    [ELogFacility] section
    This section contains details about the ALICE DCS ELOG configuration

    UseIt = <String>                     Specify if you want the ELOG facility setted (YES or NO).
    ELogVerboseLog = <String>            Specify if you want ELOG debugging messages into the log
                                         viewer (YES or NO).
    ELogHost=<Name of hosts>             Specify the name of the ELOG server
    ELogHostPort= <Number>               Specify the port number of the ELOG server

04/10/2007 - 3:55 PM                          27/37                                    AliceDcsUi_v3.0.doc
ALICE DCS                         ALICE DCS USER INTERFACE COMPONENT                           GDC/AF
    ELogSubDirectory= <String>            Specify the sub dir of log into the ELOG URL
    DetectorELogURL= <String>             Specify the neme of the Detector specific ELOG
    ELogWritePasswd = <String>            Not yet defined
    ELogUserName = <String>               Not yet defined
    ELogUserPasswd = <String>             Not yet defined




    IV – User Panel Template
    In the panels/xxxDetector/ directory there is a template named: xxxDetector.pnl. It contains
    the “template scripts” that integrates the Access Control mechanism in the user panels.

    In the General section of the Panel, there are three defined functions:
        - the first one disables all the panel objects sensitive to the “Logged User”;
        - the second one enables the panel objects according to the “grant level”;
        - the third one is the CallBack_Function that react to the User Login.

       //Function (NoName)_General()

       // ------    Access Control related Functions ---------------------------
       //
       void xxxDetector_DisableAllAC()
       {
         // Put Here all commands to disable objects on panel
       }

       void xxxDetector_EnableAC(bool isObserver, bool            isOperator,    bool    isExpert,
       bool isDepeloper)
       {
               if(isObserver)
               {
                      // Put Here all commands to enable        objects on panel
                      // related to Guest grants
               }
               if(isOperator)
               {
                      // Put Here all commands to enable        objects on panel
                      // related to Operator grants
               }
               if(isExpert)
               {
                      // Put Here all commands to enable        objects on panel
                      // related to Expert grants
               }
               if(isDepeloper)
               {
                      // Put Here all commands to enable        objects on panel
                      // related to Administrator grants
               }
       }

       void xxxDetector_LoggedUserAC(string dp, string username_from_ui)
       {
         // Set the minimum users grants
         bool isObserver=false;
         bool isOperator=false;
         bool isExpert=false;
         bool isDepeloper=false;

         // Disable all items in the panel
         xxxDetector_DisableAllAC();
         // Get Grants for the specified user
         dcsUiBase_getACGrants(isDepeloper,isExpert,isOperator,isObserver);


04/10/2007 - 3:55 PM                           28/37                                     AliceDcsUi_v3.0.doc
ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                     GDC/AF
           // Now enable - this is related to the specific Policy rules
           xxxDetector_EnableAC(isObserver,isOperator,isExpert,isDepeloper);
       }
       // ----------------------------------------------------------------------


    In the EventInitialize section of the Panel, there are some code lines that register the Access
    Control CallBackFunction and set the Title in the Main Panel Window.

       //Function (NoName)_EventInitialize()

       main()
       {
         // --------   Access control -----------------------------------------
         // Set the CB Function that Hook the change of Logged User
         dyn_string exceptionInfo;
         fwAccessControl_setupPanel("xxxDetector_LoggedUserAC",exceptionInfo);
         if (dynlen(exceptionInfo)) {
                xxxDetector_LoggedUserAC("",""); // global "reject"
         }
         // --------------------------------------------------------------------

           // ---------------- Set the title into the main window ---------------
           dcsUiBase_setMainTitle("XXX - Detector View");
           // -------------------------------------------------------------------
       }



    VI – Graphic Locator Template
    In the directory panels/xxxDetector/ there is a template file named: xxxUiLocator.pnl. It
    contains the “template scripts” that realize the Graphic Locator widget.

    The developer must write some functions that Hide/Visualize a graphic schema of the detector
    according to the object name passed to the control.

       //Function (NoName)_General()
       __resetBack()
       {
         // Here put all commands to reset colors
         // of graph objects
         /* ------------- Example ------------------
                setValue("Mod0", "backCol", "{128,128,128}");
                setValue("Mod1", "backCol", "{128,128,128}");
                setValue("Mod2", "backCol", "{128,128,128}");
                setValue("Mod3", "backCol", "{128,128,128}");
         ----------------------------------------- */
       }
       __invisible()
       {
         // Here put all commands to set all graph
         // objects INVISIBLE
         /* ------------- Example ------------------
                setValue("Mod0", "visible", false);
         ----------------------------------------- */
       }
       __visible(string what)
       {
         // Here put all commands to set graph objects
         // of type "what" VISIBLE
         /* ------------- Example ------------------
         switch(what)
         {
                default:
                       setValue("Mod0", "visible", true);
                       break;
         }
         ----------------------------------------- */
       }


04/10/2007 - 3:55 PM                        29/37                                 AliceDcsUi_v3.0.doc
ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                          GDC/AF
       __setDisplay( string object )
       {
         // Here put the script to decode the Object
         // in order to decide graph objects of locator in the
         // panel will be set properties colors/visible ecc.
         //
         /* ------------- Example ------------------
         int type = 0;
         __invisible();
         switch(type)
         {
                case 0:
                       setValue("Mod0", "backCol", "{254,251,251}");
                       txtDescr.text = "ALL";
                       break;
                case 1:
                       setValue("Mod0", "backCol", "{254,251,251}");
                       txtDescr.text = "RICH MOD-0";
                       break;
         }
         ---------------------------------------- */
       }
       //Function (NoName)_EventInitialize()
       main()
       {
         // This is called at the startup
         __setDisplay( $obj );
       }
       //Function txtLocation_EventSetFocus()
       main()
       {
         // This is called each time a new panel is loaded
         __resetBack();
         __setDisplay( txtLocation.text );
         setInputFocus(myModuleName(),myPanelName(),"txtDummy");
       }


    All the graphic objects, representing the detector’s parts, have to have a corresponding FSM
    node in the hierarchy.
    As suggestion: in order to highlight the detector part selected in the tree browser, the locator can
    fill with the white colour, the corresponding shapes. In addition it can set a text box with a short
    label.




04/10/2007 - 3:55 PM                          30/37                                    AliceDcsUi_v3.0.doc
ALICE DCS                            ALICE DCS USER INTERFACE COMPONENT                     GDC/AF


                              APPENDIX A – dcsUiBase library
// $License: NOLICENSE
/* ------------------------------------------------------------

         ALICE DCS - UI LIBRARY

This library collect all functions linked to the ALICE UI

---------------------------------------------------------------*/
//   Ver. 0.6 11/02/2007
//
//   Add information for LHC
//   Add NetTestFunction
//   Add FsmConnectMode Wrapper
//   Add function to display Info Dialog

// ---------- Constant definition ----------------------------
const string DCSUI_VERSION = "3.0.0";

const int SPLASH_SCREEN_DELAY = 2; // Number of seconds

const bool DCSUI_INFO_BRIGHT = true; // Info window Hightligt
const bool DCSUI_INFO_DARK = true; // Info window Dark

// Coordinate In the AC Grant List
const int DCSUI_AC_OBSERVER = 1;
const int DCSUI_AC_OPERATOR = 2;
const int DCSUI_AC_EXPERT = 3;
const int DCSUI_AC_DEVELOPER = 4;

// LHC Constants
const int DCSUI_LHC_SCHEDULE_SHUTDOWN = 1;
const int DCSUI_LHC_SCHEDULE_CHECKOUT = 2;
const int DCSUI_LHC_SCHEDULE_PROTON_RUN = 3;
const int DCSUI_LHC_SCHEDULE_ION_RUN = 4;
const int DCSUI_LHC_SCHEDULE_HIGH_BETA_RUN = 5;
const int DCSUI_LHC_SCHEDULE_MACHINE_DEVELOPMENT = 6;

const   int   DCSUI_LHC_CYCLE_PREPARE = 1;
const   int   DCSUI_LHC_CYCLE_PRE_INJECTION = 2;
const   int   DCSUI_LHC_CYCLE_INJECTION = 3;
const   int   DCSUI_LHC_CYCLE_FILLING = 4;
const   int   DCSUI_LHC_CYCLE_RAMP = 5;
const   int   DCSUI_LHC_CYCLE_ADJUST = 6;
const   int   DCSUI_LHC_CYCLE_UNSTABLE_BEAMS = 7;
const   int   DCSUI_LHC_CYCLE_STABLE_BEAMS = 8;
const   int   DCSUI_LHC_CYCLE_BEAM_DUMP = 9;
const   int   DCSUI_LHC_CYCLE_RECOVER = 10;
const   int   DCSUI_LHC_CYCLE_PRE_CYCLE = 11;

const int DCSUI_FSM_MODAL = 1;
const int DCSUI_FSM_MODLESS = 2;

global string gsDcsUiEnvironmentShape = "";

/* ------------------------------------------------------------
        Funtion for Setting Global Variables

         F.A. ver 1.0    19/6/2006

         History

                   19/06/2006     - Creation
                   03/08/2006 - Modify to the dcsUiBase_setMainTitle
                   19/10/2006 - Add Configs entry for the Auziliary Monitoring Zone
                   30/10/2006 - Add Configs entry for AC centralized Service

------------------------------------------------------------ */
bool dcsUiBase_Init()
// ------------------------------------------------------------


/* ------------------------------------------------------------
        Funtion for Get a Param from the Config File

         F.A. ver 1.0    19/6/2006

         History

04/10/2007 - 3:55 PM                            31/37                                 AliceDcsUi_v3.0.doc
ALICE DCS                              ALICE DCS USER INTERFACE COMPONENT                 GDC/AF

               19/06/2006     - Creation
------------------------------------------------------------ */
string dcsUiBase_getConfigParam(string section, string name)

/* ------------------------------------------------------------
        Funtion for Get the AC grants defined into the config
        file Grants list

         F.A. ver 1.0    19/6/2006

         History

               19/06/2006     - Creation
------------------------------------------------------------ */
void dcsUiBase_getACGrants(bool & isDeveloper,bool & isExpert,
                                 bool & isOperator, bool & isObserver)


/* ------------------------------------------------------------
        Funtion for set the title into the Main DCS Window

         F.A. ver 1.0    19/6/2006

         History

               19/06/2006     - Creation
               30/10/2006 - Add the Existence verify
            28/02/2007 - Add the mecchanism of arming...
------------------------------------------------------------ */
void dcsUiBase_setMainTitle(string title)

/* ------------------------------------------------------------
        Funtion for display a text into Info Main DCS Window Dialog

         F.A. ver 1.0    11/2/2007

         History

                   11/02/2007    - Creation

------------------------------------------------------------ */
void dcsUiBase_setInfoText(string title, bool highlight = false)
void dcsUiBase_setProgresBar(float progres)
void dcsUiBase_switchProgresBar(bool bOn)
void dcsUiBase_switchBusyBar(bool bOn)



/* -------------------------------------------------------------
        Function for get the status of a One Manager

         F.A. ver 1.0     03/10/2006

         History

               03/10/2006     - Creation
-------------------------------------------------------------- */
bool dcsUiBase_getMgrState(string sSystemName, string sManagerName, string sManType, int iManNum = -
1 )

/* -------------------------------------------------------------
        Function for get the status of a List of Managers

         F.A. ver 1.0     03/10/2006

         History

               03/10/2006     - Creation
-------------------------------------------------------------- */
bool dcsUiBase_getMgrsState(string sSystemName, string sManagerName, string sManType, dyn_int
diManNums)

/* -------------------------------------------------------------
        Function to convert the status of LHC into message

         F.A. ver 1.0     20/10/2006

         History

         Type := 0 LHC CYCLE
                   1 LHC SCHEDULE


04/10/2007 - 3:55 PM                              32/37                             AliceDcsUi_v3.0.doc
ALICE DCS                            ALICE DCS USER INTERFACE COMPONENT                   GDC/AF

-------------------------------------------------------------- */
string dcsUiBase_LHCStatus2Mess(int iStatus, int iType=0)

/* -------------------------------------------------------------
        Function to convert the status of LHC into color

         F.A. ver 1.0   20/10/2006

         History

-------------------------------------------------------------- */
string dcsUiBase_LHCStatus2Col(int iStatus)

/* -------------------------------------------------------------
        Function to test the status of Net Connection

         F.A. ver 1.0   19/12/2006

         History

-------------------------------------------------------------- */
bool dcsUiBase_TestNetworkConnection(string sHostName)

/* -------------------------------------------------------------
        Function to convert the PMON Web Page into a table

         F.A. ver 1.0   01/03/2007

         return a matrix
         column := STATE,MANAGER,TIME,PID,OPTIONS
         rows := one for each manager

         History

-------------------------------------------------------------- */
dyn_dyn_string dcsUiBase_pmonWeb2Table(string sWeb)

/* -------------------------------------------------------------
        Function to read the PMON Web Page

         F.A. ver 1.0   01/03/2007

         return the web page

         History

-------------------------------------------------------------- */
string dcsUiBase_pmonReadStatus(string Server, unsigned uiPort=4999, string Host)

/* -------------------------------------------------------------
        Function to Init the E-Log System

         F.A. ver 1.0   03/10/2007

         History

-------------------------------------------------------------- */
bool dcsUiBase_ElogInit()

/* -------------------------------------------------------------
        Function to Add an Entry into the E-Log System

         F.A. ver 1.0   03/10/2007

         History

-------------------------------------------------------------- */
bool dcsUiBase_ElogNewEntry(string sCategory = "General",
                                  string sAuthor = "ALICE dcsUi",
                                  string sSubject = "Test",
                                  string Message = "Hello World !!",
                                  string AttachedFiles = “”)

// ============================ EOF ===========================




04/10/2007 - 3:55 PM                            33/37                               AliceDcsUi_v3.0.doc
ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                      GDC/AF


             COOKBOOK for the GRAPHIC LOCATOR CREATION
    In order to build a graphic locator widget, let’s assume the detector has the followings Logical
    View:

    Hierarchy                                 FSM Type
    XXX_DETECTOR                              C.U.
       XXX_SECTOR1                            C.U.
             XXX_PART1_1                      L.U.
             XXX_PART1_2                      L.U.
       XXX_SECTOR2                            C.U.
             XXX_PART2_1                      L.U.
       XXX_INFRASTRUCTURE                     C.U.
             XXX_INFR_CRATE1                  L.U.
             XXX_INFR_CRATE2                  L.U.

    Then the corresponding graphic view of the detector can be the following:


                                         SECTOR1
            SECTOR1                      PART 2
            PART 1

                                                        CRATE1


                                                        CRATE2


                       SECTOR2
                       PART 1
                                       INFRASTRUCTURE


    First of all we open the template file xxxDetector/xxxUiLocator.pnl and build the graphic
    schema of the detector.




    Then assign the names to all the objects as showed in the figure.




04/10/2007 - 3:55 PM                         34/37                                 AliceDcsUi_v3.0.doc
ALICE DCS                        ALICE DCS USER INTERFACE COMPONENT                 GDC/AF




                       Sec1            Sec2       Infr           Cr1

                               Sec3                        Cr2


    Now open the Script Editor Windows and start to write the scripts in the NoName_General
    section.
    First of all write the function that reset the background color of all the objects:

       __resetBack()
       {
         setMultiValue("Sec1", "backCol", "{128,128,128}",
                       "Sec2", "backCol", "{128,128,128}",
                       "Sec3", "backCol", "{128,128,128}",
                       "Infr", "backCol", "{128,128,128}",
                       "Cr1", "backCol", "{128,128,128}",
                       "Cr2", "backCol", "{128,128,128}");
       }


    Then the function that makes invisible all objects :

       __invisible()
       {
          setMultiValue("Sec1", "visible", false,
                        "Sec2", "visible", false,
                        "Sec3", "visible", false,
                        "Infr", "visible", false,
                        "Cr1", "visible", false,
                        "Cr2", "visible", false);
       }


    Now we define the function that makes visible some objects according to the “Logical name”
    passed as parameter :

       __visible(string what)
       {
         switch(what)
         {
           case “XXX_DETECTOR”: // all sectors and rack switched on
                 setMultiValue("Sec1", "visible", true,
                         "Sec2", "visible", true,
                         "Sec3", "visible", true,
                         "Infr", "visible", true);
                break;
           case “XXX_SECTOR1”: // all sectors switched on
           case “XXX_SECTOR2”:
           case “XXX_PART1_1”:
           case “XXX_PART1_2”:


04/10/2007 - 3:55 PM                          35/37                           AliceDcsUi_v3.0.doc
ALICE DCS                         ALICE DCS USER INTERFACE COMPONENT                      GDC/AF
               case “XXX_PART2_3”:
                     setMultiValue("Sec1", "visible", true,
                             "Sec2", "visible", true,
                             "Sec3", "visible", true);
                    break;
                  case XXX_INFRASTRUCTURE: // switch rack and crates
                  case XXX_INFR_CRATE1:
                  case XXX_INFR_CRATE2:
                    setMultiValue("Infr", "visible", true,
                             "Cr1", "visible", true,
                             "Cr2", "visible", true);
                    break;
           }
       }


    And finally the script that change the background color according the object:

       __setDisplay( string object )
       {
         // switch off/on objects
         __invisible();
         __visible(object);

           // set the white back ground
           switch(object)
           {
                  case “XXX_DETECTOR”: // all sectors and rack switched on
                         setMultiValue("Sec1", "backCol", "{254,251,251}",
                                       "Sec2", "backCol", "{254,251,251}",
                                       "Sec3", "backCol", "{254,251,251}",
                                       "Infr", "backCol", "{254,251,251}");
                         txtDescr.text = "XXX DETECTOR";
                         break;
                  case “XXX_SECTOR1”: // part 1 & 2 of sector 1 are switched on
                         setMultiValue("Sec1", "backCol", "{254,251,251}",
                                       "Sec2", "backCol", "{254,251,251}");
                         txtDescr.text = "SECTOR 1";
                         break;
                  case “XXX_SECTOR2”: // part 1 of sector 2 is switched on
                         setMultiValue("Sec3", "backCol", "{254,251,251}");
                         txtDescr.text = "SECTOR 2";
                         break;
                  case “XXX_PART1_1”: // part 1 of sector 1 is switched on
                         setMultiValue("Sec1", "backCol", "{254,251,251}");
                         txtDescr.text = "PART1 – SEC1";
                         break;
                  case “XXX_PART1_2”: // part 2 of sector 1 is switched on
                         setMultiValue("Sec2", "backCol", "{254,251,251}");
                         txtDescr.text = "PART2 – SEC1";
                         break;
                  case “XXX_PART2_1”: // part 1 of sector 2 is switched on
                         setMultiValue("Sec3", "backCol", "{254,251,251}");
                         txtDescr.text = "PART1 – SEC2";
                         break;
                  case “XXX_INFRASTRUCTURE”: // the rack is switched on
                         setMultiValue("Infr", "backCol", "{254,251,251}");
                         txtDescr.text = "INFRASTR. RACK";
                         break;
                  case “XXX_INFR_CRATE1”: // the first crate is switched on
                         setMultiValue("Cr1", "backCol", "{254,251,251}");
                         txtDescr.text = "POWER CRATE";
                         break;
                  case “XXX_INFR_CRATE2”: // the secont crate is switched on
                         setMultiValue("Cr2", "backCol", "{254,251,251}");
                         txtDescr.text = "VME TRIGGER";
                         break;
           }
       }


    Then rename and save the panel in the relevant directory.

04/10/2007 - 3:55 PM                         36/37                                  AliceDcsUi_v3.0.doc
ALICE DCS                     ALICE DCS USER INTERFACE COMPONENT         GDC/AF




    Example of panel at Run Time




04/10/2007 - 3:55 PM                     37/37                     AliceDcsUi_v3.0.doc