CDF Run Control Implementation
description
Transcript of CDF Run Control Implementation
![Page 1: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/1.jpg)
CDF Run Control Implementation
Elliott McCrory
BD/Proton Source/Linac & CDF
September 18, 2001
![Page 2: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/2.jpg)
18 September 2001Elliott McCrory2
Talk Overview
Overview Major OO Components
– Some class diagrams Key Elements:
– Classes– Interfaces– Listeners
Transition & TransitionStateMachine Scripting Performance
![Page 3: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/3.jpg)
18 September 2001Elliott McCrory3
Overview of Run Control
RC and most of its components are implemented in Java
– OO?? Platform: FRH Linux
– Began with SGI Irix Swing-based GUI JDBC SmartSockets communications Heavily threaded
![Page 4: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/4.jpg)
State Manager
SmartSockets Server(s)
Consumer
Error Handler
State Manager State Manager
Error Handler Error Handler
RunSet (Configuration) Database
OnlineData
VME n VME n+1 VME n+2 Level 2 Level 3VME n+3
Consumer
![Page 5: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/5.jpg)
18 September 2001Elliott McCrory5
Major Components of RC
RunSet editor for client configuration Error handler for expert system control Data consumers VxWorks coordination General state machine logic
– Discussed here
Scripting interface for calibrations
![Page 6: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/6.jpg)
18 September 2001Elliott McCrory6
GUI
Active State
Available Transition
Status of RC
Tevatron Status
Unavailable Transition
![Page 7: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/7.jpg)
Top-Level Class View
GUI.class
rcBase.class
Shell.class
Jpython Scripting Classes
daqStateManager.class GenericCalibStateManager.class QIECalibStateManager.class
RunSet.class RunSetEditor.class PartitionSelector.class
RunTypeSelector.classConsumerEditor.class VxConfig.class
ErrorHandler.class
![Page 8: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/8.jpg)
RC State Machine/Manager
FSM.class
Transition.class
daqStateManager.class GenericCalibStateManager.class
TransitionStateMachine.class
State.class
QIECalibStateManager.class
messenger.class
readoutConfig.class
ConfigMess.class
StateManager.class
![Page 9: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/9.jpg)
18 September 2001Elliott McCrory9
Key Concepts
Modularism, abstraction, inheritance/polymorphism, data hiding, Mom & apple pie– Some “Design Patterns”
Isolation of GUI from FSM – Control flows “down”; GUI information flows “up”
through listeners and interfaces
![Page 10: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/10.jpg)
18 September 2001Elliott McCrory10
Key Classes
FSM– Generalized finite state
machine StateManager
– CDF RC specific State Transition TransitionStateMachine DebugLevel
– Handles diagnostic printout
messenger– Singelton Design Pattern– Handles messaging to clients
ConfigMess– Abstract: all clients use this
class for their configuration messages
ConfigMessageFactory– Factory Design Pattern– Returns a ConfigMess
readoutConfig– Handles reception of replies
from clients
![Page 11: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/11.jpg)
18 September 2001Elliott McCrory11
Key Interfaces
RCAction– Command Design Pattern– Perform an action when entering a state– public boolean execute()
RCCondition– public boolean isMet() to leave a state– public boolean isViolated() when an error is
encountered– public void reset()
![Page 12: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/12.jpg)
18 September 2001Elliott McCrory12
Key Listeners
GUI Enabling– StateChangeListener– TransitionChangeListener– FsmStatusListener
Global information management– StateEventListener
![Page 13: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/13.jpg)
18 September 2001Elliott McCrory13
Implementation of Transitions
Specifications say: Sequence RCAction’s– e.g., you must configure all clients (“ColdStart”)
before configuring Level 3
Implemented as a FSM TransitionStateMachine extends Transition
and “Has A” FSM
![Page 14: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/14.jpg)
18 September 2001Elliott McCrory14
Transition Sub State Machine
Sx = sub state ESx = Error State Ax = Action upon
entering State Cx = Condition for
leaving State
![Page 15: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/15.jpg)
18 September 2001Elliott McCrory15
Scripting
Used for calibrations– Desire to change one or two parameters in a client crate’s
configuration message over ~10 calibration iterations
Initially implemented in Jpython– Basic JPython class extends Java class Shell– Generally requires “isinstance()” JPython operator to find
configuration message for crate being calibrated
Being abandoned for all-Java solution– Benefits of scripting (easy changes) not strong enough to
outweigh drawbacks (new language).
![Page 16: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/16.jpg)
18 September 2001Elliott McCrory16
Performance
Startup of rc.GUI: about 1 minute Java VM: 10’s of MB Run-time performance: no issue Knowledgeable and/or relevant programmers:
3 to 10
![Page 17: CDF Run Control Implementation](https://reader036.fdocuments.net/reader036/viewer/2022062423/56814749550346895db4874b/html5/thumbnails/17.jpg)
18 September 2001Elliott McCrory17
Summary
Java implementation of CDF Run Control– Swing GUI– Some OO techniques
Calibration scripts in JPython, moving to Java calibration programs