Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 M. Bellato (INFN – Padova) L. Berti (INFN – Legnaro) D. Ceccato.

Similar presentations


Presentation on theme: "Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 M. Bellato (INFN – Padova) L. Berti (INFN – Legnaro) D. Ceccato."— Presentation transcript:

1 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 M. Bellato (INFN – Padova) L. Berti (INFN – Legnaro) D. Ceccato (INFN – Legnaro) M. Gulmini (INFN – Legnaro) G. Maron (INFN - Legnaro) N. Toniolo (INFN – Legnaro) G. Vedovato (INFN – Legnaro) S. Ventura (INFN – Padova) X.Q. Yang (INFN – Legnaro) Java Based Run Control for CMS Small DAQ Systems Abstract #305

2 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 CMS small DAQ systems CMS small DAQs use the CMS DAQ model (RU, EB, BU, RCN) with components scaled down (performances and/or size) according to the needs. Hardware and software components may differ on each small DAQ, so that PLATFORM and OPERATING SYSTEM independence are an important requirement for a Run Control System. CMS small DAQs use the CMS DAQ model (RU, EB, BU, RCN) with components scaled down (performances and/or size) according to the needs. Hardware and software components may differ on each small DAQ, so that PLATFORM and OPERATING SYSTEM independence are an important requirement for a Run Control System. RU BUBU BUBU Level 1 Trigger Event Manager Detector Frontend Event Builder Controls Readout Builder Units Computing Services

3 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 Java Run Control System achieves PLATFORM (SPARC, Pentium, PowerPC) and OPERATING SYSTEM (Solaris, Linux, vxWorks) independence using extensively CORBA and Java. Web based techniques have been used to provide a Web Graphical User Interface. Java Run Control System (JRCS) Objective : Provide an easy to customize Run Control framework for CMS small DAQs (and for small DAQs in general).

4 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 CORBA and JAVA CORBA (Common Object Request Broker Architecture): distributed object framework proposed by the Object Management Group (OMG), that allows transparent invocation of object methods on a network. supports several programming languages, including Java and C++. Evaluated CORBA implementations: – Orbix (C++ and Java) – Visibroker (C++ and Java) – TAO (C++) – JDK 1.2 (Java) JAVA provides platform and operating systems independence executing code on a Java Virtual Machine (JVM). Java Virtual Machines are freely available for almost all platforms. Java is a really powerful OO programming language; embedded multithreading, high level communication protocols support (CORBA, RMI, sockets,...), native C/C++ interface (JNI), and Web support (applets, swing classes) are only some features.

5 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 JRCS Overview Configuration Manager GUI Job Manager Information Manager CORBA Communication Backbone Root Component Manager DAQ Component Manager DAQ Component Manager DAQ Component Manager DAQ Component CORBA TCP, IPC, pthreads... CORBA Name Server

6 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 Component Manager (I) User Interface Root Manager Component Manager DAQ Component Manager DAQ Component Manager DAQ Component Experiment Control Event Builder Event Filter Managers ReadOut FilterUnit Managers ReadOut FilterUnit Tasks CHSM Theoretically rigorous language system used for implementing Concurrent, Hierarchical, finite State Machine (Harel’s state chart) Outputs C++ code Developed and written by Paul J. Lucas and Fabio Riccati Run control system for Chorus has been written with CHSM by Fabio Riccati ATLAS Run control system is based on CHSM Component Managers are organized as a tree, where the leaves are directly connected to the DAQ Component to control. The user interacts with the system using a GUI that sends commands to the Root Manager. Component Managers are based on the Harel’s State Charts (CHSM package). The Finite State Machines are the same for all the Component Managers. Component Managers are organized as a tree, where the leaves are directly connected to the DAQ Component to control. The user interacts with the system using a GUI that sends commands to the Root Manager. Component Managers are based on the Harel’s State Charts (CHSM package). The Finite State Machines are the same for all the Component Managers.

7 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 Component Manager software layers Two Finite State Machines have been implemented. A ‘Communication FSM’ manages the communications between Component Managers. A ‘Component FSM’ manages the DAQ Component behaviour; the actions associated to a state transition have to be customized depending on the DAQ Component to control, overriding one C++ class methods (State Transition Implementation). Two Finite State Machines have been implemented. A ‘Communication FSM’ manages the communications between Component Managers. A ‘Component FSM’ manages the DAQ Component behaviour; the actions associated to a state transition have to be customized depending on the DAQ Component to control, overriding one C++ class methods (State Transition Implementation). C++ / Java Interface Server / Client Java Native Interface Server / Client Implementation CORBA Java Virtual Machine Java State Transition Interface Component Finite State Machine State Transition Implementation (User code) CHSM C++ Communication Finite State Machine C++ Component Manager software layers

8 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 class CmpTaskBase { public:... virtual bool enterAction() {} virtual bool exitAction() {} virtual void configAction() {} virtual void abortAction() {} virtual void startAction() {} virtual void stopAction() {} virtual void pauseAction() {} virtual void resumeAction() {} virtual void resetAction() {}... }; #include "tcp_server.h" #include "tcp_client.h" #include "CmpTaskBase.h“ class CmpTaskImpl : public CHSM_set, public CmpTaskBase { public: CmpTaskImpl(CHSM_SET_ARGS): CHSM_set(CHSM_SET_INIT), CmpTaskBase() {} bool enterAction() {...} bool exitAction() {...} void configAction(){sendCmdToTask(CTF_CONFIG);} void abortAction() {sendCmdToTask(CTF_ABORT);} void startAction(){sendCmdToTask(CTF_START);} void stopAction(){sendCmdToTask(CTF_STOP);} void resetAction(){sendCmdToTask(CTF_RESET);}... private: voidsendCmdToTask(int cmd) {...};... }; State Transition Interface State Transition Implementation (User code)

9 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 Auxiliary services Configuration Manager:  Component managers’ tree structure  Component Managers configuration  DAQ component setup and configuration Actually on flat files; integration with a DBMS planned Job Manager:  Launches, kills and monitors JRCS servers and DAQ components Information Manager:  Handles status information of the several components  Manages Log and Error Messages  Message dispatcher; error, log and status messages are sent to the subscribed clients (for instance a GUI); messages can be synchronous (consequence of a control command) or asynchronous (for instance the crash of a DAQ component)

10 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 User Interface (I) Web based Graphical User Interface Several approaches have been investigated Servlet approach (at the very beginning):  All the functionalities are embedded in a Web Server; problematic Applet approach :  a CORBA applet has been developed; it manages all the CORBA client code providing a nice API to the GUI developer  Graphical part can be made using Java swing classes; many integrated development tools are available. Applet GUI (swing) APPLET ( Link ) CORBA JRCS Applet approach

11 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 User Interface (II) Web based Graphical User Interface Dynamic HTML approach :  The communication ‘CORBA applet’ is used  Graphical part is done using HTML and Javascript  A Javascript wrapper providing an API to the JRCS has been implemented  The Java/Javascript interface is provided by LiveConnect, a javascript interpreter provided with modern browsers  The graphical development is quite difficult, no very good development tools found HTML ( Static GUI ) JAVASCRIPT ( Dynamic GUI ) APPLET ( Link ) LiveConnect CORBA JRCS Dynamic HTML approach

12 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 User Interface (III) Other approaches are suitable: GUI as CORBA application (Java, C++) Character user interface (command scripts)  JAVASCRIPT!!! (see next slide) Java application

13 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 Command Sequencer function sendCommand(cmd) { document.JSWrapper.sendCommand(cmd, Params); } function wait(sec) { document.JSWrapper.wait(sec); } function userScript() { sendCommand (BOOT,””); sendCommand (CONFIG,””); sendCommand (START,”FileOutput=DATA&Run=5”); wait (600); sendCommand (STOP,””); sendCommand (RESET,””); sendCommand (SHUTDOWN,””); } Using Javascript the final user can write sequences of control commands Netscape/IE/Rhino Javascript Interpreter JavaScript Library HTML/JavaScript/Swing (User Code) Java - CORBA Netscape/IE/JRE JVM UI software layers

14 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 GUI

15 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 Conclusions Java is a really powerful programming language: main troubles with JNI Integration with CORBA makes the system really platform and OS independent JRCS is suitable to control DAQs with up to few tens of components due to overheads introduced by CORBA. Web based techniques are suitable to implement GUIs; by our experience the applet approach is actually to prefer to the dynamic HTML approach. JRCS was tested the first time on a real environment on July ’99 for the CMS muon chamber testbeam DAQ (see talk B315) Future: Work is still in progress... JRCS will be integrated with other DAQs: CMS muon chamber DAQ in Legnaro CMS muon chamber testbeam DAQ ( CERN – July 2000) CMS RPC (INFN-Bari) ?? Other experiments in Legnaro (PRISMA,...)

16 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 M. Bellato (INFN – Padova) L. Berti (INFN – Legnaro) D. Ceccato (INFN – Legnaro) M. Gulmini (INFN – Legnaro) G. Maron (INFN - Legnaro) N. Toniolo (INFN – Legnaro) G. Vedovato (INFN – Legnaro) S. Ventura (INFN – Padova) X.Q. Yang (INFN – Legnaro) Java Based Run Control for CMS Small DAQ Systems Abstract #305

17 Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 Error Detection and Recovery Error detection and recovery procedures have been implemented The Information Manager is the core of the ‘Error Detection System’ since it handles the status information of the several components; Every server can be started and killed independently to the others. Each server checks periodically its CORBA connections; when a connection problem is detected an automatic reconnection procedure starts; Error recovery actions can be done by the GUI DAQ dependent automatic error recovery procedures have to be implemented according to the needs (the ‘command sequencer’ feature helps!!);


Download ppt "Java Based Run Control for CMS Small DAQ Systems Michele Gulmini CHEP2000 February 2000 M. Bellato (INFN – Padova) L. Berti (INFN – Legnaro) D. Ceccato."

Similar presentations


Ads by Google