Home

DABC User Manual - SubVersion

image

Contents

1. e 14 3 4 Package and library organisation eee eee ee eee ees 14 3 4 1 EBEN fe ik ws ere ae a A Bo Se A a a a a a a 14 3 4 2 Control and configuration system o e ee 14 3 4 3 Plug in packages oeie agoe mdi a aiia a a a a i e ee eee 14 Sas A IE 15 4 CONTENTS 3432 Transp rt packages coco lord seis a a 15 3 4 4 Applicaton packages za 2 2248 e448 ara aa aa 16 3 4 5 DSO COMES sui a A da a a 16 4 DABC User Manual Setup 17 4 1 Installing DABC ooo ran era a ed ba ee 17 4 2 Set up the DABC environment 0 045 Er ee ee eee a 18 d3 DABC souple ied ne A See ae a we ay a 19 4 3 1 SCUpIMeCk ate co awe a Sa ka ba he ee AA Ba wae Parka eS 19 4 3 2 Base RINE do ee Se Ae hae ear ee 19 4 3 3 COM as at we Sek ee oe the SRS a eh SO ee ee Ge the a 19 4 3 4 Run GRAMS lt lt ok aoe ak ar ald woe wi a w add aie nl 20 4 3 5 o A a ep ak aa we a Ge eae aa wre 20 4 3 6 Delault values o 22 5 22 ee how a RE we he re wd 21 4 4 Installation of additional plug ins o ee ee ee 22 4 4 1 Add plug in packages to DABCOSYS 2 2 ooo ee 22 4 4 2 Plug in packages in user directory 2 2 2 22 nenn sn air nein nn 23 5 DABC User Manual GUI 25 Sl QUT di AAN 25 52 GUIP ocios se e re ee Ee ew E oe owe pi 25 32 Maia DABC GUI buttons eo c e ed ta che Be Gee eae ed ed ea deed 26 3 22 DABE controlpanel cose uw a a oe a es ee 27 Siac DABE controller DOUCHE oie s acess a doe Ba ir 28 B
2. The standard part builds a set of panels windows according the parameters the DIM servers offer Only services from one single DIM name server node name specified as shell variable DIM_DNS_ NODE defining a name space can be processed See page for preparations The GUI needs no file access to the DABC working directory However user must have ssh or rsh access to the DABC or MBS master node Currently the GUI must run under the same account as the DABC In monitoring mode no commands the GUI may run under different account Master node must have remote access to all worker nodes The user s ssh settings must enable remote access without prompts The layout of the GUI can be adjusted to individual needs It is strongly recommended to save these settings to see the same layout after a restart of the GUI The GUI can be restarted any time DABC and MBS systems continue without GUI 5 2 GUI Panels DABC Controls and Monitoring Bratt Figure 5 1 Main toolbar buttons Fig 5 1 page 25 shows the main menu of DABC minimal view The GUI as it comes up is divided 25 26 DABC User Manual GUI in three major parts one sees on top a toolbar with icon buttons Most of these open other windows The dark line at the bottom shows a list of active DIM servers The other windows are placed in the white middle pane The functions of the buttons and the invoked panels is described in the next sections Depending on the a
3. Another possibility to set default value for some parameters create parameter with the same name in parent object Here word create is crutial one should use CreateParInt method in module constructor 1t is not enough just put additional tag in xml file For instance one can create parameter MbsServerPort in generator module and than MBS server transport created for output port will use that value for as default server port number 4 4 Installation of additional plug ins Apart from the DABC base package there may be additional plug in packages for specific use cases Generally these plug in packages may consist of a plugins part and an applications part The plugins part offers a library containing new components like Devices Transports or Modules The appli cations part mostly contains the XML setup files to use these new components in the DABC runtime environment however it may contain an additonal library defining the DABC Application class As an example we may consider a plug in package for reading out data from specific PCIe hardware like the Active Buffer Board ABB 3 This package is separately available for download at http dabc gsi de and described in detail in chapter of the DABC programmer s manual There are principally two different ways to install such separate plug in packages Either within the general DABCSYS directory as part of the central DABC installation as described in following section 4 4 1 Or
4. fx TriggerCount Trigger counts for the individual triggers 01 15 x Trigger0lCount F Node XXX uppercase EXXX EventRate 10000 FXXX DataRateKb 16000 FXXX FileOpen XXX FileFilled 100 XXX SpillOn XXX EventTrend 10000 XXX DataTrendKb 16000 XXX TriggerMode 42 DABC User Manual MBS GUI Chapter 7 DABC User Manual DABC Application MBS user user app mbs tex 7 1 Simple MBS data server with DABC The use case here is that a single DABC node should provide data in the MBS event format on a server socket to be used by external analyisis and monitoring programs like Go4 1 The event data can be simulated by a generator module or in most practical cases it is the result of a data readout from one or several hardware devices For the random event generator such set up looks like this lt xml version 1 0 gt lt dabc version 1 gt lt Context host 1xi009 name Server gt lt Run gt lt lib value libDabcMbs so gt lt func value InitMbsGenerator gt lt Run gt lt Module name Generator gt lt NumSubevents value 3 gt lt FirstProcId value 77 gt lt SubeventSize value 128 gt lt Go4Random value false gt lt BufferSize value 16384 gt lt Port name Output gt lt OutputQueueSize value 5 gt lt MbsServerKind value Stream gt lt MbsServerPort value 6006 gt lt Port gt lt Module gt lt Context gt
5. lt dabc gt There is only one lt Context gt node specified by the nodename with one simple C function InitMbsGenerator to run and with one lt Module gt that produces the event data as specified in its parameters The data server is specified by parameters of the Output lt Port gt The tag lt MbsServerKind gt can be Stream or Transport to emulate either variant of the standard MBS server sockets A complete description of this example can be found 43 44 DABC User Manual DABC Application MBS in section page of the DABC programmer s manual The setup files for standard MBS use cases can be found in directory SDABCSYS applications mbs A more practical use case is to prepare data as MBS events that was read by DABC from external front end hardware This is shown with the setup file for the readout controller ROC example see the full description of this example in chapter page lt xml version 1 0 gt lt dabc version 1 gt lt Context name Readout gt lt Run gt lt lib value libDabcMbs so gt lt lib value libDabcKnut so gt lt logfile value Readout log gt lt Run gt lt Application class roc Readout gt lt DoCalibr value 0 gt lt NumRocs value 3 gt RocIpO value cbmtest01 gt RocIpl value cbmtest02 gt RocIp2 value cbmtest04 gt BufferSize value 65536 gt NumBuffers value 100 gt TransportWindow
6. ts Shut down all Execute script prmshut down sc at master node After 2 seconds trigger the main Update 6 Show acquisition Output in log panel g Shell script executes command on master node 6 1 3 MBS command panel Commands C MbsTransport o 3 CloseFile gt C ConnectRfio C DisableTcp Command OpenFile scope MBS name C OPT tape L OPT sizemb L OPT C DisconnectRfio number L OPT C DismountTape first L OPT E EnableDabc inhead C OPT y a EnableTcp outhead C OPT gt 3 InitTape gt 3 MountTape auto L gt 3 OpenFile prompt _ c SetFileheader edit _ 23 ShowFile disk I gt C ShowTape rfio O gt CI TypeEvent noi o C Typestream gt C Mbsutil first L gt 3 MbsYme_serv Figure 6 2 Command panel Fig 6 2 page 37 shows on the left side the command tree Double click or RETURN on a command executes the command The top tree level is the executing MBS task below that are the commands and the master node prompter node is the only node below each command However command is sent to the prompter node but executed on the current node which is displayed in the info panel see Fig 6 4 page 38 Click on a command opens at the right side the argument panel Entering argument values and RETURN executes the command Only the MBS commands of the running tasks are shown Fig 6
7. On the left side in Fig 5 10 page 33 the Settings menu is shown It affects all items in the panel One can Zoom toggle between large and normal view change the number of columns change the display mode toggle Autoscale and set limits applied to all meters Besides that each individual item can be adjusted by right mouse button The context menu is shown on the right All changes done individually are changing the defaults The global changes can be overwritten by these defaults All settings are saved with the setup and restored on GUI startup see 5 3 page 34 5 2 8 3 Histograms Histogram panels are handled in pretty much the same way as the rate meters All histograms are displayed in the histogram panel Fig 5 11 page 33 Histograms can have arbitrary size set in Layout menu 5 2 8 4 Information Information records mainly display one line of text with a color see Fig 5 12 page 33 5 2 GUI Panels 33 RateMeters Zoom X86 7 MSG EventRate Columns gt Limits Defaults i ee 0 100 0 el RateMeters ou DI Settings 86 7 MSG X86 7 MSG MSG DataRateKb KB s Meter Statistics Trend set utoscale setLog Limits Clear Colors gt Large Figure 5 10 Steering menus a Histograms Layout 5 2 8 5 Logging window Fig 5 13 page 34 show the logging window Figure 5 12 Info 34 DABC User Manual GUI Log
8. The disadvantage of such approach is that one must expand the XML file to set each queue length explicitely from the appropriate variable so in case of a big number of ports the file will be very long and confusing to the user Another possibility to set several parameters at once consists in wildcard rules using or symbols These can be defined in a lt Defaults gt node lt xml version 1 0 gt lt dabc version 1 gt lt Variables gt lt myname value Generator gt lt myport value 6010 gt lt Variables gt lt Context name Mgr myname gt lt Run gt lt lib value libDabcMbs so gt lt func value InitMbsGenerator gt lt Run gt lt Module name myname gt lt SubeventSize value 32 gt lt Port name Output gt lt MbsServerPort value myport gt lt Port gt lt Module gt lt Context gt lt Defaults gt lt Module name x gt 22 DABC User Manual Setup lt Port name 0utputx gt lt OutputQueueSize value 5 gt lt Port gt lt Module gt lt Defaults gt lt dabc gt In this example for all ports which names begin with the string Output and which belong to any module the output queue length will be 5 A wildcard rule of this form will be applied for all contexts of the configuration file i e by such rule we set the output queue length for all modules on all nodes This allows to configure a big multi node cluster with a compact XML file
9. 3 page 38 shows that only dispatcher and prompter are up and therefore only their commands are seen Fig 6 4 page 38 shows in addition the commands of util and transport after configuration 6 2 MBS DIM parameters 6 2 1 MBS states Acquisition State Running Stopped 38 DABC User Manual MBS GUI X86G 4 Prompt Msg_log Dispatch 3 MbsDispatch o gt 3 MbsPrompt Se Soa Bd Command ConnectDispatcher scope nodel C OPT all T o C MbsDispatch o C MbsPrompt o C MbsRirec C MbsTranspon o 3 Mbsutil cal bd Command CloseFile scope MBS tape L OPT Figure 6 4 Info and command panel 6 2 MBS DIM parameters 39 BuildingMode State Delayed Immediate EventBuilding State Working Suspended FileOpen State File open File closed RunMode State DABC connected MBS to DABC Transport client MBS standalone SpillOn State Spill ON Spill OFF TriggerMode State Master Slave 6 2 2 MBS rates MSG DataRateKb KByte s MSG DataTrendKb KBytes s as trend MSG EventRate Events s MSG EventTrend Events s as trend MSG EvSizeRateB Event size sample in bytes MSG EvSizeTrendB Event size sample in bytes MSG StreamRateKb Stream server Kbyte s MSG StreamTrendKb Stream server Kbyte s as trend MSG FileFilled File filled in percent MSG StreamsFull Number of full streams in percent MSG TriggerRate Trigger s of readout tasks MS
10. Edit the DIM_DNS_NODE environment according to the machine where the DIM name server 2 for the DABC control system will run export DIM_DNS_NODE hostname domain de e Copy the script to a location in your global PATH for later login e g usr bin Alterna tively you may set an alias to the full pathname of dabclogin sh in your shell profile 3 Execute the just modified login script in your shell to set the environment dabclogin sh This will set the environment for the compilation 4 Change to the DABC installation directory and start the build cd DABCSYS make 17 18 DABC User Manual Setup This will compile the DABC framework and install a suitable version of DIM in a subdirectory of SDABCSYS dinm After succesful compilation the DABC framework installation is complete and can be used from any shell after invoking dabclogin sh The next sections 4 2 and 4 3 will describe further steps to set up the DABC working environment for each user 4 2 Set up the DABC environment Once the general DABC framework is installed on a system still each user must activate the environ ment and do further preparations to work with it 1 Execute the DABC login script in a linux shell to set the environment At gsi linux installation this is done by dabclogin For the user installation as described in above section 4 1 by default the script is named dabclogin sh The login script will already enable the DABC framework f
11. at an independent location in a user directory as described in section 4 4 2 4 4 1 Add plug in packages to DABCSYS This is the recommended way to install a plug in package if this package should be provided for all users of the DABC installation A typical scenario would be that an experimental group owns dedicated DAQ machines with system manager priviliges In this case the plugin package may be installed under the same account as the central DABC installation probably but not necessarily even the root account The new plug in package should be directly installed in the SDABCSYS directory then with the following steps 1 Download the plug in package tarball e g abbl tar gz 2 Call the dabclogin sh script of the DABC installation see section user env 3 Copy the downloaded tarball to the SDABCSYS directory and unpack it there cp abbl tar gz DABCSYS cd SDABCSYS tar zxvf abbl tar gz This will extract the new components into the appropriate plugins and applications folders below SDABCSYS 4 4 Installation of additional plug ins 23 4 Build the new components with the top Makefile of DABCSYS make 5 To work with the new components the configuration script s of the applications part should be copied to the personal workspace of each user see section 4 3 For the ABB example this is found at SDABCSYS applications bnet test SetupBnetIB ABB xm 4 4 2 Plug in packages in user directory This
12. is the case when DABC is installed centrally at the fileserver of an institute and several experimental groups shall use different plug ins It is also the recommended way if several users want to modify the source code of a plug in library independently without affecting the general installation The new plug in package should be installed in a user directory then with the following steps 1 Download the plug in package tarball e g abbl tar gz 2 Create a directory to contain your additional DABC plugin packages mkdir HOME mydabcpackages 3 Call the dabclogin sh script of the DABC installation see section user env 4 Copy the downloaded tarball to the SDABCSYS directory and unpack it there cp abbl tar gz SHOME mydabcpackages cd SHOME mydabcpackages tar zxvf abbl tar gz This will extract the new components into the appropriate plugins and applications folders below the working directory 5 To build the plugins part change to the appropriate package plugin directory and invoke the local Makefile e g for the ABB example cd SHOME mydabcpackages plugins abb make This will create the corresponding plug in library in a subfolder denoted by the computer architec ture e g SHOME mydabcpackages plugins abb x86_64 lib libDabcAbb so 6 For some plug ins there may be also small test executables with different Makefiles in subfolder test These can be optionally build and executed independent of the DABC runtime environ ment 7
13. methods of the manager or by submitting state change commands to the manager from GUI Some of the application states may be propagated to the active components modules device objects e g the Running or Ready state which correspond to the activity of the thread Other states like Halted or Failure do not match a component state e g in Halted state all modules are deleted and thus do not have an internal state The granularity of the control system state machine is not finer than the node application There are 5 generic states to treat all set ups 3 3 Controls and configuration 13 DoError DoHalt x DoEnable DoStart DoConfigure DoHalt DoHalt Figure 3 2 The finite state machine as defined by the manager Halted The application is not configured and not running There are no modules transports and devices existing Configured The application is mostly configured but not running Modules and devices are created Local port connections are done Remote transport connections may be not all fully connected since some connections require active negotiations between different nodes Thus the final con necting is done between Configured and Ready Ready The application is fully configured but not running modules are stopped Running The application is fully configured and running Failure This state is reached when there is an error in a state transition function Note that a run error during t
14. this panel by the buttons The table can be ordered by columns click on column header The column width can be adjusted and is saved restored by main save button see 5 3 page 34 5 2 GUI Panels 31 ES ParameterSelect ParameterList Parameter selection Full name Date Selected 15 Node X86 7 DABC X86 7 MSG DataRateKb 6553 0 Application MSG DABC X86 7 MSG DataTrendKb 6553 0 Name DABC X86 7 MSG EventRate 3192 0 Check full DABC X86 7 MSG EventTrend 3192 0 Check nodes DABC X86 7 MSG FileFilled 0 0 Re DABC X86 7 MSG StreamRateKb 0 0 NE DABC X86 7 MSG StreamTrendKb 0 0 DABC X86 7 MSG StreamsFull 0 0 DABC X86G 4 MSG DataRateKb 14924 0 DABC X86G 4 MSG DataTrendKb 14924 0 DABC X86G 4 MSG EventRate 7295 0 Infos DABC X86G 4 MSG EventTrend 7295 0 p 4 pamRatekKh 00 a z Ab Dir VI ail Es SE Below only Rates States Figure 5 7 Parameter selection panel and selected parameter list 5 2 7 1 Parameter selection To get a more selective view on the parameters one can specify filters in the panel shown at the left side of Fig 5 7 page 31 Text substrings for each of the four name fields can be specified as well as a selection of record types Values can be saved see 5 3 page 34 With the check boxes the filter function for each of these can de activated The parameter list at the right window in Fig 5 7 page 31 shows only the paramet
15. value 30 gt RawFile value run090 1md gt bsServerKind value Stream gt bsFileSizeLimit value 110 gt lt Application gt lt Context gt lt dabc gt A Here the parameters are defined for the lt Application gt instance roc Readout that controls the readout of 3 ROC nodes via UDP and combines the data into one MBS event by means of some internal Modules Hence there is no simple run function as above but the DABC runtime environment will call appropriate methods of the Application to configure and run the set up Note that in this case the MBS data is not only provided to a stream server as defined in lt MbsServerKind gt but is also written to a Imd list mode data file which can be specified in application parameter lt RawFile gt Both single node examples above do not require to be launched from the DABC GUI although this is possible and may be useful to monitor the data rates and actual parameters They can be started directly from a shell by calling the standard dabc_run executable with the configuration file name as argument dabc_run Readout xml This executable will load the specified libraries create the application configure it and switch the system in the Running state 7 2 MBS event building with DABC In this case one DABC node reads data from several MBS nodes via Transport socket connections and combines them into one MBS output event To run MBS front ends with DABC n
16. 010 Readout yentbuilder E 1x1014 Eventbuilder Parameter Type Curr int 123 Nxi014 workerTid int 42 X86 7 X86 7 X86 7 DataRateKb DataTrendKb EventRate EventTrend rate 1596 rate rate rate RateMeters Settings E E E E E E m E E E E E E El Logger Logging X86G 4 X86G 4 X86G 4 X860 4 gt X86G 4 X86G 4 util X86G 4 util xi0 7 io X86 7 util X86G 4 util X86G 4 util f util 1xi010 R util Dz util Name of output device util Tape label Dismounted file CLOSED util 0 000 MB written to tape 0 000 to file FH O ntbuili Ixi014 EventRate d ilde DataRa ZEZ2 2222222 a Figure 5 2 More typical full screen view GUI itself can be closed and reopened any time 5 2 1 Main DABC GUI buttons E Quit GUL Will prompt RET will quit The DABC will continue to run The GUI may be started 5 2 GUI Panels 27 anywhere again In case you saved the layout recommended see 5 3 page 34 and you start the GUI from the same directory it will look pretty much the same as you left it e Test shell script a Save settings window layout record attributes parameter selection filters Details see 5 3 page 34 Note that the content of the control panels must be saved by similar buttons in these pane
17. BC and MBS controller user s MBS shutdown procedure in prompter Prompter dispatcher and message loggers should still be running Next must be shut down or configure After two seconds trigger the main Update ts Shut down all Execute EXIT command on all DABC nodes Execute script prmshutdown sc at MBS master node After two seconds trigger the main Update 6 MBS Show acquisition Output in log panel api Shell script for MBS master node D A Shell script for DABC master node 48 DABC User Manual DABC Application MBS Chapter 8 DABC User Manual DABC Application Bnet user user app bnet tex 8 1 DABC eventbuilder network BNET The full functionality of DABC is shown in the case that the DAQ uses an event building network BNET transferring the partial data from n readout nodes to m event building nodes such that each event builder can work on the full detector data This scenario is discussed in detail in chapter page of the DABC programmer s manual Appropriate configuration files can be found at SDABCSYS applications bnet test directory An example setup file SetupBnet xml may look like this lt xml version 1 0 gt lt dabc version 1 gt lt Context host localhost name Controller 41 gt lt Run gt lt runfunc value RunTestBnet gt lt Run gt lt Application class bnet Cluster gt lt NetDevice value dabc SocketDevice gt lt Application gt lt Contex
18. Data Acquisition Backbone Core User Manual J Adamczewski Musch S Linev H G Essel GSI Darmstadt Experiment Electronics Department Produced February 26 2009 Revisions Titel DABC User Manual Document Date Editor Revision Comment DABC user 2009 01 05 Hans G Essel 1 0 0 First scetch Contents 2 DABC User Manual Overview 7 2 1 Outline of thismanval scs nee bw PRY ca aa da an dae eds 7 22 Reledse Noies s a in eg ee a Re ee ae ee Bae a 7 2 2 1 Version 1 0 0 26 February 2009 o o e ooe c ee nenn ee 7 3 DABC User Manual Introduction 9 4 AbDMEDABE nu e a eg en Bae ee 9 Soe a ac ee a a ee a ea Ba A a A a aa a a 9 32d e I o a dd E a A E A 9 3 2 1 1 Synchronous module so u a zu an tea ew ne ee ee en nn 10 3 2 1 2 Asynchronous module coo a a a eee a 10 3 2 2 DOMAIN ara ba ee aoe A Sad we Oo a Beck bare SaaS hore 10 3 2 3 Paran ibis a ka a ES aR eee eo ee Re be ee ed ek 11 3 2 4 pi AI eee ia BOR Be we Bike Gl ie OD ES SO ae oe ee ee Bw 11 3 2 5 Memory and DUES 0 22 222 a A een eo 11 3 2 6 POUR oo a sca ee ee ea A A 11 Sat LEIDO e ne eh es ae we ee RO a ee ie a ee 12 3 28 Device ee BS RESALE REA EG GA eee eS 12 3 29 POPUCHION ed be Rea ek ee o BR bee ee eS 12 33 Controls and configuration es o caat adea na bade dw ada Ce ae oe 12 3 1 Finite tale Machine ataca a a ea ae 12 3 3 2 COMAS p aii e pati ee 14 3 3 3 Configuration and monitoring
19. From left to right they startup a system configure it start data taking pause data taking stop tasks shut down At the very left we see a save button at the right a shell execution button Values are read from file DabcControl xml default may be saved restored to from other file see 5 3 page 34 lt xml version 1 0 encoding utf 8 gt lt DabcLaunch gt lt DabcMaster prompt DABC Master value node xxx de gt lt DabcName prompt DABC Name value Controller 41 gt lt DabcUserPath prompt DABC user path value myWorkDir gt DABC User Manual GUI DabcController Login Name server User name Password RET Master node Master name Servers Ixg0523 gsi de goofy Ixg0523 gsi de Controller 41 5 System path misc goofy sniff dabc User path misc goofy dabc work Setup file SetupMbs xml Script ps Control file DabcControl xml CUMAE E Fv Figure 5 3 DABC controller panel lt DabcSystemPath prompt DABC system path value dabc gt lt DabcSetup prompt DABC setup file value SetupDabc xml gt lt DabcScript prompt DABC Script value ps gt lt DabcServers prompt Number of needed DIM servers value 5 gt lt DabcLaunch gt DabcMaster Node where the master controller shall be started Can be one of the worker nodes DabcName A unique name inside DABC of the system DabcUserPath User
20. G TriggernnRate nn 01 15 Trigger s type nn of readout tasks 6 2 3 MBS infos Shown in info window MSG eFile Name of file MSG ePerform Events MBytes Events s and MBytes s MSG eSetup Name of setup file loaded PRM Current Current command execution node master node only PRM NodeList List of nodes master node only 6 2 4 MBS tasks Task list is shown in info window name slightly different Dispatch Msg_Log Read_Meb Collector Transport Event_Serv Util Read_Cam Esone_Serv Stream_Serv Histogram Prompt Rate SMI Sender Receiver Asynch_Receiver Rising Time_Order Vme_Serv 6 2 5 MBS text MSG GuiNode Node where GUI runs MSG Date Date as written in file header MSG Run Run ID as written in file header MSG Experiment Experiment as written in file header MSG User Lynx user name as written in file header MSG Platform CPU platform 40 DABC User Manual MBS GUI 6 2 6 MBS numbers MSG BufferSize MSG Buffers collected so far MSG Events collected so far MSG FileMbytes written in file MSG FlushTime MSG MBytes collected so far MSG StreamKeep MSG StreamMbytes MSG StreamScale MSG StreamSync MSG UserVal_nn nn 00 15 These values can be set in the user readout function MSG TriggernnCount nn 01 15 Trigger counts type nn of readout tasks 6 3 Working directories 6 3 1 MBS configuration of DIM Optional text file dimsetup in the MBS working directory specifies which rate meters and states shall a
21. The DABC working directory for the new plug in will be located in subfolder applications plugin name For the ABB example the application will set up a builder network with optional Active Buffer Board readouts so this is at SHOME mydabcpackages applications bnet test As in this example there may be an additional library to be build containing the actual Application class This is done by invoking the Makefile within the directory cd SHOME mydabcpackages applications bnet test make Here the application library is produced directly on top of the working directory SHOME mydabcpackages applications bnet test libBnetTest so 8 The actual locations of the newly build libraries plugins and optionally applications part has to be edited in the lt lib gt tag of the corresponding DABC setup file here Set upBnet IB ABB xm1 The default set up examples in the plug in packages assume that the library is located at SDABCSYS 1lib as it is in the alternative installation case as described in section 4 4 1 24 DABC User Manual Setup Chapter 5 DABC User Manual GUI user user gui tex 5 1 GUI Guide lines The current DABC GUL is written in Java using the DIM software as communication layer The standard part of the GUI described here may be extended by application specific parts How to add such extensions is described in the programmer s manual Typically they are started as prompter panels via buttons in the main GUI menu
22. access to the DABC working directory e g a windows PC Therefore the GUI setup files may use a different working directory containing e Data files for startup panels XML e Configuration files for GUI XML These configuration files for the GUI are described in more detail in Chapter 5 page 25 4 3 DABC setup file 19 Of course both setups for the DABC application and the GUI can be put into one working directory if the GUI has access to it 4 3 DABC setup file The setup file is an XML file in a DABC specific format which contains values for some or all configu ration parameters of the system 4 3 1 Setup file example Let s consider this simple but functional configuration file lt xml version 1 0 gt lt dabc version 1 gt lt Context host localhost name Generator gt lt Run gt lt lib value libDabcMbs so gt lt func value InitMbsGenerator gt lt Run gt lt Module name Generator gt lt Port name Output gt lt OutputQueueSize value 5 gt lt MbsServerPort value 6000 gt lt Port gt lt Module gt lt Context gt lt dabc gt This is an example XML file for an MBS generator which produces MBS events and provides them to an MBS transport server This use case is described further in section 7 1 page 43 Other examples of DABC setup files can be found in the sections 7 2 page 44 8 1 page 49 and 8 2 page 50 of this manual 4 3 2 Basic syntax A DABC confi
23. ain save button Default Selection xml DABC_GUI_LAYOUT Layout of frames Saved by main save button Default Layout xml Chapter 6 DABC User Manual MBS GUI user user gui mbs tex 6 1 MBS event building 6 1 1 MBS setup Any MBS system can be controlled by the DABC GUL It can run in two operation modes with MBS event builder or DABC event builder see 7 2 page 44 The first case means a standard MBS system To control a standard MBS nothing has to be done by the user on the MBS side The node running the GUI must get granted rsh access at least to the MBS node where the prompter shall run Note however that in the user s MBS startup file typically startup scom the m_daq_rate task must be started as last task this is probably the case already This task calculates the rates The GUI waits for this task after execution of the startup file Because MBS has no states there is no other way to know when the startup has finished Of cause the MBS itself must have been built with the DIM option since version v5 1 Central log file is written as usual Optionally one can provide a text file with specifications which parameters shall appear on screen see 6 3 1 page 40 For the standard MBS control one needs no DABC installation The GUI jar file is sufficient DIM must be installed See page for preparations 6 1 2 MBS control panel Fig 6 1 page 36 shows the panel to be used to control a standard MBS The values are r
24. ariables one can modify the example in the following way lt xml version 1 0 gt lt dabc version 1 gt lt Variables gt lt myname value Generator gt lt myport value 6010 gt lt Variables gt lt Context name Mgr myname gt lt Run gt lt lib value libDabcMbs so gt lt func value InitMbsGenerator gt lt Run gt lt Module name myname gt 4 3 DABC setup file 21 lt SubeventSize value 32 gt lt Port name 0utput gt lt OutputQueueSize value 5 gt lt MbsServerPort value myport gt lt Port gt lt Module gt lt Context gt lt dabc gt Here context name and module name are set viamyname variable and mbs server socket port is set via myport variable There are several variables which are predefined by the configuration system e DABCSYS top directory of DABC installation DABCUSERDIR user specified directory DABCWORKDIR current working directory DABCNUMNODES number of lt Context gt nodes in configuration files DABCNODEID sequence number of current lt Context gt node in configuration file Any shell environment variable is also available as variable in the configuration file to set parameter values 4 3 6 Default values There are situations when one needs to set the same value to several similar parameters for instance the same queue length for all output ports in the module One possible way is to use syntax as described above
25. artup The user specific MBS startup command procedure typically startup scom located on user path MbsShutdown The user specific MBS shutdown command procedure typically shutdown scom located on user path MbsCommand With RET an MBS command in executed on current node The shell script button executes this string as rsh command on master node MbsServers Number of nodes plus prompter This information is minimum for the GUI to know when all MBS nodes are up The GUI waits until this number of DIM servers is up and running That file can be created from within the GUI in the MBS controller panel Enter all values necessary and store them 6 1 2 1 MBS controller buttons a Save panel settings see 5 3 page 34 ES Execute script prmstartup sc at master node Starts prompter dispatchers and message loggers and waits until they are up Trigger the main Update A progress panel pops up during that time see 5 2 3 page 29 FE Execute script dimstartup sc at master node Starts dispatcher and message logger for single node MBS Trigger the main Update 8 Configure Execute user s MBS startup procedure in prompter dispatcher Trigger the main Update o Start acquisition Execute Start acquisition O Pause acquisition Execute Stop acquisition 6 2 MBS DIM parameters oO Halt acquisition Execute user s MBS shutdown procedure in prompter Prompter dispatcher and message loggers should still be running
26. ce to the control system This covers registering sending and receiving of commands registering updating unregistering of parameters error logging and global error handling The manager receives and dispatches commands to the destination modules where they are queued and eventually executed by the modules threads see section The manager has an independent manager thread used for manager commands execution parameters timeout processing and so on 3 2 5 Memory and buffers Data in memory is referred by Buffer objects Allocated memory areas are kept in MemoryPool objects In general case a buffer contains a list of references to scattered memory fragments from memory pool Typically a buffer references exactly one segment Buffers may have an empty list of references In addition buffers can be supplied with a custom headers The buffers are provided by one or several memory pools which preallocate reasonable memory from the operating system A memory pool may keep several sets each set for a different configurable memory size A new buffer may be requested from a memory pool by size Depending on the module type and mode this request may either block until an appropriate buffer is available or it may return an error value if it can not be fulfilled The delivered buffer has at least the requested size but may be larger A buffer as delivered by the memory pool is contiguous Several buffers may refer to the same fragment of mem
27. d panel The control system of DABC and or the application specific plug ins can define commands These commands are encoded as DIM services including a full description of arguments Therefore the GUI can build up at runtime a command tree and provide the proper forms for each command Commands are executed in all components of DABC The DABC naming convention for commands and parameters defines four main name fields separated by slashes 1 DIM server name space example DABC 2 Node example dabcWorker1 3 Application example Combiner 4 Name example doConfigure 30 DABC User Manual GUI T Commands Command DoEnable scope Common o C DoConfigure 9 EI DoEnable EI Controller 41 C Ixg0523 gsi de 1969 J 9 EI Eventbuilder 42 1xi013 gsi de 1971 Ixi014 gsi de 1971 gt 3 Readout 42 Figure 5 5 Command panel Example DABC dabcWorker1 Combiner doConfigure Fig 5 5 page 30 shows on the left side the command tree The tree is built from name application nodes Double click or RETURN on a treenode executes the command on all treenodes below A click on a command opens at the right side the argument panel Entering argument values and RETURN executes the command In the example shown in the figure doble click on doEnable would execute that command on three nodes Double click on Eventbuilder would execute only on two nodes 5 2 7 Parameter table DABC parameters are DIM services as
28. defines interfaces virtual methods of the special Bnet modules to implement user specific code in subclasses The Bnet package provides a factory to create specific Bnet modules by class name It also provides application classes to define generic functionalities for worker nodes and controller nodes These may be used as base classes in further Application packages 3 4 3 2 Transport packages Depend on the Core system and may depend on external libraries or hardware drivers Implement Device and Transport classes for specific data transfer mechanism e g verbs or tcp ip socket May also implement Device and Transport classes for special data input or output Each transport package provides a factory to create a specific device by class name However the most common transport implementations are put directly to the Core system e g local memory or socket transport the corresponding factory is part of the Core system then 16 DABC User Manual Introduction 3 4 4 Application packages They depend on the Core system and may depend on several transport packages on the Bnet package or other plugin packages They may also depend on other application packages Application packages provide the actual implementation of the core interface class Application that defines the set up and behaviour of the DAQ application in different execution states This may be a subclass of specific existing application Additionally they may provide experiment
29. e ACTION ML proes e oe aed aa be ea aa Sada a a Bo 29 5 2 4 MBS control panel o a ee a ee he a ae Ee a eee ee 29 3 23 Combined DABC and MBS control panel o o 29 5 2 6 Command panel 2 amp ca he dada a Aa a he Ga a a wa dae 29 524 Parameter table oea u a e A RR a ee eh A ay ae 30 52 74 Parameter selecnon 42 uw c4e a 31 BAR Momiorne panels oo ace a a a ee ra Ba ee Saree be 31 EIN SCS ck ee ee et ed ae ae 31 3 282 RAG MEI 242k had bd a bo eee a ee Re EE baa ES 32 ans A an ee rer 32 ee IOMA u ee ae Seal a A ot 32 5285 Logame RIO o aa parka bana aa ne ea Haka rad Be 33 33 GUI savefrestor setups o oo ee ee sama na aa lw eee 6 DABC User Manual MBS GUI Ol DABS event bulling ooo isa baa de ee aes Pade ba ea a wow 6 1 1 DIES SGP e sr ea a a Pad He eH ake bas Ped Bere a 6 1 2 MES control Panel gt oo a ee ee ae eR ea a hada we Haak a 6 1 21 MBS controller buttons ocu cocinar wa Ge baw a ae 6 1 3 MES command panel 2 2 2 2 0 2 So ad oe Be ed eo 6 2 MBS DIM parametrs o ey ha ke Dh ee ea ee whe dee 6 2 1 MBS HER ees GS ee Oe a Ee Bak AED bw Pa ee be eo D22 MES AMS oe RA a NA e beh oes 023 MISSION A A a ee be Pa ad ein a 6 2 4 MESTERE A bd NA A od beh oes 6 2 5 DUIS TERE A 6 2 6 MBS HUMES onai a a eae ea a oe be ht ee G3 Working direciones o ecne sa ee ee ee ER a a oe bd Bee 6 3 1 MBS configuration of DIM o e 22 22 a ee ek e a 7 DABC User Manual DABC Application MBS 7 1 Simple MBS data
30. e commands e g Halt or Suspend see section the blocking calls are also left by exception thus putting the mainloop thread into a stopped state 3 2 1 2 Asynchronous module Several asynchronous modules may be run by a shared working thread The thread processes an event queue and executes appropriate callback functions of the module that is the receiver of the event Events are fired for data input or output command execution and if a requested resource e g memory buffer is available The callback functions must never block the working thread Instead the callback must return if further processing requires to wait for a requested resource Thus each callback function must check the available resources explicitly whenever it is entered 3 2 2 Commands A module may register Command objects and may define command actions by overwriting a virtual command callback method ExecuteCommand 3 2 Introduction 11 3 2 3 Parameters A module may register Parameter objects Parameters are accessible by name their values can be monitored and optionally changed by the controls system Initial parameter values can be set from xml configuration files 3 2 4 Manager The modules are organized and controlled by one manager object which is persistent independent of the application s state The manager is an object manager that owns and keeps all registered basic objects into a folder structure Moreover the manager defines the interfa
31. e example applications such as o Simple MBS event building o Bnet with switched MBS event building o Bnet with random generated events Chapter 4 DABC User Manual Setup user user setup tex 4 1 Installing DABC When working at the gsi linux cluster the DABC framework is already installed and will be maintained by people of the gsi EE department Here DABC needs just to be activated from any gsi shell by typing dabclogin In this case please skip this installation section and proceed with following section 4 2 describing the set up of the user environment However if working on a separate DAQ cluster outside gsi it is mandatory to install the DABC software from scratch Hence the DABC distribution is available for download at http dabc gsi de It is provided as a compressed tarball of sources dabcl tar gz The following steps describe the recommended installation procedure 1 Unpack this DABC distribution at an appropriate installation directory e g cd opt dabc tar zxvf dabcl tar gz This will extract the archive into a subdirectory which is labelled with the current version number like opt dabc dabc_1_0 00 This becomes the future DABC system directory 2 Prepare the DABC environment login script A template for this script can be found at scripts dabclogin sh e Edit the DABCSYS environment according to your local installation directory This is done in the following lines export DABCSYS opt dabc dabc_1_0 00 e
32. ers matching all filters If the data field is white the parameter can be changed This cannot be done in place because the param eter might be updated in the mean time Instead press RETURN in the field A prompter will pop up to enter the value 5 2 8 Monitoring panels As already mentioned the DABC provides definitions of special purpose DIM parameters These Records can be recognized by the GUI and are handled in appropriate way Currently there are States Rates Histograms O O O o Infos 5 2 8 1 States States are records having a number for severity 0 to 4 a color and a brief state description see Fig 5 8 page 32 Of cause the states of the DABC state machine are shown as states Application plug ins may use this kind of records also for other information 32 DABC User Manual GUI Y State 3 oo E Layout Ixi010 Readout E Ixi011 Readout ie Ixi013 Eventbuilder fe Ixi014 Eventbuilder IxgO523 Controller Figure 5 8 States RateMetersii Settings 86 7 MSG x86 7 M56 X86 7 MSG DataRatel b D Trendi b EventRate 1 0 1600 Time 0 10000 X86G 4 MSG X865G 4 MSG TrendKb EventRate 16000 o ime 0 10000 Figure 5 9 Rates 5 2 8 2 Rate meters All rate meters are displayed in the meter panel Fig 5 9 page 32 Meters can be removed in the parameter table See Fig 5 6 page 30 with the Show buttons like the other graphical parameters Saving the setup the visibility will be preserved
33. estored from file MbsControl xml default may be saved to other file see 5 3 page 34 The file MbsControl xml can be created easily in the GUI itself by filling the input fields of the control panel and save lt xml version 1 0 encoding utf 8 gt bsLaunch gt bsMaster prompt MBS Master value node xx gt bsUserPath prompt MBS User path value myMbsDir gt bsSystemPath prompt MBS system path value mbs v51 gt bsStartup prompt MBS startup value startup scom gt bsShutdown prompt MBS shutdown value shutdown scom gt bsCommand prompt Script command value whatever command gt lt lt lt lt lt lt lt lt MbsServers prompt SNumber of needed DIM servers value 3 gt 35 36 DABC User Manual MBS GUI T MbsController OK MBS shut down Name server x90523 gsi de User name goofy Password RET Master node x86g 4 Servers 3 System path daq usr goofy mbswark v5 1 User path 50 x86 newmbs Startup startup scom Shutdown shutdown scom Command sho task Launch file MbsControl xml BGeE OOOSEON Figure 6 1 MBS controller lt MbsLaunch gt MbsMaster Lynx node where the MBS prompter is started MbsUserPath MBS user working directory The GUI need not to have access to that filesystem MbsSystemPath Path on Lynx where the MBS is installed GUI needs no access to this path MbsSt
34. figuration file DABCSYS applications mbs Combiner xml shows how to configure one combiner module reading from three MBS transport servers A simple setup looks like this lt xml version 1 0 gt lt dabc version 1 gt lt Context host localhost name Worker gt lt Run gt lt lib value libDabcMbs so gt lt func value StartMbsCombiner gt lt logfile value combiner log gt lt Run gt lt Module name Combiner gt lt NumInputs value 3 gt lt DoFile value false gt lt DoServer value true gt lt BufferSize value 16384 gt lt Port name Input0 gt lt InputQueueSize value 5 gt lt MbsServerKind value Transport gt lt MbsServerName value 1xi009 gt lt MbsServerPort value 6000 gt lt Port gt lt Port name Inputl gt lt InputQueueSize value 5 gt lt MbsServerKind value Transport gt lt MbsServerName value 1xi010 gt 46 DABC User Manual DABC Application MBS lt MbsServerPort value 6000 gt lt Port gt lt Port name Input2 gt lt InputQueueSize value 5 gt lt MbsServerKind value Transport gt lt MbsServerName value 1xi011 gt lt MbsServerPort value 6000 gt lt Port gt lt Port name FileOutput gt lt OutputQueueSize value 5 gt lt MbsFileName value combiner lmd gt lt MbsFileSizeLimit value 128 gt lt Port gt lt Port name ServerOutput gt lt OutputQ
35. ging DABC TxgO gsi de 1969 Controller 41 statusMessage State machine reached current state Configu a DABC Ixg0523 gsi de 1969 Controller 41 DoEnable il DABC IxIO11 g5i de 1970 Readout 42 statusMessage State machine reached current state Ready DABC IxIO10 g5i de 1970 Readout 42 statusMessage State machine reached current state Ready DABC Ixi013 gsi de 1971 Eventbuilder 42 statusMessage State machine reached current state Ready DABC Ixi014 gsi de 1971 Eventbuilder 42 statusMessage State machine reached current state Ready DABC Ixg0523 gsi de 1969 Controller 41 statusMessage State machine reached current state Ready DABC IlxgO0523 gsi de 1969 Controller 41 statusMessage Setting dim service Setup_File to mySetup DABC IxgO0523 gsi de 1969 Controller 41 Setup_File mySetup 4 Figure 5 13 Logging 5 3 GUI save restore setups There are several setups which can be stored in XML files and are retrieved when the xGUI is started again The file names can be specified by shell variables DABC CONTROL_DABC Values of DABC control panel Saved by button in panel Default DabcControl xml Filename in panel itself DABC CONTROL_ MBS Values of MBS control panel Saved by button in panel Default MosControl xml Filename in panel itself DABC_RECORD_ ATTRIBUTES Attributes of records Saved by main save button Default Records xml DABC PARAMETER _ FILTER Values of parameter filter panel Saved by m
36. guration file should always contain lt dabc gt as root node Inside the lt dabc gt node one or several lt Context gt nodes should exists Each lt Context gt node represents the application context which runs as independent executable Optionally the lt dabc gt node can have lt Variables gt and lt Defaults gt nodes which are described further in the following sections 4 3 5 page 20 and 4 3 6 page 21 4 3 3 Context A lt Context gt node can have two optional attributes host host name where executable should run default is localhost name application manager default is the host name Inside a lt Context gt node configuration parameters for modules devices memory pools are contained In the example file one sees several parameters for the output port of the generator module 20 DABC User Manual Setup 4 3 4 Run arguments Usually a lt Context gt node has a lt Run gt subnode where the user may define different parameters relevant for running the DABC executable lib name of a library which should be loaded Several libraries can be specified func name of a function which should be called to create modules This is an alternative to instantiating a subclass of dabc Application compare section runfunc function name to run some sequence of operations start stop reconfigure over application Useful for batch mode port ssh port number of remote host user account name to be used for ssh login wi
37. he Running state would not lead to Failure but rather to stop the run in a usual way to Ready The state transitions between the 5 generic states correspond to commands of the control system for each node application DoConfigure between Halted and Configured The application plug in creates application specific devices modules and memory pools Application typically establishes all local port connections DoEnable between Configured and Ready The application plug in may establish the necessary con nections between remote ports The framework checks if all required connections are ready DoStart between Ready and Running The framework automatically starts all modules transport and device actions DoStop between Running and Ready The framework automaticall stops all modules transport and device actions i e the code is suspended to wait at the next appropriate waiting point e g begin of MainLoop wait for a requested resource Note queued buffers are not flushed or discarded on Stop DoHalt switches states Ready Running Configured or Failure to Halted The framework automati cally deletes all registered objects transport device module in the correct order 14 DABC User Manual Introduction 3 3 2 Commands The control system may send user defined commands to each component module device application Execution of these commands is independent of the state machine transitions 3 3 3 Configuration a
38. ls T Open DABC MBS control panel see 7 2 3 page 46 Open DABC control panel see 5 2 2 page 27 Open MBS control panel see 6 1 2 page 35 6 Refresh Update DIM service list from DIM name server New parameters and commands are added Existing ones are not removed but only deactivated Parameters and Commands are sorted al phabetically by name All panels are updated This update function is called automatically whenever the frontend systems might have added or deleted DIM services In normal operation there is no need to update manually Ooo in E Open command panel 5 2 6 page 29 E Open parameter table 5 2 7 page 30 ES Open parameter selection panel 5 2 7 1 page 31 A EI Open rate meter panel 5 2 8 page 31 m Open histogram panel 5 2 8 page 31 x Open state panel 5 2 8 page 31 Open info panel 5 2 8 page 31 a Open log panel 5 2 8 page 31 ES Eventually one might see additional icons from application panels this one is only an example The three control panels DABC MBS combined DABC and MBS are used depending on the ap plication to be controlled Eventually an application provides additional specific control panels 5 2 2 DABC control panel The standard DABC control panel is shown in 5 3 page 28 As mentioned already some applications may provide their own control panels like the MBS applications see section 6 1 2 page 35 But most of the buttons are very common
39. luster both with DABC and MBS nodes is treated in Chapter 7 Finally Chapter 8 describes the use case of a DABC builder network BNET both with and without using MBS However the scope of the DABC User Manual does not contain detailed descriptions of the DABC framework architecture the software mechanisms and the example programs These subjects are treated thouroughly in the DABC Programmer Manual 2 2 Release Notes 2 2 1 Version 1 0 0 26 February 2009 These are the features of the first official release 1 A Data Acquisition framework in C language for linux platforms with modular components for dataflow on multiple nodes DABC User Manual Overview Runtime environment with basic services for threads event handling memory management com mand execution configuration logging error handling Plug in mechanism for user defined DAQ applications Plug in mechanism for a control system Features a finite state machine logic and parameters for monitoring and configuration The default implementation is based on the DIM protocol http dim web cern ch dim Java GUI to operate the standard DIM control system of DABC MBS Fully generic evaluating DABC process variables but extendable by user written components Contains a sub framework to set up distributed event builder networks BNET Supports tcp ip and InfiniBand verbs networks for data transport Supports formats and readout of GSP s s
40. nd monitoring The configuration is done using parameter objects On application startup time the configuration system may set the parameters from a configuration file e g XML configuration files During the application lifetime the control system may change values of the parameters by command However since the set up is changed on DoConfigure time only it may be forbidden to change true configuration parameters except when the application is Halted Otherwise there would be the possibility of a mismatch between the monitored parameter values and the really running set up However the control system may change local parameter objects by command in any state to modify minor system properties independent of the configuration set up e g switching on debug output change details of processing parameters The current parameters may be stored back to the XML file Apart from the configuration the control system may use local parameter objects for Monitoring the components When monitoring parameters change the control system is updated by interface methods of the manager and may refresh the GUI representation Chapter will explain the usage of parameters for configuration in detail 3 4 Package and library organisation The complete system consists of different packages 3 4 1 Core system The Core system package defines all base classes and interfaces and implements basic functionalities for object organization memory management
41. nfiniBand cluster e Several Worker nodes of an experiment specific lt Application gt They may be configured for different jobs in the BNET this example provides an Application class bnet TestWorker with some boolean parameters to define the functionality Note the usage of wildcards in the lt Context gt names to define properties that should be valid for all nodes matching the pattern e g the libraries to load or the common application setup for all worker nodes Here there are 4 workers which all produce random event data enabled in lt IsGenerator gt and all send their data to all others enabled in lt IsSender gt In parallel they all receive data from the other workers to build the complete event enabled in lt IsReceiver gt Such BNET setup is best started by means of the DABC GUI The name of the controller lt Context gt node and the setup file name must be specified in the control panel of the GUI see section 5 2 2 page 27 Then all nodes can be started just by the Launch button ES The configuration and run control of the nodes is done by the state machine buttons of the control panel 8 2 DABC eventbuilder network BNET with MBS A more realistic example of a BNET uses data which is read from n external MBS nodes each connected to one DABC readout node and transferred to m DABC eventbuilder nodes Example file SDABCSYS applications bnet mbs SetupBnetMbs xml shows the configuration for an MBS event b
42. odes as event builders some modifications of the MBS setup files must be done For the DABC side setup files must be provided 7 2 MBS event building with DABC 45 7 2 1 MBS setup When we want to use DABC nodes as event builders we need a different setup on the MBS side We assume that we have more than one MBS node Such multi node system is controlled by an MBS prompter running on one node The setup has to be changed such that all nodes run as if they are stand alone this is done typically by setting COL_ MODE to 0 in the usf setup file That means that each node runs the Readout Collector Transport Daq_ rate chain The DABC event builders connect to these transports The MBS buffer size should be set to the stream size and the number of buffers per stream must be set to one 7 2 2 DABC setup On the DABC user working directory we need configuration files Summary of parameters MbsFileName File name for list mode data file LMD Overwritten by command MbsFileSizeLimit File closes when size is reached and new file opens BufferSize Should match MBS buffer size MbsServerKind Transport Stream MbsServerPort Port number transport 6000 MbsServerName MBS node of transport NumInputs Number of MBS channels for one combiner DoFile Provide output file DoServer Provide server These parameters are used to configure an event generator NumSubevents FirstProcld SubeventSize Go4Random The following example con
43. ol MBS systems which support the DIM communication It is extendable by user written components 3 2 Introduction The the following sections we give a short introduction to the main components and terms of DABC Figure 3 1 should be helpful 3 2 1 Modules All processing code runs in module objects There are two general types of modules synchronous and asynchronus A synchronous module may block for longer time waiting for data and must therefore run in its own computing thread Asynchronous modules must never block Therefore several of them may run as a chain in one single thread 10 DABC User Manual Introduction Object manager DABC Module DABC Module process Central data manager Memory pools Bufferqueue Bufferqueue Nemo Figure 3 1 Components and data flow 3 2 1 1 Synchronous module Each synchronous module is executed by a dedicated working thread The thread executes a method MainLoop with arbitrary code which may block the thread In blocking calls of the framework re source or port wait optionally command callbacks may be executed implicitly A timeout may be set for all blocking calls this can optionally throw an exception when the time is up On timeout with exception either the MainLoop is left and the exception is then handled in the framework thread or the Main Loop itself catches and handles the exception On state machin
44. or all components A progress panel pops up during that time see 5 2 3 page 29 If all components are up trigger the main Update 8 Configure Execute user s MBS startup procedure in prompter Executes state transition command Configure on DABC master node and wait for the transition All plug in components are created Then execute Enable If all components are up trigger the main Update O Start MBS acquisition then executes DABC Start command All components go into running state Running oO Pause acquisition Execute MBS stop acquisition Execute DABC Stop command All components go into standby state Ready 0 Halt acquisition Executes DABC Halt command This closes all plug ins States go into Halted Execute 7 2 MBS event building with DABC 47 DabcMbsController Login Name server x90523 gs5i de User name goofy Password RET MBS master node x86g 4 MBS servers 3 ll DABC master node Ixg05 23 gsi de DABC master name c Controller 41 DABC servers IS MBS system path A 1 MBS user path v5 0 x36 newmbs MBS Startup Istartup scom MBS Shutdown shutdown scom MBS command sho task DABC system path misc goofy sniff dabe DABC user path misc goofy dabc work DABC setup file SetupMbs xml DABC script lps MES control file MbsControl xml DABC control file DabcControl xml SA TV Figure 7 1 Combined DA
45. or compilation of user written com ponents Additionally the general executable dabc_run now provides the DABC runtime envi ronment and may be started directly for simple batch mode applications on a single node However further preparations are necessary if DABC shall be used with DIM control system and GUL 2 Open a dedicated shell on the machine that shall provide the DIM name server e g ssh nsnode cluster domain Then call dabclogin sh dimDns to launch the DIM name server This is done once at the beginning of the DAQ setup usually the DIM name server needs not to be shut down when DABC applications terminate 3 Set the DIM name server environment variable in any DABC working shell e g the shell that will start the dabc gui later dabclogin sh export DIM_DNS_NODE nsnode cluster domain Note that a user installation of DABC framework may set this environment variable already in the general dabclogin sh script if the DIM name server will mostly run for all users on the same default node see section 4 1 4 Now the DABC GUI can be started in such prepared shell by typing dabc or mbs for a plain MBS gui resp See below in gui section To operate a DABC application one should create a dedicated working directory to keep all relevant files e Setup files for DABC XML e Log files text The following section 4 3 page 19 gives a general description of the setup file syntax The GUI may run on a machine with no
46. ort implementation shall be able to block e g on socket receive there can be only one transport for this thread A Device instance usually represents an I O component e g network card there may be more than one Device instances of the same type in an application scope The device objects are owned by the manager singleton transport objects are owned and managed by their corresponding device A device is persistent independent of the connection state of the transport In contrast a transport is created during connect or open and deleted during disconnect or close respectively A device may register parameters and define commands This is the same functionality as available for modules 3 2 9 Application The Application is a singleton object that represents the running application of the DAQ node i e one per system process It provides the main configuration parameters and defines the runtime actions in the different control system states see section In contrast to the Manager implementation that defines a framework control system e g DIM EPICS the Application defines the experiment specific behaviour of the DAQ 3 3 Controls and configuration 3 3 1 Finite state machine The running state of the DAQ system is ruled by a Finite State Machine 4 on each node of the cluster The manager provides an interface to switch the application state by the external control system This may be done by calling state change
47. ory Therefore the memory as owned by the memory pool has a reference counter which is incremented for each buffer that refers to any of the contained fragments When a consumer frees a buffer object the reference counters of the referred memory blocks are decremented If a reference counter becomes zero the memory is marked as free in the memory pool 3 2 6 Ports Buffers are entering and leaving a module through Port objects Each port has a buffer queue of config urable length A module may have several input output or bidirectional ports The ports are owned by the module 12 DABC User Manual Introduction 3 2 7 Transport Outside the modules the ports are connected to Transport objects On each node a transport may either transfer buffers between the ports of different modules local data transport or it may connect the module port to a data source or sink e g file i o network connection hardware readout In the latter case it is also possible to connect ports of two modules on different nodes by means of a transport instance of the same kind on each node e g InfiniBand verbs transport connecting a sender module on node A with a receiver module on node B via a verbs device connection 3 2 8 Device A transport belongs to a Device object of a corresponding type that manages it Such a device may have one or several transports The threads that run the transport functionality are created by the device If the Transp
48. ppear in the GUI Upper limits of the rate meters can be specified This file can be copied from SMBSROOT set Only the parameters which are in this file are optional This file controls the rate meter and state appearance File name must be dimsetup and in the MBS working directory The value numbers are the maximum values for rate meters Colons only if value is specified Node names must be uppercase wildcards all He de de de e All nodes Rates EventRate 10000 fx EventTrend 10000 DataRateKb 16000 DataTrendKb 16000 StreamRateKb 16000 StreamTrendkb 16000 fx EvSizeRateB 128 fx EvSizeTrendB 128 File filling status in percent typically only on one node transport fx FileFilled 100 StreamsFull 100 x TriggerRate 10000 Trigger rates for the individual triggers 01 15 tx Trigger0lRate 10000 States Delayed or immediate event building BuildingMode Current eventbuilding running or suspended EventBuilding Shows spill signal Spillon 6 3 Working directories Shows if file is open typically only on one node transport tx FileOpen Show trigger master tx TriggerMode F User integers from daqst 00 15 can be set by f_ut_set_daqst_user index value tx UserVal_00
49. pplication some buttons may be not seen additional ones may show up If one does not work with MBS plug ins the control panels for MBS are of cause not useful Fig 5 2 page 26 shows a more typical view of a running DABC In general all panels including the DABC Controls Ore 50 E35 BE ALU 3 SE A DabcMbsLauncher OK DABC ready Name server x90523 gsi de EI Doconfigure User name goofy gt 3 Controller 41 Password RET 9 EI Eventbuilder 42 T Commands Command DoConfigure scope Com MBS master node MBS servers DABC master node DABC master name DABC servers MBS system path MBS user path MBS script MBS command DABC system path DABC user path DABC setup file DABC script MBS launch file DABC launch file x869 4 3 Ixg0523 gsi de Controller 41 5 daq usr goofy mbswork v5 1 Ixi013 gsi de 1971 1xi014 gsi de 1971 ES Readout 42 DoEnable DoError DoHalt DoStart 1v50 x86 newmbs script remote_exe sc m_rising v50 x86 newmbs x86g 4 x86 7 imisc goofy snifffdabc miscigoofy dabc work SetupMbs xml ps MbsLaunch xml DabcLaunch xml O0B O 000502 Dostop der 777777 m CAL ADaramatore g State o RX Layout Acquisition E 4 RunMode E IxgO u Ixi013 Node lIxi014 startTime RunMode 4 Acquisition Ki Controller Ixi
50. s bnet configurator scripts for new xml format 48 dabcsetupfiles 43 Mbs BNET example with real mbs nodes instead generators 48 53
51. server with DABC 2 2 Common 7 2 MBS event building with DABC o een nennen 72 1 MBS SEUD o ee ee 22 DABC SOUP our a na ee a oA 723 Combined DABC and MBS control panel o ooo 7 2 3 1 Combined DABC and MBS controller buttons o 8 DABC User Manual DABC Application Bnet 8 1 DABC eventbuilder network BNET es 8 2 DABC eventbuilder network BNET with MBS 00000085 References Index 51 53 CONTENTS Chapter 2 DABC User Manual Overview user user overview tex 2 1 Outline of this manual This DABC User Manual contains all information that is necessary to install and use the DABC frame work Chapter 3 should be useful to understand the most commonly used terms of DABC Chapter 4 describes how to install the DABC packages on any linux machine and how to set up the working environment Additionally some typical use cases and their configuration files are shown The following chapters then give more detailed explanations how to operate in different modes with the DABC Java GUI Chapter 5 covers the general functionality of the GUI which is common for most applications Especially this is mostly sufficient to control a DAQ cluster purely with one or several DABC nodes Chapter 6 describes the DABC GUI in a mode to control a pure MBSdata acquisition system without a native DABC node The application use case for a mixed DAQ c
52. specific Module classes When installed centrally the Application packages are kept in subfolders of the SDABCSYS applications directory Alternatively an Application package may be installed in a user directory and linked against the Core system installation and the required Plugin packages 3 4 5 Distribution contents The DABC distribution contains the following packages Core system This is plain C code and independent of any external framework Bnet plugin Depends on the core system only Transport plugins Network transport for tcp ip sockets and InfiniBand verbs Additionally transports for GSI Multi Branch System MBS connections socket filesystem is provided Optionally exam ple transport packages may be installed that illustrate the readout of a PCIe board or data taking via UDP from an external readout controller ROC board Control and configuration system The general implementation is depending on the DIM framework only DIM is used as main transport layer for commands and parameter monitoring On top of DIM a generic record format for parameters is defined Each registered command exports a self describing command descriptor parameter as DIM service Configuration parameters are set from XML setup files and are available as DIM services GUI A generic controls GUI using the DIM record and command descriptors is implemented with Java It may be extendable with user defined components Application packages som
53. t gt lt Context host 1xi009 name Worker1 42 gt lt Context host 1xi010 name Worker2 42 gt lt Context host 1xi011 name Worker3 42 gt lt Context host 1xi012 name Worker4 42 gt lt Defaults gt lt Context name x gt lt Run gt lt logfile value test DABCNODEID log gt lt loglevel value 1 gt lt lib value libDabcBnet so gt lt Run gt lt Context gt lt Context name xWorkerx gt lt Run gt lt lib value S DABCSYS applications bnet test libBnetTest so gt 49 50 DABC User Manual DABC Application Bnet lt Run gt lt Application class bnet TestWorker gt lt IsGenerator value true gt lt IsSender value true gt lt IsReceiver value true gt lt NumReadouts value 4 gt lt Application gt lt Context gt lt Defaults gt lt dabc gt The setup of such BNET contains several lt Context gt nodes Generally the BNET has two types of nodes e One Controller node that has a master controller functionality implemented in the lt Application gt of class bnet Cluster The controller node must be specified at the DABC GUI setup to receive the direct cluster control commands e g state machine transitions commands In the DABC BNET framework the controller also keeps a general parameter lt NetDevice gt for the data connection device of the entire DAQ cluster this can be dabc SocketDevice for tcp ip or verbs Device for an I
54. tandard DAQ system MBS Multi Branch System May also write data into MBS listmode format and may emulate MBS socket data servers Addition ally MBS systems can be controlled by the DABC GUI Chapter 3 DABC User Manual Introduction user user introduction tex 3 1 About DABC The Data Acquisition Backbone Core DABC is a Data Acquisition DAQ framework with modular com ponents for dataflow on multiple nodes It provides a C runtime environment with all basic services such as threads and event handling memory management command execution configuration logging and error handling User written DAQ applications can be run within this environment by means of a plug in mechanism DABC contains a sub framework with additional interfaces to set up distributed event builder networks As transport layers for such networks tcp ip and InfiniBand verbs are supported DABC supports by default the data formats and readout connections of GSI s standard DAQ system MBS Multi Branch System It may also write data files with the MBS x 1md format and it may emulate MBS data server sockets such as stream or transport servers The DABC control system features a finite state machine logic and parameters for monitoring and con figuration The current implementation is based on the DIM protocol 2 other implementations could replace this one A generic Java GUI is provided to operate this standard DIM control system This GUI may also contr
55. the commands The naming convention is the same The server providing parameters can be make them no visible and un changable DABC defines some special parameter types having a data structure and a specific interpretation like a rate parameter having a value limits a color and a graphic presentation A rate parameter is assumed to be changed and updated regularly The GUI displayes these special parameters in dedicated panels Parameters are used in all components of DABC The central place for all parameters in the GUI is the parameter table as shwon EJ Parameters SAS BEER Node Application Parameter Current Set value Ixi010 1970 Readout 42 CtriPoolSize BnetPlugin 2097152 Ixi010 1970 Readout 42 DABCYersion DABC C 1xi010 1970 Readout 42 DataRate Sender 0 0 Ixi010 1970 Readout 42 EventBuffer BnetPlugin i 524288 Ixi010 1970 Readout 42 EventPoolSize BnetPlugin i 4194304 Ixi010 1970 Readout 42 EventRate Combiner 0 0 Ixi010 1970 Readout 42 InfoMessage State ma RNOONOO Figure 5 6 Parameter table in Fig 5 6 page 30 The parameter table holds all parameters which are marked by the provider to be visible The parameter values can be changed in the Set value column if no minus sign is there in which case the provider does not grant modification The buttons in the Show column indicate if the parameter is shown in some graphics panel It can be removed from or added to
56. thout password should be possible init init script which should be called before dabc application starts test test script which is called when test sequence is run by run sh script timeout ssh timeout debugger argument to run with a debugger Value should be like gdb x run txt args where file run txt should contain commands r bt q workdir directory where DABC executable should start debuglevel level of debug output on console default 1 logfile filename for log output default none loglevel level of log output to file default 2 DIM_DNS_NODE node name of DIM dns server used by DIM controls implementation DIM_DNS_PORT port number of DIM dns server used by DIM controls implementation cpuinfo instantiate dabc CpulnfoModule to show CPU and memory usage information Value must be gt 0 If 0 only two parameters are created if 15 several ratemeters will be created parslevel level of pars visibility for control system default 1 4 3 5 Variables In the root node lt dabc gt one can insert a lt Variables gt node which may contain definitions of one or several variables Once defined such variables can be used in any place of the configuration file to set parameter values In this case the syntax to set a parameter is lt ParameterName value VariableName gt It is allowed to define a variable as a combination of text with another variable but neither arithmetic nor string operations are supported Using v
57. thread control and event communication 3 4 2 Control and configuration system Depends on the Core system Defines functionality of state machine command transport parameter monitoring and modification Implements the connection of configuration parameters with a database i e a file in the trivial case Interface to the Core system is implemented by subclass of Manager Note that default implementations of state machine and a configuration file parser are already provided by the Core system 3 4 3 Plug in packages Plug in packages may provide special implementations of the core interface classes Device Transport Module or Application Usually these classes are made available to the system by means of a corresponding Factory that is automatically registered in the Manager when loading the plug in library 3 4 Package and library organisation 15 User Application User Plug ins 01 U09 Cc 2 O O O Q c is Oo gt j e Figure 3 3 Schematic view of the distributed DABC components coloured and user specific extensions white When installed centrally the Plugin packages are kept in subfolders of the SDABCSYS plugins directory Alternatively the Plugin packages may be installed in a user directory and linked against the Core system installation 3 4 3 1 Bnet package This package depends on the Core system and implements modules to cover a generic event builder network It
58. til all workers go into Ready state Now the DABC is ready to run Triggers the main GUI Update gt Start acquisition Executes Start command All components go into running state Running 5 2 GUI Panels 29 u Pause acquisition Executes Stop command All components go into standby state Ready Halt acquisition Executes Halt command This closes all plug ins States go into Halted Next must be shut down or configure is Exit all processes by EXIT commands After 2 seconds trigger the main GUI Update a Shut down all processes on all nodes by script This is the hard shut down aD ssh shell script execution on master node 5 2 3 Action in progress 3B Work in progress please wait n a RI u Current action Figure 5 4 Launching progress When starting up configure or shut down the GUI has to wait until the front ends have completed the action During that time a progress window similar to the one shown in Fig 5 4 page 29 pops up Please wait until the popup disappears 5 2 4 MBS control panel To control and monitor a stand alone MBS system a dedicated control panel is provided by the MBS application This panel is described in the MBS section 6 1 2 page 35 5 2 5 Combined DABC and MBS control panel To control and monitor MBS front ends with DABC event builders a dedicated control panel is provided by the MBS application This panel is described in the MBS section 7 2 3 page 46 5 2 6 Comman
59. ueueSize value 5 gt lt MbsServerKind value Stream gt lt Port gt lt Module gt lt Context gt lt dabc gt We have one node lt Context gt with a simple run function StartMbsCombiner that uses a single lt Module gt to do the event combination from three input lt Port gt s The node names and other parameters of the external MBS connections are specified in the lt MbsServerName gt properties of these ports Of course the MBS setup must match these definitions There are two output lt Port gt s in parallel here A FileOutput that writes into a x 1md file as specified in the property lt MbsFileName gt and a ServerOutput that offers a Stream server for a monitoring program as the examples in above section A full description is in section page of the DABC programmer s manual Now we can use the combined controller panel to startup MBS and DABC 7 2 3 Combined DABC and MBS control panel This panel shown in Fig 7 1 page 47 is simply a superposition of the single ones Here the name of the DABC builder lt Context gt node and the DABC setup file name must be specified Also the MBS master node running the prompter is 7 2 3 1 Combined DABC and MBS controller buttons a Save panel settings see 5 3 page 34 BE Execute script dabcstartup sc at DABC master node Starts DIM servers Execute script prmstartup sc at MBS master node Starts prompter dispatchers and message loggers Waits f
60. uilding with 2 DABC readout nodes connected with 2 MBS nodes each simulated by DABC generator modules here and 2 DABC event builder nodes A detailled description of this setup is given in section page of the DABC programmer manual The usage of such configuration is similar to the BNET example as described above in section 8 1 page 49 The list of lt Context gt nodes or the corresponding lt Variables gt resp must be edited for the actual node names Additionally the names of the MBS nodes for readout should be specified Then the BNET setup may be launched and controlled by the DABC GUI References 1 J rn Adamczewski Musch Hans Georg Essel and Sergei Linev The go4 system homepage http go4 gsi de 2 Clara Gaspar Dim distributed information management system http dim web cern ch dim 2008 3 Andreas Kugel Wenxue Gao and Guillermo Marcus The active buffer board online documentation http cbm wiki gsi de cgi bin view DAQ ActiveBufferBoardV 1 2008 4 The Wikipedia Finite state machine http en wikipedia org wiki State_machine 2009 51 52 REFERENCES Index Core classes dabc Application 10 dabc Buffer 9 dabc Command 8 dabc Device 10 dabc MemoryPool 9 dabc Parameter 9 dabc Port 9 dabc Transport 10 DABC Environment set up 16 Installation 15 Plug in installation 20 Setup file 17 Finite state machine states 10 transition commands 11 TODO Adjust old mb
61. working directory The GUI does not need to have access to the filesystem DabcSystemPath Path where the DABC is installed DabcSetup Setup file name DabcScript Command to be executed in an ssh at the master node DabcServers Number of workers and controllers This information is minimum for the GUI to know when all DABC nodes are up The GUI waits until this number of DIM servers is up and running The name server name is translated from shell environment variable DIM_DNS_ NODE the user name from shell environment variable USER Password can be chosen when the first remote shell script is executed which itself is protected by user password All following commands then need this password 5 2 2 1 DABC controller buttons a Save panel settings to the file Control file If you choose a name different from the default you must set a shell variable to it to get the values from that file see 5 3 page 34 BE Startup all tasks Executes a DABC script dabcstartup sc via ssh on the master node under user name Then it waits until the number of DIM servers expected are announced A progress panel pops up during that time see 5 2 3 page 29 When the servers are up the main GUI Update is triggered building all panels from scratch according the parameters offered by the servers Configure Executes state transition command Configure on master node and waits for the transition All plug in components are created Then execute Enable Waits un

Download Pdf Manuals

image

Related Search

Related Contents

Front Entrance Display Screen Manual  mode d`emploi PV calcul 4-09-2013  Syn Six Own Man  Série Colorado™  SERVICE MANUAL  Road Satety Guard  38DL PLUS Ultrasonic Thickness Gage  Manual Buzón CFDI - Facturación Electrónica ProFact  Erlang Interface  E/DEシリーズ セットアップガイド  

Copyright © All rights reserved.
Failed to retrieve file