Title: Interactive Framework Status
1Interactive Framework Status
2Interactive Framework
- Multithreaded option
- Single threaded with callbacks option
- CORBA?
- GUI and event processing can be distributed
3Use of Threads
- Framework runs in main thread
- User interactive components in separate thread
- Algorithms not required to be multithreaded
4Parts Needed
- Main program object
- iframework.o
- Framework related libraries
- libframework.a
- libiframework.a
- libio_packages.a
- libevpack.a
- libd0om.a
- ... Analyze package has a full list (it might
have more than required)
- Package libraries
- libemreco.a
- libcpsreco.a
- one required for each package you use
- Package registration objects
- RegEMReco.o
- RegCPSReco.o
- one required for each package you use
5Example User Algorithm Class Definition
Class Algorithm public Package, Process, Tag,
RunInit public UserPackage(Context) UserPa
ckage() Result processEvent(edmEvent) Resul
t tagEvent(edmEvent) Result runInit(const
RunNumber) void reinitialize(edmRCP) void
statusReport() void flush()
.cc FWK_REGISTRY_IMPL(Algorithm,"Name
") Reg.cc FWK_REGISTRY_DECL(Algorithm)
6Using the Framework Package
- Implement the following in your package
- statusReport( )
- Report summary of state (statistics) to cout
- reinitialize(RCP r)
- this should call setParameters(r), probably
should clear histograms, etc. - flush( )
- Flush any buffers your package contains
(histograms, log streams, etc.)
7Interactive Use
- Link with proper framework object file
- iframework.o, multithreaded console app
- sframework.o, single threaded console app
- Run with the -i option
- Better user interface will be available in the
future - Framework allows for user interfaces to be
plugged in.
8Using the Commands
- options - specify framework RCP file
- show - list the available packages
- init - construct packages using RCP info
- config - show the package instances and their
order along with the hooks they implement - stop - destroy all packages and go to pre-init
stage - quit - exit the process
9Using the Commands
- start - begin event processing
- pause - pause after current executing package.
- step - execute next package hook
- next - process until next event, then pause
- where - print the package/hook and event/run that
is executing - resume - continue event processing
10Using the Commands
- rcp - print the RCP information for a given
package instance - report - call the statusReport() method of the
given package instance - state - deactivate/activate package instances
- time - print the time used by each of the package
instances
11Please
- Stop putting Flow/Interfaces parameters into your
framework RCP files unless you are really using
them. They are not used. - Stop creating packages with unnecessary framework
methods that have been obsolete for years. - Put good version strings into the registry macros
(most everyone does this).
12Where Do We Go From Here?
- Interactive framework has been a low priority
item. - When is more functionality needed?
- Current commands are limited, what additional
functionality is required to make it useful.
13Future Plans
- Histogram management facility
- Framework runs as a server
- advertises the framework control services
- packages can advertise additional services
- User application connects as a client
- can locate the process and services using the
nameserver - can register that it wants output and error
notification
14Algorithm View
15Interactive View
16Future Plans
Java or Python GUI
Framework
Pause Resume Stop Start Step Next
Main Thread
Event loop
Packages
x y z
Output Window
Controller
Error Window
Messenger
Commander
Comm Thread
ORB
Network
17ltltCreatesgtgt
makeCommander makeMessenger
ltltCreatesgtgt
Terminal
CORBA
Root
ltltCreatesgtgt
ltltCreatesgtgt
18Interactive Components
- Threaded model
- No built in interpreter or GUI
- Commander Abstraction
- configure algorithms and control event loop
- get reports from algorithms
- Messenger Abstraction
- catch and propagate errors and output to
registered clients - ORB
- manage client/server communications and remote
framework interactions