SLAC PEP-II
BABAR
SLAC <-> RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Search
Who's who?[pdf]
Meetings
FAQ Homepage
Archive
Environment
Administration
New User Info.
Training
Tools & Utils
Programming
C++ Standard
SRT, AFS, CVS
QA and QC
Remedy
LIGHT
Histogramming
Online SW
Dataflow
Detector Control
Evt Processing
Prompt Reco.
Run Control
Calibration
Databases
Offline
Workbook
Simulation
Reconstruction
Beta & Tutorial
Beta Tools
Event display
Code releases
Databases
Unwrap page!
Subscribe to page
Powered by NetMind

STATES AND ACTIONS OF RUN CONTROL PROXIES

The list of States and Actions for each proxy define the state model that the proxy presents to the central run control and specify the interface between the two.

Database Proxy

Process name = database
Object name = <partition>::DATABASE

Provides interface for all database interaction, both information retrieval and logging, whether or not a real database is used. A separate proxy is required for each partition. By default the Objectivity configuration and conditions databases are accessed, a flat file fall back is provided by the database_noobbjy proxy.

States and Actions:

state   action
ERROR
        RESET
READY
        SET_RUN_NUMBER (run_number)
        GET_RUN_NUMBER 
        GET_CONFIGURATION_KEY (run_type)
        GET_CRATE_MASK (run_type)
        LOG_CONFIGURE (runtype, pname, pnumber, key, crate_mask, trigger_mask)
        LOG_UNCONFIGURE (runtype, pname, pnumber, key, crate_mask, trigger_mask)
        LOG_BEGIN (run_number, partition_number, runtype, pname, key, trigger_mask, crate_mask, logging)
        LOG_END (run_number, partition_number, runtype, pname, key, trigger_mask, crate_mask, logging)
	REFRESH 
        SHUTDOWN
PROXY_DEAD

Action details:

SET_RUN_NUMBER (run_number)

This action is no longer supported and doea nothing. It will be removed.

GET_RUN_NUMBER

Sets the object parameter DB_RUN_NUMBER to the next valid run number. The last run number is read either from a file (default, file name = RUNNUMBER) or from Objectivity and incremented by 1. The new number is then stored.

GET_CONFIGURATION_KEY (run_type)

Sets the object parameter DB_KEY to the current valid key for the given run type. The key <-> runtype mapping is either read from a file (default, file name = Orc/runtype.dat) or from Objectivity (takes most recent valid TopMap from the configuration database).

LOG_CONFIGURE (runtype, partition_name, partition_number, key, crate_mask, trigger_mask)

Logs the given information to cout and to the database as a configure record (OrcConfigRecordP in Objectivity).

LOG_UNCONFIGURE (runtype, partition_name, partition_number, key, crate_mask, trigger_mask)

Logs the given information to cout and to the database as a configure record (OrcConfigRecordP in Objectivity). The information should agree with that for the configure record, otherwise a warning is issued (but the information is still logged).

LOG_BEGIN (runnumber, partition_number, runtype, partition_name)

Logs the given information to cout and to the database (OrcRunRecordP in Objectivity).

LOG_END (runnumber, partition_number, runtype, partition_name)

Logs the given information to cout and to the database (OrcRunRecordP in Objectivity).

LOG_END (runnumber, pnumber, runtype, pname)

Logs the given information to cout (OrcRunRecordP in Objectivity). The information should agree with that for the corresponding BEGIN, otherwise an warning is issued (the information is still logged).

SHUTDOWN

Terminates unix process.

Dataflow Proxy

Process name = dataflow
SMI Object name = <partition>::DATAFLOW

Provides interface for all dataflow interaction for a given partition. This process contains the actual odfPartition, odfPlatform and odfManager objects for the given partition.

States and Actions:

state action
STARTINGUP
        SHUTDOWN
HALTED
        RESET
        SHUTDOWN
STANDBY
        ALLOCATE (crate_mask)
        SHUTDOWN
ALLOCATED
        MAP
	DEALLOCATE
	REBOOT
	SHUTDOWN
	UPDATE_CRATE_MASK (crate_mask)
PARTITIONED
        CONFIGURE (environment, triggers, runtype)
        UNMAP
        REBOOT
        SHUTDOWN
CONFIGURED
        BEGIN (runnumber)
        UNCONFIGURE
        REBOOT
        SHUTDOWN
        SYNCH
RUNNING
        END_RUNNING
        PAUSE
        REBOOT
        SHUTDOWN
PAUSED
        RESUME
        REBOOT
        SHUTDOWN
REBOOTING
        GOTO_STANDBY
        SHUTDOWN
ERROR_CRATES  (failed to partition requested crates)
        RESET
ERROR_MAP
        REBOOT
        SHUTDOWN
        RESET
ERROR_CONFIGINFO (failed to find/load the required calCycle file)
        RESET
        REBOOT
        SHUTDOWN
ERROR_TIMEOUT (transition timed out)
        RESET
ERROR_ (damage occurred on this transition)
        REBOOT
	SHUTDOWN
NOT_THERE

Action details:

RESET

Sets the state of the proxy to the previous state. This is usually sent by run control after a transition timed out and the proxy is returned to the state prior to the attempt. The transition can then be retried etc.

REBOOT

Reboots the crates in the allocated partition, if there is one.

SHUTDOWN

Dissolves the dataflow partition and exits.

MAP

Sends map(0) to dataflow partition.

UPDATE_CRATE_MASK (crate_mask)

Change the default crate mask, taken from database, to the specified one.

CONFIGURE (environment, triggers, runtype)

If environment=0, reads the file Orc/runtype.dat to determine the correct configuration key for the given run type. If environment!=0 then this is used as the configuration key. The cofiguration key is then used to look up the appropriate CalCycleTC file (OrcXXXXXXXX.dat, where XXXXXXXXX is the hex. key value). If the CalCycleTC file is opened successfully, the the configure transition, configure(key,triggers) is sent tot the dataflow partition. A trigger mask of 0 defines the ensuing runs as calibration runs. The CalCyleTC file contains the required set of datflow transitions which must be driven after a BEGIN command (see below).

UNMAP

Sends unmap(0) to dataflow partition.

BEGIN (runnumber)

Resets the current position in the CalCycleTC hierarchy to the top and sends begin(runnumber) to the dataflow partition. Completed dataflow transitions now automatically trigger further ones as specified in the CalCycleTC file specified on the CONFIGURE transition. In a calibration sequence (trigger this will continue until the calibration is complete and the dataflow partition has been cycled all the way through to CONFIGURED again. For non calibration runs the dataflow will generally be cycled through to ENABLED. Receipt of a DISABLE (from an END_RUNNING command will then initiate sequencing out to CONFIGURED. All the dataflow states within the RUNNING state (meta, major, minor and enable cycles) are hidden from Run Control.

UNCONFIGURE

Send command unconfigure(0) to the dataflow partition.

END_RUNNING

Sets an internal flag so that all outstanding calibration cycles will be skipped and the partition will step normally out to CONFIGURED. If in a non calibration run a diable is generated with disable(0) taking run.

PAUSE

Sends pause(0) to dataflow partition.

RESUME

Sends resume(0) to dataflow partition.

ALLOCATE (crate_mask)

The dataflow partition and manager objects are instantiated and the dataflow partition is created, using the given crate mask.

DEALLOCATE

Dataflow partition is released, freeing the dataflow crates.

Detector Controls Proxy

Process name = <various>
SMI Object name = <various - follows ODC naming conventions>

Several detector control proxies exist, one for each detector controls "component". Each proxy has its own Domain and can be allocated to (controlled by) up to 1 run control partition. The detector controls proxies run independently of the Run Control, providing monitoring and logging services for the detector controls. When allocated to a Run Control these proxies provide the interface through which the detector component may be synchronised (e.g. downloading of set points etc.)

States and Actions:

state action
ERROR
        CLEAR
READY
        CONFIGURE (key)
        BEGIN_RUN (key)
CONFIG_LOCKED
        END_RUN (key)
        NOT_THERE

Action details:

CONFIGURE (key)

Initiates downloading of all confguration/setpoint data for the proxy concerned. Any required data/values are retrieved from the database using the given key.

BEGIN_RUN (key)

Warns the proxy that a run is beginning. The key is used to check that the detector component has been correctly configured. By default this will simply be a check that this key is the same as that in the most recent CONFIGURE transition. Configuration data may now not be modified until the run has ended.

END_RUN (key)

Denotes end of run and unlocks the configuration data in the proxy so that it can be modified. The key is used as a consistency check with the most recent BEGIN_RUN.

OEPL3 Proxy

Process name = <OepML3ScriptProxy>
SMI Object name = <OEPL3>
Interface to OEP system. For details check with OEP group.

Logbook Proxy

Process name = <logbook>
SMI Object name = <LOGBOOK>

Interfaces to the Oracle electronic log book to log information at the beginning and end of runs. If this proxy is absent, the run control will continue as normal (but nothing will get logged into oracle).

state action
ERROR
        RESET
READY
        LOG_BEGIN_RUN (run_number, crate_mask, key, trigger_mask)
        LOG_END_RUN (run_number)

Action Details

RESET(key)

Forces proxy state to READY.

LOG_BEGIN_RUN (run_number, crate_mask, key, trigger_mask)

Logs to specified information to oracle along with other start of run info. determined independently by the proxy itself.

LOG_END_RUN (run_number)

Logs to specified information to oracle along with other start of run info. determined independently by the proxy itself (e.g. events recorded).

Marker Proxy

Process name = <marker>
SMI Object name = <MARKER>

This proxy watches the output (XTC) file size and the run duration. If either the file size or the run length exceed predetermined limits (currently 20GB and 3 hours) then this proxy requests that the current run be stopped and a new one started (called inserting a marker).

state action
ERROR
        RESET
READY
        START (runnumber)
RUNNING
        STOP
        RESET
MARKER_REQUEST
        MARKER_SENT

Action Details

RESET(key)

START

Start the proxy monitoring the time and file size for the current run. When a marker (stop/start run) is requested, the proxy goes to state MARKER_REQUEST.

STOP

Tells the proxy to stop monitoring, until told to START again.

MARKER_SENT

Informs the proxy that the marker was sent successfully. Currently the proxy simply goes directly to RUNNING.

Monitor Proxy

Process name = <monitor>
SMI Object name = <MONITOR>
This proxy interfaces to the Odf dead time monitoring; principally so that dead time can accurately be counted during the live time of the run.
state action
READY
        START (crate_mask)
RUNNING
        STOP
        START (crate_mask)
        CHANGE_UPDATE_RATE (period)
ERROR
        RESET

Action Details

RESET(key)

Clear error and reset proxy to READY

START

Start the odf dead time monitoring with a predetermined update frequency.

CHANGE_UPDATE_RATE (period)

Changes the update frquency of the odf deadtime monitoring to <period> seconds.

STOP

Stop the current odf dead time monitoring.

Messenger Proxy

Process name = <messenger>
SMI Object name = <MESSENGER>

This proxy controls the audio alarm voice synthesizer and allows run control to send voice alarms. The proxy manages its own list of messages, read in from a file and specified by numbers. All communication with run control uses the message numbers.

state action
READY
        MESSAGE (message)
        REPEAT_MESSAGE

Action Details

MESSAGE(message)

Send the predefined message number to the voice sythesizer.

REPEAT_MESSAGE

Guess !

ShellCmd Proxy

Process name = <shellCmd>
SMI Object name = <SHELLCMD>

Provides a limited interface between the run control and the local operating system, allowing execution of some OS commands.

state action
READY
        EXECUTE (command, parameter)

Action Details

EXECUTE (command, parameter)

Execute the specified command with the given arguments.

Code_archiver Proxy

Process name = <codeArchiver>
SMI Object name = <CODEARCHIVER>

Used to archive a snapshot of all the binary and package versions currently being used in the online system.

state action
ERROR
        RESET
READY
        ARCHIVE (run_number)

Action Details

ARCHIVE (run_number)

Archive the contents of the production release to a tar file; Run<runnumber>.tar.gz.