Home
GSI Multi-Branch System User Manual
Contents
1. 31 5 2 4 Start Single Environment 31 5 2 5 Start Remote Environments 0000000 eee 32 5 3 Controling 33 5 3 1 2 Acquisition V 2 T th m ud estos KA d dotate s g a 33 li Version 4 3 October 28 2003 5 4 5 5 5 6 5 3 2 5 3 3 CAMAC Esone Calls Tape Handling End of Tape Tape Errors File Output File Header File Names On line Analysis 5 4 1 5 4 2 5 5 1 5 5 2 5 5 3 5 5 4 MBS Histogramming Data Channels from MBS GOOSY without Filters GOOSY and PAW without Filters Using the Event Servers GOOSY and PAW with Filters Any Program without Filters Error Recovery Task States MBS Task Table Hanging TCP Sockets Recovery uoo xo Session Example 5 6 1 Single CAMAC Svstem Readout Control 6 1 6 2 6 3 6 4 6 5 6 6 6 7 Readout Tasks Readout Software Overview Single Branch Setup Specification Setup File Parameters Readout Specification Table Readout Table Readout Parameters 6 5 2 Table Readout Subevents 6 5 3 Table Readout Example User Function Readout Macro Readout Method 6 6 2 Static Pointer Readout Method 6 6 3 Changing Subevent Headers 6 6 4 User Readout Functions on AEB EBI under OS 9 Running a Svstem with User Readout Functions Running a Single Processor Svstem 6 7 2 Running a System with Slave Processors 6 7 3 Running a System with AEB
2. 10 3 2 Enabling and Disabling Histogramming Version 4 3 October 28 2003 Contents GSI Multi Branch Svstem User Manual 10 3 3 f_mbs_anal Event Access and Return Status 114 10 4 Histogramming Functions 115 10 5 Histogram Server 116 10 6 Histogram Client Library 116 11 ESONE Library 117 lld Esone Olients 5 240 S m WU n eu een Ne eg 117 12 Keyword Summary 121 NMBSzkeywords 2 uomen date ao etn e herbas lp du eM rd 122 13 Command Summary 141 14 Release Notes 153 LI41 General Changes w curs ar ek Boe SEU and pw 153 14 2 New Features RR RP in Pe p RUE a Be 153 14 3 Directory structure uen Ia ence ku OR IR tee ERI epe Ete nn antes 153 Log HIE vk tm A vu Iuuen eO Wet etude dus 154 14 5 Setup File setupusf 154 14 6 Readout w eue ce Ba a ar AT Q See m RO 154 14 7 Changes for MBS like Readout 154 14 8 Internal Changes m wa E pedo deh re wp i EU ERO oe ee 154 BA II B os tek a tan ze q ok Soe e Boe Ge ede eae Beg gow aed 154 14 911 Default Path u 2 2 Abe lem o mom Be du aC 155 14 9 2 Relative Path Specifications NOT YET IMPLEMENTED 1
3. 2 Co 16 RD HOSTNAME 3 Co 16 RD 4 Co 16 RD HOSTNAME 5 Co 16 RD HOSTNAME 6 Co 16 RD HOSTNAME 7 Co 16 RD HOSTNAME 8 Co 16 RD HOSTNAME 9 Co 16 RD HOSTNAME 10 Co 16 RD HOSTNAME 11 Co 16 RD HOSTNAME 12 Co 16 76 Version 4 3 October 28 2003 RD HOSTNAME 13 RD HOSTNAME 14 RD HOSTNAME 15 RD HOST FLG SBS SETUP PATH 0 SBS SETUP PATH 1 SBS SETUP PATH 2 SBS SETUP PATH 3 SBS SETUP PATH 4 SBS SETUP PATH 5 SBS SETUP PATH 6 SBS SETUP PATH 7 SBS SETUP PATH 8 SBS SETUP PATH 9 SBS SETUP PATH 10 SBS SETUP PATH 11 SBS SETUP PATH 12 SBS SETUP PATH 13 SBS SETUP PATH 14 SBS SETUP PATH 15 RD PIPE BASE ADDR OUT MODE PIPE BASE ADDR WR PIPE LEN WR PIPE N FRAG EV BUF LEN EV BUF STREAM Parser Definition File f Author N K RSM U Co 16 Co 16 Co 16 Lo 16 co 128 co 128 co 128 011281 CO 128 011281 0 128 co 1281 co 1281 co 1281 co 128 co 128 C0 128 C0 128 C0 128 co 128 ULo 161 ULo ULo 16 ULo 16 ULo 16 ULo ULo ULo 8 1 3 Readout Tables See also 6 5 page 56 The readout table parser definition file is MBSROOT set readout pdf Version 4 3 October 28 2003 Profile Definitions 77 GSI Multi Branch Svstem User Manual Data Structures
4. 83 Even w sva leen see ont let s A pes A 83 Subeventi zuo WDR Rem a m Dak 83 8 2 10 Types and Subtypes 84 Type Numbers 22 ESL ae ua oe RE eU 84 Subtype Numbers 84 Buiter 84 Event ione rbv tene nores e entes ea Ed aee Sd ou 84 Bubevent 2 poet We de RO o ee Rode Pes 84 83 Command Definition File 84 9 Event Serving and Filtering 87 Stream Servers uc uma Aot hee RUE A au tle 8T O LIE Synchronous Mode eB RU ee ran des 8T 9 1 2 Asynchronous 8T Conditional Keep Zu u u ru ba OE iue doa 8T Scaled Keep ee ei ae hai i Bin hue 88 9 2 Jlransport SEervVetil uu sl pasu Da te A A A il A B der 88 9 3 Event Server 22 24 ER eb a M Rp E 89 9 4 Remote Event 89 iv Version 4 3 October 28 2003 94 1 Parameters 2 464 684 vn RR nn 9 422 Tuning PETI EE 9 5 GOOSY On line Analysis 9 5 1 GOOSY Transport Manager Connection to MBS Transport Connection to MBS Stream Server Disconnects 4 4 20 a UE E Re yes 9 5 2 GOOSY Analysis 22e 9 6 PAW On lin
5. 9 4 2 Tuning When invoking the remote event server the throughput to the Event Clients must be optimized according to your specific requirements Appropriate tools are available to handle several con flicting scenarios 1 2 90 All clients are nearly identical This means that the hardware platforms and network connections are equivalent and for all clients nearlv the same amount of event filtering and analvsis is performed This scenario is valid in most cases and requires normallv maximum throughput in the sum of all clients Some clients are different and the fastest client s shall receive an event rate as high as possible Version 4 3 October 28 2003 Event Servers 3 Some clients are different and the slowest client s shall receive as manv events as possible There are three parameters available to specifv vour environment and to optimize the event throughput according to your needs max_look add look and client mode see Remote Event Server parameters 8 10 The underlying principle to increase the overall event throughput is wait a very short time in the right place to get more clients ready for the next event Reasonable values for the three scenarios above are 1 client mode O max look 1000 add look 100 default 2 client mode 1 max look 0 add look 0 3 client mode 2 max look 5000 add_look 0 Fine tuning can be done by the user with the option server mode set to 2 see Remote Ev
6. r_offset_2 character strings char char char char char char char c_name 16 c dtype 4 c data time cre 28 c clear date 28 c lettering res 64 c lettering 1 64 c lettering 2 64 out of range energy limits linear trans no of counts that are out of range energy limits dim 2 energy limits dim 2 linear trans spect s name data flag creation time lettering data content lettering ist axis lettering 2nd axis Version 4 3 October 28 2003 Histogram Manager 10 2 2 Histogram Command Overview A detailed description of the commands can be found in the MBS command description man ual All commands except ENABLE DISABLE are executed in the histogram manager program m histogram Commands for histogram bases CREATE BASE DELETE BASE ATTACH BASE DETACH BASE DUMP BASE RESTORE BASE SHOW BASE Commands for histograms CREATE HISTOGRAM PROTECT HISTOGRAM CLEAR HISTOGRAM DELETE HISTOGRAM DUMP HISTOGRAM SHOW HISTOGRAM SET HISTOGRAM CHANNEL SET HISTOGRAM TEXT ENABLE HISTOGRAM DISABLE HISTOGRAM SET VERBOSE HISTOGRAM Version 4 3 October 28 2003 111 GSI Multi Branch Svstem User Manual Histogramming 10 3 Histogramming 10 3 1 General Description The histogram manager package allows to manage histograms These mav be filled with on line data by the routine
7. SBS SETUP PATH 0 SBS SETUP PATH 1 RD PIPE BASE ADDR OUT MODE WR PIPE BASE ADDR WR PIPE LEN WR PIPE FRAG BUF LEN EV BUF STREAM Multi Branch Setup 0x700000 0x40000 200 FEA lt x A gt K kK K kk kK A ok oko K K A u R K K K a FK K KK FK K K 2K FK K FK FK FK FK K K FK FK K K K K FK FK K K FK FK FK ku 2k FK FK K K K FK FK K K tu K ROROR OR E7 1 CVC97 CVC99 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 m dag usr kurz mbstest ml9 cam2 setup usf dag usr kurz mbstest ml9 cam3 setup usf 0xf0400000 0xf0600000 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 Oxf00000 Ox40000 300 Ox1000 bz 5 FEK sk sk sk sk sk sk 5k 5k ok 5k 5k ok ok ok ok ok ok ok ok ok 3K 9k ok 3K ak K K K K ak ak ak ak 2K 2K a ak ak FT layer 2 event builder ML_SETUP HOSTNAME a RD HOSTNAME 0 E6 4A RD HOSTNAME 1 ET 1 RD HOST FLG 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 m Version 4 3 October 28 2003 71 GSI Multi Branch Svstem User Manual Data Structures RD PIPE BASE ADDR OUT MODE EV BUF LEN N EV BUF STREAM 0x4700000 0x0 0x0 0x0 2 9 0x4000 6 6 Ox10f00000 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 OK 2k K A ku R KK K K K K K KK FK K K a K FK K FK FK FK K K FK FK K K K tu ku F
8. e Buffer Element Data Arbitrary structured data The structure may contain other buffer elements The type specified in the buffer element header must always uniquely define the kind of data following Examples of buffer elements are the buffer itself MBS events and MBS subevents The event headers always contain a type subtype number combination which is unique for a certain data structure All modules processing buffers can check if a buffer element has the correct type If not it may just skip the element output messages or skip the buffer 8 2 4 Buffer Files If MBS buffers are dumped to files the first buffer may be a GSI file header buffer see below If the file is written to a tape the tape is labled by ANSI tape labels as described in the ANSI standard American National Standard X3 27 1978 In general MBS uses DEC s standard RMS file formats The MBS files contain fixed length records 8 2 5 GSI File Header Buffer The include files for all structures described in the following are on Lynx directory mbs prod inc The file names are the same as the structure names On OpenVMS machines the corresponding PL 1 declarations are in library GOOINC Big Endian representation struct cv_string t short string 1 char stringl781 80 Version 4 3 October 28 2003 List Mode Data Structures dus struct s filhe 1 short filhe tlen Short filhe dlen length of data in words short filhe subtype 1 short filh
9. echo rate optional gt 0 Get notification after every n th event 0 Get notification after every n percent of the requested number of events if event no gt 0 only 0 Disable echo Default 10 list flag optional This flag has two functions 1 Select extent of event subevent data display N No display H Display only event subevent headers D Display event subevent headers and data decimal for subevents of subtypes 1 2 hex for others 2 Switch on off user analysis routine UANALA X Switch off user analysis routine UANALA Combinations of both types of flags are allowed Defaults N UANALA invoked flush optional Buffer flushing intervall The server sends a buffer every flush seconds If the buffer contains no event data the client notifies with a message on standardout Default 2 imode optional Control invocation of initialisation routine UASTART 0 call UASTART only the first time gt 0 call UASTART at each invocation of the client Default 0 climode optional Define client mode Q quiet nearly no output to standardout V verbose mode T benchmark mode After each 1000 events received the transfer rate kbyte sec is shown Default Q 9 9 3 Example PAW 2 gsi goocli input clri6f 6003 1 a 1 500 100 Version 4 3 October 28 2003 PAW Clients on AIX Connect to a Remote Event Server running with port number 6003 on the AIX node clri6f and request a continuous stre
10. Date 02 Dec 1993 Vers 1 00 Purpose Prototype for MBS CAMAC Initialize and Readout INITFILE file c 64 READFILE file c 128 trigger 110 15 CAMREAD crate 1 0 15 nstation 1 1 24 address 1 0 15 function 1 0 32 repetition ulo CAMINIT crate 1 0 15 nstation 1 1 32 address 1 0 15 function 1 0 32 data lo repetition ulo Note that the CNAFs for initialization and readout corresponding to each trigger must be con tained in separate files 78 Version 4 3 October 28 2003 List Mode Data Structures 8 2 List Mode Data Structures 8 2 1 Glossary byte 8 bit sequence word 2 bytes longword 4 bytes buffer element Whole buffer or part of a buffer buffer element header Unified structure keeping information about the trailing buffer ele ment data buffer element data Data of any structure including other buffer elements Always preceded by a buffer element header event Data describing one physical event Events are buffer elements in standard buffers Events may be composed of subevents If not otherwise stated All length fields are given in 16 bit word units excluding two longwords of header All character string fields are written with 7 bit ASCII coding 8 2 2 Byte Order Between machines with different byte ordering a longword swap must be performed All struc tures in this manual refer to the 68000 byte ordering Big Endia
11. PAW client collecting data in private adress space goopaw make make file uastartc f called at the begin of input uanal4 f template program for the analysis of events uastop f called at the end of input uclinfo f returns current statistics The Fortran template files should be copied from there to a private directory and filled with your analysis code If you do not need further program modules you can execute the make files directly to create the new version of the stand alone shared memory client e g cd lt mydir gt make f cern goopawnew gooshr make Only the new version of the make files in cern goopawnew supports uclinfo as user interface Note that there are two different template files containing the initialization subroutine namely uastarts f for the non PAW client and uastartc f for the two PAW clients These file names are also required in the corresponding make files However the name of the Fortran subroutine must be uastart in all cases The make files check and handle the version of the CERN software as specified with the cernlogin command All three AIX clients work with the versions 94a and later of the CERN software Without shared memory the HBOOK histograms and Ntuples are accessible only within the current PAW session The data structures created and filled in shared memory however can be accessed for visualization and further analysis in parallel by any additional number of PAW sessions running on
12. or transfer oriented like Ethernet The data access from the controller which controls the branch branch master to slave con trollers is provided by address mapped windows These address windows can be specified freely in a setup database multi window system The system works standalone i e no other computers are necessary to take data and store it on a local tape For on line analysis however workstations are needed i e running GOOSY or PAW 2 2 Command Interface The MBS is controlled from ASCII terminals VT type through a command interface The MBS commands are composed of up to three command keywords followed by named arguments and qualifiers The commands are not implemented directly in the shell They are dispatched from dispatcher or prompter programs and executed by tasks running either on local or remote nodes Version 4 3 October 28 2003 7 GSI Multi Branch Svstem User Manual Overview Command and argument specification can be stored in text files Each command is executed bv a routine All keywords may be abbreviated e g SET VERBOSE EVENT or SET VER EV START TASK or STA TA The command arguments can be input in a positional order bv name reference or as qualifiers START TASK lt name gt START TASK file lt path gt name lt task gt SHO COMMAND FULL The interface executes command files and allows for recalling of command lines All command input except strings enclosed in or beginning with a slas
13. 100 nanoseconds TRIG_CVT The range for TRIG FCT and TRIG_CVT is between 2 usec and 6 5 msec Both numbers written into the trigger module during initialisation with the command set trig mod Immediatly after a trigger signal is detected by a trigger module the conversion time is started After it has elapsed a LAM IRQ is sent into the crate controller and the readout procedure is started The conversion time is intended to allow for conversion and digitization of hardware modules and adds deadtime Therefore the conversion time must be set to the maximum time required for all modules to be read by the task serving that trigger Le in case the trigger module triggers the readout task on the branch master m_read_meb crate number 0 the conversion time must be set to the maximum time required for any module in all crates to be read by m_read_meb A time delay between the arrival of an interrupt and the first readout action executed by the readout task of at least 140 us on a CVC and 40 us on an E7 has been measured This delay was found for the master readout task m read working in interrupt mode It operates in a multitasking environment and the delay is the time the operating system needs to inform a user task on an external interrupt On a CVC working as a slave controller the delay is much smaller since in this case the mechanism to catch triggers is polling which is much faster shorter than 5 us On CAMAC CVC single
14. A stream is always locked by one task i e the collector to fill it or the transport to empty it When a stream is not filled completely it may be that there are empty buffers in it These have l_dlen 0 82 Version 4 3 October 28 2003 8 2 9 Event Structures Event Big Endian representation List Mode Data Structures Generated from EE ROOT GOOFY VME SA VEHE VMETEMP typedef struct 1 long 1 dlen Data length 4 4 in words short i subtype Subtype short i type Type number short i trigger Trigger number short i_dummy Not used yet long 1 count Current event number s vehe Subevent Big Endian representation Generated from EE ROOT GOOFY VME SA VESHE VMETEMP typedef struct 1 long 1 dlen Data length 42 in words short i subtype Subtype short i_type Type number char h control Processor type code char h subcrate Subcrate number short i_procid Processor ID from setup s_veshe For table readout the data per CAMAC channel is typedef struct 1 Short i data CAMAC data value short i_index CAMAC parameter table index s data When using the standard readout mechanism readout tables the CAMAC data follows as 1 word 16bit channel data and 1 word channel number Channels with a data value of zero are suppressed Version 4 3 October 28 2003 83 GSI Multi Branch Svstem User Manual Data Structures 8
15. Having prepared the Fortran user interfaces in your local directory the non PAW client will be created and invoked with make f cern goopaw new gooshr make gooshr lt argument list gt For the argument list see 9 9 page 99 or the AIX man page gooshr As PAW clients using shared memory the non PAW client allocates shared memory segments if not already existing containing the HBOOK histograms and Ntuples as booked in uastart and filled in uanal4 You may access these data from any number of standard PAW sessions running on the same host 9 8 3 Accessing Shared Memory with PAW A sample PAW session reading from shared memory might look as follows PAW gt global segment The specified shared memory segment segment is mapped This name must be identical with that used in uastart Then the same sequence as shown above chapter 9 7 2 page 95 may be executed Caution You should replace the name of the shared memory segment in the templates by your own individual name because any user on the same node can read from this area if he knows the name and maps it The shared memory segment is permanent If it is no longer needed remove it with the AIX command ipcrm m lt segment id gt 98 Version 4 3 October 28 2003 PAW Clients on AIX The number lt segment id gt of the shared memory segment can be obtained with the AIX com mand ipcs mbc To change the size of your shared memory segment it must be deleted first a
16. It writes on request list mode data samples streams to a connected client TCP A GOOSY transport manager GOOSY command CONNECT STREAM or a remote event server may connect See also 9 1 page 87 2 5 9 Esone Server See figure 2 1 The Esone server m esone serv executes buffers containing CNAF lists The buffers are filled and returned to the client A client library is available on all GSI platforms See also 5 3 3 page 35 2 5 10 Histogram Manager The histogram manager m_histogram executes commands to handle histograms See 10 page 107 2 5 11 Utility The program m_util executes most of the MBS commands To execute single commands this program also may be called from shell by alias util 2 6 Standalone Programs All standalone programs are called by alias names The actual list can therefore be printed by command alias e mbs start dispatcher e prm start prompter 12 Version 4 3 October 28 2003 Software Organisation e mon monitors the activities of the system It needs its own terminal because it does continuous output and displavs two pages of information in a toggling mode The toggle time can be specified by ts where s are seconds with 30s as default If only one page of information should be displayed it can be specified with p1 or p2 e inimbs Create and or initialize control structure To be used only when all tasks are stopped e msg sho sho status of message files e nsg new
17. SET EVENT SERV SET FILEHEADER SET FLUSHTIME SET HISTOGRAM CHANNEL SET HISTOGRAM TEXT SET MAXCLIENTS ESONE SERV SET MAXCLIENTS EVENT SERV SET PRINT ESONE SERV Version 4 3 October 28 2003 MBS keywords 135 GSI Multi Branch Svstem User Manual Kevword Summarv SET RIRECEIVER FLUSHTIME SET SMI 1810 LECROV SET SMI 1872 LECROY SET SMI 1872 LECROY SET SMI 1875 LECROY SET SMI 1875 LECROV SET SMI 1881M LECROY SET SMI 1881 LECROY SET SMI 1882F_LECROY SET SMI 1885F_LECROY SET STREAM SERV SET TASK SET TORECEIVER FLUSHTIME SET TRIG MOD SET VERBOSE DISPATCHER SET VERBOSE ESONE SERV SET VERBOSE EVENT SERV SET VERBOSE GLOBAL SET VERBOSE HISTOGRAM SET VERBOSE PROMPT SET WINDOW SET XDISPLAY SETUP LOAD SETUP SHOW REMOTE SHOW SHOW SLAVE READ SMI SLAVE WRITE SMI SLAVE XSHELL SLAVE 136 Version 4 3 October 28 2003 MBS keywords SLAVE READOUT LOAD SLAVE_READOUT SMI ACCESS SMI CLEAR SMI FASTBUS INITIALIZE SMI FASTBUS LOAD SMI PEDESTAL LOAD SMI THRESHOLD READ SMI BROADCAST READ SMI MODULE READ SMI PEDESTAL READ SMI SEQUENCER READ SMI SLAVE READ SMI TPSCAN RELEASE SMI FASTBUS RESTART SMI SEQUENCER SET SMI 1810 LECROY SET SMI 1872 LECROY SET SMI 1872 LECROY SET SMI 1875 LECROY SET SMI 1875 LECROY SET SMI 1881M LECROY SET SMI 1881 LECROY SET SMI 1882F LECROV SET SMI 1885F_LECROY WRITE SMI BROADCAST WRITE SMI MODULE WRITE SMI NTA WRITE SMI SEQUENCER WRITE SMI
18. and link and modify them correspondingly Note that there are two different template files containing the initialization subroutine namely uastarts for for data collection in shared memory and uastartc for for data collection in the PAW common data block PAWC in the user s address space These file names are also used in the corresponding command files creating the executables However the name of the Fortran subroutine must be uastart in both cases In the shared memory version the client is a standalone program without PAW environment For visualization and further analysis the HBOOK histograms and Ntuples filled in the global section can be accessed in parallel by any number of PAW sessions running on the same node If the client is invoked repeatedly the HBOOK data structures are initialized each time in the template procedure uastart thus loosing the previous contents In the version with the client integrated into PAW the HBOOK histograms and Ntuples are accessible only within the current PAW session Here the HBOOK data structures are initialized by default only once so that all events received from all client invocations may be accumulated However optionally the data structures may be initialized for each call of the client see 9 9 page 99 Warning The current VMS releases of the Cern software do not support writing to global sections within PAW Therefore don t use the shared memory initialization in PAW else your PAW sessio
19. has to be started but only if any crate has to be read out by it On CVCs working as slave controllers the task 1 and on AEB EBIs m_read_aeb_slave must be started Two methods for specifying the readout of hardware modules are provided The easy but less versatile method uses user written readout tables ASCII files which must be loaded by command This method is only possible for systems with pure CAMAC readout The second method provides an interface for users to write their own readout function in the program language 48 Version 4 3 October 28 2003 Single Branch Setup Specification Buffer Streams Collector Eventserver Streamserver Stream Figure 6 2 Buffers and Streams C There is practicallv no limitation on actions in this functions so the user gets the full flexibiltv but also the full responsibilitv for a correct working readout No mixture between these two methods inside a single branch is allowed In both methods a crate corresponds to a subevent which means that the readout tasks produce a subevent for each crate with an appropriate subevent header 6 3 Single Branch Setup Specification As mentioned above the svstem specification is done in an ASCII file This file setup usf will be parsed checked and the setup quantities loaded into each controller processor memorv at an early stage of system startup All running tasks access this memory module to get the system conf
20. m prompt Connects prompter to remote dispatcher CONNECT TRANSPORT name m to m to connect to m transport CREATE BASE name histogram size m histogram m histogram Creates histogram data base CREATE CONDITION INCLUDE name POLYGON WINDOWS m collector m collector Creates include files CREATE CONDITION POLYGON polygons NEW m collector m collector Initialize polygon conditions CREATE CONDITION WINDOW windows NEW m collector m collector Initialize window conditions CREATE FILES project ANALYSIS STARTUP CREATE m histogram m lea Create include files and procedure CREATE HISTOGRAM dim type Ichannels lup 1binsize 2channels 2low 2up 2binsize m histogram m_histogram Creates histogram CREATE POLYGON description datafile m collector m collector Create polygon condition CREATE WINDOW name description x1 x2 yl y2 m collector m collector Create window condition DEFINE COMMANDS task file LOG m dispatch m dispatch Defines commands for task 142 Version 4 3 October 28 2003 Command Summarv DELETE BASE name m histogram m_histogram Deletes histogram data base DELETE HISTOGRAM name m histogram m histogram Deletes histogram DETACH BASE name m histogram m_histogram Detaches histogram data base DISABLE CVC CAM IRQ m util m util Disables CAMAC LAM and VSB interrupts DISABLE DELAYED m ds m ds disables de
21. m smi Activate RB on FastBus datawav RESTART SMI SEQUENCER m smi m smi Restart sequencer from an given address RESTORE BASE base file OVERWRITE NEW m histogram m_histogram Restores base from file RESTORE POLYGON file NEW OVER APPEND m collector m collector Restore polygon condition from file RESTORE WINDOW file NEW OVER APPEND m collector m collector Restore window condition from file SET ARECEIVER FLUSHTIME time m ar m ar Sets stream flushtime SET DISPATCHER node m_prompt m_prompt Sets terminal to remote dispatcher SET DR_FLUSHTIME time m dr m_dr Sets stream flushtime SET EVENT SERV scale events maxclnt ALL m event serv m event serv Sets m event serv parameters SET FILEHEADER string line RUNID EXPERIMENT COMMENT LABEL FILENAME USERNAME CLEAR m transport m transport Speficy fileheader information 146 Version 4 3 October 28 2003 Command Summarv SET FLUSHTIME time m collector m collector Sets stream flushtime SET HISTOGRAM CHANNEL name value xchan ychan INCREMENT m histogram m histogram Sets channel content of histogram SET HISTOGRAM TEXT name text TITLE XTXT YTXT CONT m histogram m_histogram Sets lettering text field of histogram SET MAXCLIENTS ESONE SERV maxclnt m esone serv m_esone_serv Sets maximum number of clients for m esone serv SET MAXCLIENTS EVENT SERV maxclnt m event serv m_event_serv Sets
22. tape size number first inhead outhead AUTO PROMPT EDIT DISK RFIODISK RFIOSERVER MULTI FIRST m transport m_transport Opens file on tape PROTECT HISTOGRAM UNPROTECT m_histogram m_histogram Un protect histogram from beeing cleared PSHELL command al a2 a3 a4 m_prompt m_prompt Executes shell command line READ SMI BROADCAST type CONTROL DATA m smi m smi Broadcat read from FastBus READ SMI MODULE gad sad CONTROL DATA m smi m smi Reads from FastBus Module READ SMI PEDESTAL slot range channel m smi m smi Reads the pedestal memory of SMI READ SMI SEQUENCER address m smi m smi Read SMI seqencer instruction word READ SMI SLAVE m smi m smi FastBus read from an attached slave READ SMI TPSCAN type m smi m_smi Performs T PIN scan and returns the pattern back RELEASE SMI FASTBUS m smi m smi Release bus mastership Version 4 3 October 28 2003 145 GSI Multi Branch Svstem User Manual Command Summarv REMOTE ACCESS nodelist m prompt m prompt Grants command access from nodes REMOTE RESET node ALL m prompt m prompt Cleans up remote nodes Remote program is m remote REMOTE SHOW node task LOCAL TASKS DAQ NET m prompt m prompt Shows remote info REMOVE SEGMENTS m util m_util Removes critical segments RESET node task LOCAL m_remote m_remote Resets remote node Executed by alias remote RESET SMI FASTBUS m smi
23. 2 page 67 for a multi layer setup The first action before starting most of the MBS components is to load this setup file i e to store the values specified in the file into the memory To do this the m_util task must be started MBS START TASK M UTIL MBS LOAD SETUP setup file Next we start the readout tasks either the master readout on the master crate where the collector runs or the slave readout Then we load the readout table MBS START TASK m read meb or m read cam slav MBS LOAD READOUT readout file Now we have to set up the trigger module The values are taken from the setup file MBS SET TRIG MOD MBS SHOW TRIG MOD 5 2 3 Readout For CAMAC there are two methods to specify the readout profiles or functions Other subsys tems can only be read by user readout functions The methods can be choosen for each readout independently CAMAC Readout Profile The readout profile CAMAC readout table describes the readout The parser definition file for the syntax is mbs prod set readout pdf Examples can be found in the directories in mbs prod exa A detailed description can be found in 6 5 page 56 30 Version 4 3 October 28 2003 MBS Readout Readout bv Function A detailed description of readout functions can be found in 6 6 page 57 5 2 4 Start Single Environment Once one has a setup file and a readout table file one can start up MBS It is recommended to have a command procedure ie st
24. 2 10 Types and Subtypes Tvpe Numbers Type numbers in general should specify data structures A GSI file header buffer has a different structure than a GSI data buffer Therefore the tvpe of the header buffer is 2000 and shall not be used for other buffers Within events the tvpe number specifies which data structure follows i e straight values or subevents Subtvpe Numbers The subtvpe numbers may be chosen by experiments to store specific information Buffer Currently there are some type numbers already in use 2000 1 GSI file header buffer 4 1 GSI data buffer with events of type 4 10 1 GSI data buffer with events of type 10 Event Currently there are some type numbers already in use 3 Events with a standard header followed by compressed data 4 Events with a standard header followed by the data The subtype specifies if zeros are suppressed 10 Events with structure s vehe followed by subevents with structure s_veshe Subevent 10 Subvents with structure s veshe 8 3 Command Definition File A typical entry in the command definition file looks like this 1 Command Module SBSCOM CDF 24Commandkok kokkokok ak ak ak ka ooo o k kk kk kkk kkk kkk Command keys SHOW COMMANDS Command SHOW COMMANDS task FULL ALL PURPOSE Show known commands PARAMETERS 84 Version 4 3
25. 4 3 October 28 2003 151 GSI Multi Branch Svstem User Manual Release Notes 152 Version 4 3 October 28 2003 Release Notes Chapter 14 Release Notes 14 1 General Changes The new Multi Branch Svstem MBS V2 replaces the old Single Branch Svstem SBS VI Although the functionalitv of the old SBS is integrated into MBS there are some changes in the MBS compared to the old SBS 14 2 New Features The svstem has been enhanced into a multi window svstem which means that the subevent pipes of the reaout tasks can be located anvwhere in memorv as long as thev are accessible bv the collector in an address mapped mode This mechanism replaces the unflexible pipe setup of the SBS It is now much easier to connect foreign svstems However the base address of the pipes have to be specified individuallv in the setup file The most important change in functionalitv is the possibilitv to setup hierarchical structured multi lavered multi branch svstems For this purpose a new multi laver multi branch setup parser facilitv has been created Also the functionality of the m_collector task has been enhanced substantially It now acts as as a data dispatcher with various modes of operation in a multi layer multi branch system See chapter Multi Layer Multi Branch Systems for further information 7 page 65 14 3 Directory Structure The new Multi Branch System MBS is located under the top directory mbs The structure is the same as the one
26. 65 Data Structures Chapter 8 page 73 1 1 8 Optional Facilities Histogramming Chapter 10 page 107 1 1 4 Reference Chapters ESONE Library Chapter 11 page 117 Keyword Summary Chapter 12 page 121 Command Summary Chapter 13 page 141 4 Version 4 3 October 28 2003 MBS Copv Right 1 1 5 List of all Chapters Overview Chapter 2 page 7 Hardware Chapter 3 page 17 Command Interface Chapter 4 page 21 Running a Data Acquisition Chapter 5 page 29 Readout Control Chapter 6 page 47 Multi Layer Multi Branch Systems Chapter 7 page 65 Data Structures Chapter 8 page 73 Event Serving and Filtering Chapter 9 page 87 Histogramming Chapter 10 page 107 ESONE Library Chapter 11 page 117 Keyword Summary Chapter 12 page 121 Command Summary Chapter 13 page 141 Release Notes Chapter 14 page 153 1 2 Other Manuals 1 2 1 GSI Multi Branch System Reference Manual Command and function descriptions Version 4 3 October 28 2003 5 GMC MBS AUTHOR 1 3 MBS Authors and Advisory Service The authors of MBS and their main fields for advisory services are phone GSI 4 6159 71 R Barth Fastbus SMI library Tel 2554 Y Du Event routines DECunix port AIX port 1995 1996 H G Essel Multitasking CI message logger ESONE GOOSY connections Tel 2491 R Fritzsche TCP library H G ringer Event server PAW connections Tel 2553 J Hoffmann CVC hardware trigger Tel 2494 F Humbert library 1996 N Ku
27. AEB EBI 5 CBV 6 CVI 7 CAV A correct CONTROLLER ID is also required by the esone server task running on the branch master SY ASY FLG array Each crate subevent can be set as a synchronous or an asynchronous crate Synchronous means that the collector will wait for this subevent to be ready Asyn chronous means that the subevent will be ignored if it was not ready at the time the collector task is scanning to build the event SV ASV FLG 0 synchronous SY_ASY_FLG 1 asynchronous COL Specifies the output mode of the collector task running on the branch master 0 Standard mode the collector collects subevents from the various subevent pipes and formats events into buffer streams and passes the streams to the transport task 1 The collector collects subevents from the various subevent pipes but no event formatting 52 Version 4 3 October 28 2003 Single Branch Setup Specification will be done Instead all collected subevents are written into a single output pipe This output pipe will itself be read bv a collector of a higher laver in a multi laver multi branch system This mode requires that ML PIPE BASE ADDR ML SEG and ML PIPE LEN to be specified see explanation below 2 If a single branch system consists of only one intelligent processor and is itself a compo nent of a multi layer multi branch system it can be very useful that no collector task runs at all in this single branch The sub
28. Branch Svstem User Manual Running a Data Acquisition 5 5 Error Recovery 5 5 1 Task States The Lynx command ps ax shows the tasks and their states below the S in the headline Currently executing process will usually be ps itself Readv to run but not running Suspended by a signal SIGSTOP SIGTSTP SIGTTIN or SIGTTOU Waiting on a semaphore for some resource New process awaiting completion of its fork operation Zombie waiting to be cleaned up by the init process g Tasks are Zombies if thev stopped but their parent did not cleanup The MBS tasks are childs of the dispatcher as long as one did not leave it Once one has left the dispatcher all tasks are childs of the INIT task ppid 1 The MBS command STOP TASK ZOMBIE cleans up the specified task blocks only in the first case Otherwise only the INIT task can do it but only if it gets the chance It runs on lower priority than the acquisition Therefore one should stop the acquisition when there are zombies 5 5 2 MBS Task Table The MBS command interface keeps its own task table This table can be displaved with alias tasks The output mav look like Aktive tasks read meb collector transport msg log dispatch util 3 mbs prod bin CVC m util 1 4 mbs prod bin_CVC m_transport 1 5 mbs prod bin CVC m collector 1 6 mbs prod bin CVC m read meb 1 36 mbs prod bin_CVC m_dispatch 1 48 test m_msg_log 1 Inactive tasks event serv sbs mon rea
29. ESONE cnafs This window is placed 0x50000 above the normal readout window and this is the value for this parameter It implies that ESONE cnafs should not be executed on E6 or E7 master and CBVs slave when a readout is running Note The parameter CONTROLLER ID described below must also be set to the right value to get correct X and Q from ESONE calls LOC MEM BASE array These are the hardware base adresses where each intelligent con troller in a single branch is supposed to access its hardware modules It could be for example the local CAMAC base or the extended VME base This base address is passed as a virtual pointer into the user readout function LOC MEM LEN array Length of the address window with base LOC MEM BASE LOC PIPE BASE array Parameter to specify the base address of a shared segment inside the subevent pipe will be placed Must be specified for each intelligent controller in a single branch This parameter is always the local address on a controller PIPE OFF array The start address of a subevent pipe is specified with LOC PIPE BASE PIPE OFF PIPE SEG LEN array Total length of the subevent pipe on each intelligent controller in bytes array Maximum number of subevents which can be stored in a subevent pipe before the pipe blocks The structure of the subevent readout pipe is fully specified by PIPE SEG LEN and PIPE LEN The first 20 bytes at the beginning of the pipe a
30. GMC MBS HARD 3 1 Single Branch Systems In the MBS data acquisition software various hardware setups are supported MBS can be used as a single crate or a single branch system VME or CAMAC because up to 16 crates may be connected via one differential VSB bus In addition several single branch systems can be combined to full fledged hierarchical structured multi branch systems The software design requires up to now that read write access from the branch master to it s slave crate controllers is provided through remote address mapped windows It doesn t rely on a specific hardware protocol unless it is address mapped Presently only the VME and VSB buses fulfill this requirement In this section only single crate and single branch systems are described The desription of multi layered multi branch systems follows in a separate chapter 7 page 65 The MBS requires that each crate must be equipped with a crate controller either intelligent i e equipped with a processor running an operating system or non intelligent Supported crates and crate controllers are CAMAC CVC LynxOS CBV CVI pSOS CAV all developed at GST VME E7 and E6 LynxOS PowerPC board LynxOS planned FASTBUS Aleph Event Builder AEB with the VSB interface EBI OS 9 Lecroys Segment Manager Interconnect SMI with VSB interface FIFA STRUCK STR340 SFI module with two internal VME processor slots One of the intelligent controllers running under the LynxOS o
31. Mb Histogramming DISABLED Name of output device Label CLOSED file CLOSED 0 000 MB written to tape 0 000 to file Collected 2 3142 MB 565 Buffers 2545 Events Rate 566 KB s 138 Buffers s 625 Events s Buffer i 09 May 95 19 09 08 66 Type 10 1 Data 2024 Used 2024 Evts 5 Buf 1295 First frag 0 Last frag 1 endian 1 Last ev length 410 Event 5825 Type 10 1 Words 410 Trigger 1 SubEv id 10 Type 10 1 Words 402 Subcrate 0 starting server thread m transport wait for connect port number 6000 now a client connects to transport CVC40 transport server thread connected 42 Version 4 3 October 28 2003 Session Example and disconnects all four messages CVC40 transport pipe broken disconnecting 40 transport closed tcp connection 40 transport ERROR stc write CVC40 transport closed tcp connection now a client connects to event server CVC40 event_ser I f_ev_acc_clnt INFO Client no 1 accepted and disconnects CVC40 event ser I f ev rmcint INFO client no 1 removed start stream server stop event server first mbs gt stop task m_event_serv CVC40 event_ser mbs deve bin_CVC m_event_serv exiting mbs gt sta task m_stream_serv mbs gt CVC40 stream se task m stream serv started mbs gt mbs gt quit CVC40 gt tasks Aktive tasks read_meb collector transport msg_log util stream_serv 4 mbs deve bi
32. SHOW lt node gt The commands are also available from the shell remote SHOW file remote SHOW LOCAL remote SHOW node The all qualifier in the prompter command corresponds to file in the shell command 14 14 3 REMOTE RESET This command cleans up remote and or local nodes i e kills all MBS tasks creates new message files and clears the status segment daqst 158 Version 4 3 October 28 2003 Release Notes prompt REMOTE RESET ALL prompt REMOTE RESET LOCAL prompt REMOTE RESET node The commands are also available from the shell remote RESET file remote RESET LOCAL remote RESET node The a11 qualifier in the prompter command corresponds to Qfile in the shell command 14 14 4 SET EVENT SERV This command replaces the SET STREAM and SET EVENTS commands SET EVENT SERV scale events maxclnt ALL Scaledown streams to analyse 1 take all scale events maximum number of events to copy from a stream maxclnt maximum number of clients ALL take all events per selected stream 14 14 5 SET STREAM SERV This command replaces the SET STREAM command SET STREAM SERV scale NO SYNC NO KEEP SCALED KEEP CLEAR scale scaledown streams to analyse 1 take all NO SYNC svncronous mode send all scaled wait for request NO KEEP Keep streams when scale 1 and when there are gt 3 free streams SCALED KEEP Keep scaled down streams when there are gt 3 fr
33. below the old sbs The environment variable SBSROOT has been replaced by MBSROOT Version 4 3 October 28 2003 153 GSI Multi Branch Svstem User Manual Release Notes 14 4 Log file The log file name is now mbslog 1 instead of sbslog 1 14 5 Setup File setup usf The specification file setup usf structure for a single crate or single branch system has been changed dramatically This was necessary to support multi windows multi branches and multi layers See the description in the section Single Crate and Single Branch Setup Specification 14 6 Readout 14 7 Changes for MBS like Readout The change visible for users is the parameter set passed to the user init and readout function See the new structure in the section User Readout Function 6 page 47 14 8 Internal Changes The program m read cam slave c has been renamed to m read cam slav c to be consistent with the task name 14 9 Environment The MBS consists of several environments One usually is local the others are remote To control a distributed environment one uses the prompter The nodes of the environment must be written in text file node list txt per line The prompter reads this file on the current path and starts connects dispatchers and message logger clients on these nodes On the local node which must be included in this file the message logger server is started Because the prompter uses rsh commands one must provide a file rhosts on
34. crate systems the user therefore can save deadtime by taking the interrupt delay into account calculating the conversion time Le if the needed real conversion time is smaller than 140 ps the trigger conversion time may be set to the minimum value of 2 us TRIG_CVT 20 EV_BUF_LEN Length in bytes of one buffer multiples of 1024 up to 32768 are allowed 54 Version 4 3 October 28 2003 Readout Specification EV BUF Number of buffers contained in one stream N STREAM Number of streams EV BUF LEN N EV BUF and N STREAM have nothing to do with the readout they are de scribed for completeness If there are no special requirements a reasonable choice would be EV_BUF_LEN 0x4000 16384 N_EV_BUF 8 N STREAM 8 This specifies an event buffer space of 8 buffers times 8 streams thus in total 1 Mbytes of space If users want to have a larger event buffer space it must be checked if that amount of memory is free after all data acquisition tasks have been started For the exact meaning of the remaining parameters one should see 8 2 page 79 The values set for these will appear in the event and subevent headers and are important for analysis programmes but not for the data acquisition itself EVT TVP SV Event type for events Strongly recommended is EVT TYP SY 10 EVT SUBTYP SY Subevent type for events SE TYP array Subevent type For CAMAC crate subevents SE_TYP 10 is recommended SE SUBTYP array Subeven
35. file Text file containing CAMAC readout tables Sc Script files chip Help text file used in help command A text file structured like VMS help files cdf Command definition file Text file with command definitions inf News directory file Text file containing a list of topics pointing to txt files txt News text files Contains news text d Log file scom Command procedure Text file containing command lines Environment Variables MBS sets some environment variables 14 Version 4 3 October 28 2003 Naming Conventions HOSTTVPE CPU tvpe should not be changed MBSROOT root directorv is changed when switching to MBS development version HELPDIR help directory may be changed to different directory to get help from private libraries see below NEWSDIR news directory may be changed to different directory to get private news see below 2 7 3 Profile Interface The MBS profile system uses two types of text files The parser definition files typically names ending pdf and the profiles filenames ending usf mrf urf In programs one may use a set of routines to get values from profiles by name references l his tool which is very versatile can also be used by users writing their own profiles See also 8 1 page 73 and 5 2 2 page 30 Version 4 3 October 28 2003 15 GSI Multi Branch Svstem User Manual Hardware 16 Version 4 3 October 28 2003 Single Branch Svstems Chapter 3 Hardware
36. in an interrupt or in a polling mode If polling mode is selected the trigger module must not necessarly be placed in the same crate It can be anywhere where m read meb has address mapped access to its trigger module registers In interrupt mode it must be in its local crate m read cam slav and m_read_aeb_slav are always triggered in polling mode The trigger module must therefore be in the local crate Two methods of readout specification are provided If the hardware modules to be read out are pure CAMAC the readout can be specified in simple readout tables The readout itself is then performed with zero suppression Generally the user may write user readout functions to read out any type of module in any type of crate No mixture between table readout and user readout function is possible A complete single branch system and single crate setup must be specified in a single ASCII file 6 2 Readout Software Overview Specification of the hard and software configuration of a single crate or single branch data acqui sition system is kept in a single ASCII file provided by the user It has the name extension usf which stands for user setup file A convenient name is setup usf The system is furthermore specified by running the appropiate tasks especially the read out task on the intelligent controllers This will be done in startup command procedures start scom at system startup On the branch master controller the task m read
37. into local memory 4 A VME crate read out by E7_14 writing its subevent pipe into a remote VME VSB memory The master event builder E7_12 collects the pipes from branch 1 via VSB and from branches 2 4 via VME The multi branch setup file needed for E7 12 follows N Kurz user setup file usf for setting up the multi layer multi branch daq system see also parser definition file pdf FEK ok sk sk sk sk 5k ok sk sk sk ok ok ok ok A 9k 9k 9k 9k 9k 9k 3K 3K 3K 3K K K K KOR aK aK K CCI A KOK K K KK K K 2k 2k 2k 2k ML_SETUP HOSTNAME ET 12 RD HOSTNAME 0 CVC27 RD HOSTNAME 1 ET 16 RD HOSTNAME 2 ET 15 RD HOSTNAME 3 ET 14 RD HOST FLG 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 SBS_SETUP_PATH_O kaos usr kaos mbsrun cam setup_mbs usf SBS_SETUP_PATH_1 kaos usr kaos mbsrun trp setup_mbs usf SBS_SETUP_PATH_2 kaos usr kaos mbsrun smi setup_mbs usf SBS_SETUP_PATH_3 kaos usr kaos mbsrun vme setup_mbs usf RD_PIPE_BASE_ADDR 0xf0202000 Ox50f00000 0x40f00000 0x01000000 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 Version 4 3 October 28 2003 69 GSI Multi Branch Svstem User Manual Multi Laver Multi Branch Svstems OUT MODE 2 EV BUF LEN 0x4000 N_EV_BUF 9 N_STREAM 8 FEA lt A A OK k k k Kk OK kK K KKK K KK K K K K K KK FK a K K FK K K FK FK FK K 9k FK FK K ku FK ku K FK FK kubu FK K K tu K ROROROR 7 4
38. m transport started CVC40 dispatch m stream serv started CVC40 dispatch m msg log detached CVC40 dispatch Get full commands by 77 or 777 or get arguments by command 7 Now shut down mbs stop ac CVC40 util stop acquisition 40 read found trig type 15 stop acquisition CVC40 collector acquisition NOT running mbs gt stop task all CVC40 read meb mbs deve bin CVC m read meb exiting CVC40 collector mbs deve bin CVC m collector exiting CVC40 transport mbs deve bin CVC m transport exiting CVC40 util mbs deve bin CVC m util exiting stop m stream serv mbs gt stop t m stream serv CVC40 stream se mbs deve bin CVC m stream serv exiting mbs gt quit kill message logger task id from above CVC40 gt kill 6 check if all tasks are gone CVC40 gt tasks Aktive tasks Inactive tasks read meb collector transport event serv msg log dispatch util mbs mon read cam slav esone serv stream serv histogram prompt Clear communication paths CVC40 gt msg new message file dev msg removed command file dev com removed 44 Version 4 3 October 28 2003 Creating new message file dev msg Creating new command file dev com Initialize CVC40 gt inimbs created and initalized daq status segment CVC40 gt CVC40 gt Version 4 3 October 28 2003 Session Example 45 GSI Multi Branch Svstem User Manual Readout Control 46 Version 4 3 October 28 2
39. or hex Ox 9 Offset Offset for object type 2 specified as decimal or hex 0 gt 0 Longword offset in event or subevent 0 1st LW etc lt 0 Word offset in event or subevent 0 1st W 1 2nd W etc 9 10 3 Filter Examples The following are filter file examples Text behind an is comment The lines with the argument numbers are for better reading and refer to the description above Simple Event Filter Event filter Take all events with trigger gt 3 copy filter subset 1 1 line follows 1123456789 l argument numbers 101000000 copy filter event filter subset Version 4 3 October 28 2003 103 GSI Multi Branch Svstem User Manual Event Serving and Filtering 1 1 line follows 1123456 7 8 9 l argument numbers 11060013530 l event filter This simple example can be also written as i I subset with 1 line 1123456789 l argument numbers 111600130 l copy and event filter line Complex Event Filter Event filter Take all events with trigger 3 OR trigger 7 AND the first three bits set in the 16th LongWord of the subevent with procid 20 copy filter subset 1 subset with 1 line 1123456789 argument numbers 101000000 copy filter all event filter subset 1 2 subset with 2 lines 1123456789 argument numbers 110101130 Trigger 3 110101170 Trigger 7 event filter subset 2 2 subset with 2 lines 1123456 7 8 9 l argument numbers 0101111
40. processor works as the master event builder It has to collect subevents produced by one CVC and one AEB thus it is mixture of all supported crate flavours Version 4 3 October 28 2003 63 GSI Multi Branch Svstem User Manual Multi Laver Multi Branch Svstems The FASTBUS crate has the restriction that onlv slave trigger modules are supported therefore the trigger module in the CAMAC crate must be master On the AEB only a restricted environment is available In principle only one task needs to run aeb slave which gets the setup quantities specified in a common setup file Since the LvnxOS and OS 9 NFS file svstems cannot exchange data a procedure is provided to load the setup file from the master event builder which has to be a LvnxOS host anvwar via VSB into the EBI memorv of the AEB On the AEB this memorv section is read and all the setup quantities are moved into a save OS 9 memorv module from where thev can be accessed bv the readout task With this procedure it is possible to use onlv one copv of the setup usf file for all controllers The commands to start up the slave readout task on the AEB are 1 LvnxOS dump setup 2 dumps the setup for AEB with crate number 2 2 OS 9 mbs prod bin m read setup ebi reads setup file and writes it into memory mod ule 3 OS 9 mbs prod bin m read aeb slave starts slave readout task It is also possible to invoke 2 and 3 with the help of remote shell commands rsh fr
41. run on this node Optionally the event or stream server may also run on these nodes This allows for writing data to T CP or tape on any multi layer node and to do on line monitoring of any subsystem data It implies however that the complete system blocks if one output device connected to a transport task is not ready to take data If a single branch inside a multi layer system is controlled by a single processor and no output to TCP or tape from this node is requested no collector is allowed to run Instead a collector on a higher layer must read the pipe filled by the m read task The collector task can write only one output pipe containing one or more subevents These pipes are only allowed to be read by one collector in the next layer Any node residing above layer 0 can run simultaneously as a branch master controlling a single branch and as a multi layer node collecting data from nodes below its own layer A collector may read from a node more than one layer below in hierarchy The pipe memories must up to now be address mapped by both their producer and con sumer On each collector the consistency of the data merged together like trigger type and the local event counter of the trigger modules is checked Regardless of the structure of the data acquisition system all trigger modules acting together with its readout tasks must be connected via their trigger bus Only one trigger module must be 66 Version 4 3 October 28 2003
42. the same node A PAW executable can be created with only one of the two clients integrated For more information see the extensive in line documentation in the template Fortran files in cern goopaw new If the non PAW client is invoked repeatedly the HBOOK data structures are initialized each time thus loosing their previous contents In case of the PAW clients by default the HBOOK data structures are initialized only once so that all events received from all client invocations are accumulated However optionally the data structures may be initialized also for each call of the client see 9 9 page 99 9 8 1 PAW as Client for the Event Server in AIX Having prepared the four Fortran user interfaces uastartc f uanal4 f uastop f and ucinfo f optionally in new version only in your local directory PAW clients using shared memory will be created and invoked with make f cern goopaw goopawshr make goopawshr Version 4 3 October 28 2003 97 GSI Multi Branch Svstem User Manual Event Serving and Filtering whereas PAW clients using private memorv are built and invoked bv make f cern goopaw goopaw make goopaw The client will be invoked in both cases with the PAW command PAW gt gsi goocli input lt argument list gt For the argument list see 9 9 page 99 the AIX man page goocli or the on line help information available with PAW 2 help gsi goocli in the same wav ason VMS 9 8 2 Writing to Shared Memory outside PAW
43. trig mod start task m read cam slav m read cam slav Contents of procedure to start environment on CVC in crate 2 start task m util load setup setup usf crate nr 2 clear daq counter disable cvc cam irq Set trig mod slave start task m read cam slav m read cam slav Contents of procedure to start environment on E7 in VME crate Start task m util load setup setup usf clear daq counter Start task m collector Start task m transport Since there is no way for CVOs to read their crate number from the hardware it must be written into the setup segment by passing the crate number as parameter in the 1oad setup command crate nr 1 2 on the slave controllers One trigger module must be declared as master The SET TRIG MOD sets it per default as master with the qualifier SLAVE it is set as slave The START ACQUISITION command must be executed on the controller which controls the master trigger module The interrupt controller on the CVCs has to be disabled for CAMAC LAMs with DISABLE CVC_CAM_IRQ since the slave readout tasks work in the fast polling mode Note that the same executeables m read cam slave are started on the CVCs and that the setup file loaded is the same for all 3 processors On the E7 the master readout task is not started because no crate has to be read by the branch master but if needed this could also be configured easily 6 7 3 Running a System with AEB Slave Processors In this example again an VME
44. 003 Readout Tasks Chapter 6 Readout Control GMC MBS READ 6 1 Readout Tasks je si 5 O a O a a a at 1 D Buffer Readout Tasks Collector Task Figure 6 1 Branch and Pipes All hardware modules in a MBS system are read by the tasks m read and or m read cam slav Version 4 3 October 28 2003 47 GSI Multi Branch Svstem User Manual Readout Control and or m read aeb slave The m_read_meb task runs on the branch master controller and reads possibly its local and or its remote crates equipped with non intelligent controllers CAMAC CBV FASTBUS SMI m read meb runs on CVC CAMAC and VME m read cam slav runs only on CVCs acting as intelligent CAMAC slave controllers and it reads only its local crate m read aeb slave runs only on AEBs acting as intelligent FASTBUS slave controllers and it reads only its local crate All readout tasks decribed above write their data into subevent pipes For each crate a subevent with a GSI subevent header is written into the pipe s The subevent pipes may reside locally in the controller memory but they could also be placed into a remote memory module which is accessable in an address mapped mode The pipes are read formatted into events into GSI buffers by the collector task which runs on the branch master All readout tasks need a corresponding GSI trigger module to start the event readout m_read_meb may be triggered
45. 1 Input to a MBS component prompt e g m util The program must have been started stand alone on shell level e g by alias util util m util command 2 Input to the MBS dispatcher mbs gt An MBS environment and the appropriate task must have been created mbs is an alias for m dispatch mbs mbs gt command mbs task command Normally a command is executed in exactly one task If it is defined in several tasks the task name must be specified in front of the command followed by gt 3 Input to the MBS prompter See next chapter 22 Version 4 3 October 28 2003 Local Environment 4 In the shell The MBS command must be preceded bv the alias of the component e g util or mbs The first case is equivalent to 1 the second to 2 It is possible to use shell variables in the command line util lt command gt I execute one utilitv command mbs lt command gt Excute one MBS command send node command Excute one remote MBS command 4 3 Arguments and Qualifiers The arguments can be written as positional values or by name reference All keywords may be abbreviated Required arguments are prompted Positional arguments are delimited by spaces String arguments containing delimiters must be enclosed in quotes string Integer arguments can be entered in decimal hexadecimal 0xn octal On or bit Bn format The arguments have names and may be specified in any order by name val
46. 3 PAW gt idle 1 h pl 1 u h pl 2 u h pl u The global section on VMS is permanent If it is no longer needed remove it with the DCL command delgs section You can get a list of your global sections with DCL command ssec To change the size of your global section it must be deleted first and then created again 9 8 PAW Clients on AIX The first command should be cernlogin to setup all definitions needed to use PAW and to specify the version of the CERN software to be used As mentioned above on AIX three clients are available A non PAW client using shared memory a PAW client using shared memory and a PAW client using private memory All modules you need to create an AIX client are available in the directories cern goopaw or for the new client software version cern goopawnew The following templates and make files are needed for the three types of clients Non PAW client collecting data in shared memory gooshr make make file uastarts f called at the begin of input uanal4 f template program for the analysis of events uastop f called at the end of input uclinfo f returns current statistics PAW client collecting data in shared memorv goopawshr make make file uastartc f called at the begin of input uanal4 f template program for the analysis of events uastop f called at the end of input uclinfo f returns current statistics 96 Version 4 3 October 28 2003 PAW Clients on AIX
47. 4 7 ENABLE DISABLE IRQ 160 14 14 8 ENABLE DISABLE TRIG MOD 160 I4 4 9 LOAD MESSE URS tanini e 2 Ban I terme vr a 160 4 1 oStream Server ugue puedes eae dran o tbe idee 160 14 15 1 Synchronous 160 14 15 2 Asynchronous 4 160 Conditional Keep 2303 2 SE DE rich Q AS ee XE SA 160 Scaled Keep siege wx Res EAR a ES ISO EM 160 14 16 Transport S rVer 20 24 eise x fom box ee 161 Help tra joe on tae ste ewe Den ke ie bond DEM 161 15 Glossarv 163 Index i Version 0 0 October 28 2003 vii
48. 55 14 10Command Interface Syntax 155 14 11Distributed Environment 155 14 11 1 Remote Commands 155 14 11 2 Remote Tasks oc xm a RO B A 156 14 120bsolete Commands 156 14 12 1 SET MAXCLIENTS EVENT SERV 156 14 12 2SET STREAM il k tn ee uod eec ex aot biz rear Rowe 156 14 12 3 SET MAXCLIENTS EVENT SERV 156 14 13Changed Commands 156 14 13 1 Start Dispatcher 156 14 13 2 START EVENT SERV 157 14 13 3 ENABLE 5 157 IAA SAE SEO Pesce a ae a toe Meh ee ART Be d ERES 157 TAVIS 5 TE PASE ES ay guna pay Soga Guy yr Ee E pe S 157 1413 OS FOP TASK zi PA ave 2 be hear ee Pere Pat bee eS 158 14 JANew Commands ba ed a a en A i SH 158 14 14 1 REMOTE ACCESS 158 vi Version 4 3 October 28 2003 14 14 32 REMOTE SHOW is 2 28 gol a a sn ae 158 1414 3 REMOTE RESET cars suasana g arusa k w a a aaa AR RO 158 14 14 45 EVENT SERV 159 14 14 5 SET STREAM SERV 159 14 14 6 ENABLE DISABLE EVENT COPV 159 14 1
49. 620 0 l procid 20 0102411 2 715 l mask 7 offset 15 LW Copy and Event Filter Event filter is like before but copy filter selects only subevents with procid 10 or 20 copy filter subset 2 subset with 2 lines 1123456 7 89 argument numbers 001100 16 100 procid 10 00110016200 procid 20 event filter subset 1 2 subset with 2 lines 1123456789 argument numbers 104 Version 4 3 October 28 2003 110101130 110101170 event filter subset 2 N 123456 01011116 20 O 010411 Version 4 3 October 28 2003 1 O Trigger Trigger II SQ subset with 2 lines argument numbers procid 20 mask 7 offset 15 LW PAW Clients on AIX 105 GSI Multi Branch Svstem User Manual Histogramming 9 11 General Purpose Event I O Librarv GMC_MBS_EVT To extract data from the acquisition system and write GSI standard buffers there is a set of routines available on all GSI platforms VMS AIX DECunix Lynx The routines are for open close event input output streams Input could be an MBS transport MBS stream server or a file Output can be a file Several input and output channels may be open at the same time Then each call of f_getevt_get gets an event whereas f_putevt_put writes an event The event interpretation formatting is up to the caller Events for output must however have at least the two longwords standard GSI header see 8 2 6 page 81 The formatting of the buffer is done b
50. B m_event_serv m_event_serv Starts m event serv START MESSAGE m dispatch m dispatch Starts the message logger START OUTPUT m to m to starts time sorting and event output START RIRECEIVER m rirec m rirec Enables data receive of a rirec node START TASK task file m dispatch m dispatch Starts task STOP ACQUISITION m util m util Stops acquisition STOP ARECEIVER m ar m_ar Disables data receive of a ar node STOP OUTPUT m_to m_to stops time sorting and event output STOP RIRECEIVER m_rirec m_rirec Disables data receive of a rirec node STOP TASK task pid ALL KILL ZOMBIE m_dispatch m_dispatch Stops task by sending command exit TYPE EVENT events id SAMPLE VERBOSE m_transport m_transport Prints events VOID m_daq rate m daq rate place holder do not execute 150 Version 4 3 October 28 2003 Release Notes WRITE SMI BROADCAST type data CONTROL DATA m smi m smi Writes to FastBus Module WRITE SMI MODULE gad sad data CONTROL DATA m smi m smi Writes to FastBus Module WRITE SMI NTA sad m smi m smi Writes secondary address to an FastBus slave WRITE SMI SEQUENCER address word table m smi m smi Write SMI seqencer instruction word WRITE SMI SLAVE data m smi m smi FastBus write to an attached slave XSHELL command al a2 a3 a4 m dispatch m dispatch Executes shell command line Version
51. B ASY FLG COL MODE ML PIPE BASE ADDR ML PIPE SEG LEN ML_PIPE_LEN N_COL_RETRY MEB_TRIG_MODE ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo 16 ULo ULo 16 ULo 16 ULo ULo ULo ULo ULo ULo ULo SPECIAL MEB TRIG TYPE ULo SPECIAL MEB TRIG BASE TRIG STAT NR TRIG FCT TRIG_CVT CVC_IRQ CVC_IRQ_LEN CVC_IRQ_SOURCE_OFF ULo 16 ULo 16 ULo 16 ULo ULo ULo Version 4 3 October 28 2003 Profile Definitions 75 GSI Multi Branch Svstem User Manual Data Structures CVC IRQ MASK OFF EV_BUF_LEN ULo N_EV_BUF ULo N_STREAM ULo EVT_TYP_SY ULo EVT_TYP_ASY ULo EVt_SUBTYP_SY ULo EVT_SUBTYP_ASY ULo SE_TYP ULo 16 SE_SUBTYP ULo 16 SE_CONTROL ULo SE_PROCID ULo 16 8 1 2 Multi Branch Setup File The multi branch setup parser definition file is MBSROOT set set_ml pdf A detailed description will be found in 7 2 page 67 Template setup files are in the directories in mbs prod exa N Kurz 10 Jan 1996 parser definition file pdf for multi layer multi branch daq system ML SETUP HOSTNAME Co 16 RD HOSTNAME 0 Co 16 RD HOSTNAME 1 Co 16 RD
52. BS prompt output from MBS starts with CVC40 All other lines are output from shell commands Besides that it is the output of a running svstem but it is not ment to be replaved CVC40 gt Initialize CVC40 gt inimbs created and initalized daq status segment Clear communication paths CVC40 gt msg_new message file dev msg removed command file dev com removed Creating new message file dev msg Creating new command file dev com start mbs CVC40 gt mbs mbs gt Ostartup CVC40 msg log 09 May 95 19 08 15 Message logger running CVC40 util task m_util started CVC40 util setup file setup usf successfully loaded CVC40 read task m read started CVC40 read meb load master readout file read mrf CVC40 read meb trigger 1 Setup file init urf CVC40 read meb trigger 1 Setup file read urf CVC40 read meb trigger 14 Setup file readi4 urf CVC40 read meb trigger 15 setup file readi5 urf CVC40 read meb CNAF table successfully loaded CVC40 collector task m collector started CVC40 transport task m transport started event server was not started in command file mbs sta t m event serv CVC40 event ser task m event serv started Enable by START EVENT SERV mbs gt sta event CVC40 event_ser Using fixed port 6003 CVC40 event ser Setup Buf str 1 1 M_evt_pstr ALL str _ 1 3 Reg_ser OFF Version 4 3 October 28 2003 41 GSI Multi Branch Svstem User Manual Running a Data A
53. DE CREATE CONDITION POLVGON CREATE CONDITION WINDOW CONNECT CONNECT DISPATCHER CONNECT TRANSPORT COUNTER CLEAR DAQ STATUS COUNTER CREATE CREATE BASE CREATE CONDITION INCLUDE CREATE CONDITION POLVGON CREATE CONDITION WINDOW CREATE FILES Version 4 3 October 28 2003 MBS keywords 125 GSI Multi Branch Svstem User Manual Kevword Summarv CREATE HISTOGRAM CREATE POLVGON CREATE WINDOW CVC CAM IRQ DISABLE CVC CAM IRQ ENABLE CVC CAM IRQ CVC_IRQ MASK DAQ STATUS CLEAR DAQ STATUS COUNTER CLEAR DAQ STATUS PROCTAB CLEAR DAQ STATUS STATUS DEFINE DEFINE COMMANDS DELAYED EB DISABLE DELAYED_EB ENABLE DELAVED EB DELETE DELETE BASE DELETE HISTOGRAM DEL EB COL DISABLE DEL EB COL 126 Version 4 3 October 28 2003 MBS keywords ENABLE DEL EB COL DETACH DETACH BASE DISABLE DISABLE CVC CAM IRQ DISABLE DELAYED_EB DISABLE DEL EB COL DISABLE EVENT COPV DISABLE HISTOGRAM DISABLE RECEIVE DATA DISABLE TCP DISABLE TRIG MOD DISCONNECT DISCONNECT DISPATCHER DISCONNECT TRANSPORT DISMOUNT DISMOUNT TAPE DISPATCHER CONNECT DISPATCHER DISCONNECT DISPATCHER SET DISPATCHER SET VERBOSE DISPATCHER DR FLUSHTIME SET DR FLUSHTIME Version 4 3 October 28 2003 127 GSI Multi Branch Svstem User Manual Kevword Summarv DUMP DUMP BASE DUMP HISTOGRAM DUMP WINDOW ENABLE ENABLE CVC_CAM_IRQ ENABLE DELAVED EB ENABLE DEL EB COL ENABLE EVENT COPV ENABLE HISTOGRAM
54. DULE MOUNT MOUNT TAPE Version 4 3 October 28 2003 MBS keywords 131 GSI Multi Branch Svstem User Manual Kevword Summarv MO SETUP LOAD MO SETUP NEWS NEWS NODES NTA WRITE SMI NTA OPEN OPEN FILE OUTPUT START OUTPUT STOP OUTPUT PEDESTAL LOAD SMI PEDESTAL READ SMI PEDESTAL PIPES CLEAR PIPES 132 Version 4 3 October 28 2003 POLVGON CLEAR POLVGON CREATE CONDITION POLVGON CREATE POLVGON RESTORE POLVGON PRINT SET PRINT ESONE SERV PROCTAB CLEAR DAQ STATUS PROCTAB PROMPT SET VERBOSE PROMPT PROTECT PROTECT HISTOGRAM PSHELL PSHELL RATE READ READ SMI BROADCAST READ SMI MODULE Version 4 3 October 28 2003 MBS_keywords 133 GSI Multi Branch Svstem User Manual Kevword Summarv READ SMI PEDESTAL READ SMI SEQUENCER READ SMI SLAVE READ SMI TPSCAN READOUT LOAD READOUT RECEIVE DATA DISABLE RECEIVE DATA ENABLE RECEIVE DATA RELEASE RELEASE SMI FASTBUS REMOTE REMOTE ACCESS REMOTE RESET REMOTE SHOW REMOVE REMOVE SEGMENTS RESET REMOTE RESET RESET RESTART 134 Version 4 3 October 28 2003 RESTART SMI SEQUENCER RESTORE RESTORE BASE RESTORE POLVGON RESTORE WINDOW RIRECEIVER SET RIRECEIVER FLUSHTIME START RIRECEIVER STOP RIRECEIVER SEGMENTS REMOVE SEGMENTS SEQUENCER READ SMI SEQUENCER RESTART SMI SEQUENCER WRITE SMI SEQUENCER SET SET ARECEIVER FLUSHTIME SET DISPATCHER SET DR FLUSHTIME
55. EATE DELETE DUMP SHOW CLEAR HISTOGRAM The histograms are allocated in a shared segment The segment must be created first by command CREATE MEMORY Other com mands are SHOW MEMORY and DELETE MEMORY The user may write an analysis function which is linked with the collector Templates and macros to accumulate histograms are provided The histograms can be dumped in GSI standard ASCII files and imported into GOOSY or PAW for further processing A detailed description is in 10 page 107 5 4 2 Data Channels from MBS As can be seen in figure 5 1 page 36 there are many channels to get data out of the MBS The Connections and Servers Server Figure 5 1 Connections and Servers GSI standard analysis programs GOOSY and PAW can get events from the event server the remote event server or the GOOSY PAW server without changes Which path to use depends on the requirements concerning the monitoring data rate the DAQ data rate and sampling and filtering We discuss here some examples 36 Version 4 3 October 28 2003 Data Channels GOOSY without Filters One should use the GOOSY transport manager TMR and connect GOOSY analysis programs in a standard way The TMR may connect to the MBS stream server and then get samples controlled by the stream server mode Or it may connect to the MBS transport server getting all data In both cases it is recommended to synchronize TMR and analysis by command SET ACQUIS SYNC This setting does not a
56. ENABLE IRQ ENABLE RECEIVE DATA ENABLE TCP ENABLE TRIG MOD ENVIRONMENT ESONE SERV SET MAXCLIENTS ESONE SERV SET PRINT ESONE SERV SET VERBOSE ESONE SERV EVENT TYPE EVENT EVENT COPY DISABLE EVENT COPY ENABLE EVENT COPY 128 Version 4 3 October 28 2003 EVENT SERV SET EVENT SERV SET MAXCLIENTS EVENT SERV SET VERBOSE EVENT SERV START EVENT SERV FASTBUS CLEAR SMI FASTBUS INITTALIZE SMI FASTBUS RELEASE SMI FASTBUS FILE CAMAC FILE CLOSE FILE OPEN FILE FILEHEADER SET FILEHEADER FILES CREATE FILES FLUSHTIME SET ARECEIVER FLUSHTIME SET FLUSHTIME SET RIRECEIVER FLUSHTIME SET TORECEIVER FLUSHTIME Version 4 3 October 28 2003 MBS keywords 129 GSI Multi Branch Svstem User Manual Kevword Summarv GLOBAL SET VERBOSE GLOBAL HELP HELP HISTOGRAM CLEAR HISTOGRAM CREATE HISTOGRAM DELETE HISTOGRAM DISABLE HISTOGRAM DUMP HISTOGRAM ENABLE HISTOGRAM PROTECT HISTOGRAM SET HISTOGRAM CHANNEL SET HISTOGRAM TEXT SET VERBOSE HISTOGRAM INCLUDE CREATE CONDITION INCLUDE INITIALIZE INITIALIZE SMI FASTBUS INITIALIZE TAPE INPUT IRQ 130 Version 4 3 October 28 2003 ENABLE IRQ LOAD LOAD ML SETUP LOAD MO SETUP LOAD READOUT LOAD SETUP LOAD SLAVE_READOUT LOAD SMI PEDESTAL LOAD SMI THRESHOLD MAXCLIENTS SET MAXCLIENTS ESONE SERV SET MAXCLIENTS EVENT SERV MESSAGE START MESSAGE ML SETUP LOAD ML SETUP MODULE READ SMI MODULE WRITE SMI MO
57. ENT m esone serv m esone serv Shows status of m esone serv SHOW EVENT SERV FULL LOG CLIENT m event serv m event serv Shows status of m event serv SHOW HISTOGRAM name loffset Ichannels 2offset 2channels DATA FULL m histogram m_histogram Shows histogram info and content SHOW INPUT NODES m to m to show input nodes connected via tcp sockets SHOW MESSAGE m dispatch m dispatch Shows status of internal message file SHOW ML SETUP m util m util Shows multilayer setup parameters SHOW POLYGON name DATA m collector m collector Show polygon conditions SHOW RATE seconds OFF ON m util m util Shows acquisition rate SHOW SETUP m util m util Shows setup parameters SHOW STATUS m util m util Shows daqst parameters SHOW STREAM SERV CLEAR m stream serv m stream serv Shows modes and counters SHOW TAPE tape m transport m transport Shows tape information SHOW TASK task FULL ALL m dispatch m dispatch Shows known tasks Version 4 3 October 28 2003 149 GSI Multi Branch Svstem User Manual Command Summarv SHOW TRIG MOD m util m util Shows current setup of trigger module SHOW WINDOW name m collector m collector Show window conditions START ACQUISITION m util m util Starts acquisition START ARECEIVER m ar m ar Enables data receive of a ar node START EVENT SERV scale events maxclnt JINOJPORTS VER
58. Example Multi Layer Multi Branch Setup In this example a running test setup of a multi layer multi branch system will be shown It consists of 3 branches with CVC38 CVC97 and CVC99 as branch masters layer 0 In the above layer 1 E6 4 collects the pipe from CVC38 and writes it into an output pipe E7_1 also in layer 1 collects the pipes from CVC97 and CVC99 and writes an output pipe It also formats events into GSI buffers for taping and on line monitoring E7_2 in the event builder layer 2 collects the pipes from E6 4 and E7_1 and formats events into GSI buffers for taping and on line monitoring For the three processors in layers 1 and 2 ML_SETUP parameters must be provided and are shown below N Kurz user setup file usf for setting up the multi layer multi branch daq system see also parser definition file pdf FEK ok sk sk sk sk 5k sk ok ok ok ok ok ok ok ok ok ok ok ok AAAI K K K K K K CI II I I I Ik K K 2k 2k 2k 2k layer 1 ML SETUP HOSTNAME E6 4 RD HOSTNAME 0 CVCS8 RD HOST FLG 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SBS SETUP PATH 0 daq usr kurz mbstest m19 cam1 setup usf RD PIPE BASE ADDR 0xf0200000 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 OUT_MODE 1 70 Version 4 3 October 28 2003 PIPE BASE ADDR WR PIPE LEN WR PIPE N FRAG layer 1 ML SETUP HOSTNAME RD HOSTNAME 0 RD HOSTNAME 1 RD HOST FLG
59. GOOSY transport manager Analysis programs may get data from there in a standard way The buffersize must match the MBS buffersize default is 16K The number of buffers in the TMR must be greater equal then the number of buffers in one stream Disconnect Disconnect from stream server or transport by DISCONNECT STREAM TRANS The GOOSY acqui sition is stopped automatically 9 5 2 GOOSY Analysis Standard GOOSY analysis programs can get event buffers from an MBS event server by GOOSY command START INPUT EVENT The analysis then gets data via TCP START INPUT EVENT lt node gt PORT lt port gt STOP INPUT EVENT where node and port are specific The event server port is 6003 A more detailed description of the event filtering can be found in chapter 9 page 87 It is the same as for the GOOSY PAW server The event server must run and be enabled by MBS command START EVENT_SERV 92 Version 4 3 October 28 2003 PAW Clients on VMS GMC MBS PAW 9 6 PAW On line Analysis The following informations can also be obtained in the WWW at http www gsi de computing expdv event html To solve the conflict between the needs for a stable version and the permanent requirements for new functions there are two versions availabe for the remote event servers and the clients 1 a new version which may be subject of changes due to functional enhancements and 2 a production version which is frozen but may be replaced a very few times per ye
60. K K FK FK FK ku K K K ok tu tubu tu utu 2K K K K 72 Version 4 3 October 28 2003 Profile Definitions Chapter 8 Data Structures GMC_MBS_DATA 8 1 Profile Definitions A profile consists of text lines qualified by a facility name Lines can be continued by a hyphen at the end Each line specifies parameters and their data types defined for the facility A parameter is defined by a name and a data type The facility is followed by a colon parameter specifications are separated by commas A parser definition file looks like this facility parameter type parameter type facility parameter type parameter type parameter type parameter type The type specification allows for integer 1 unsigned integer ul float f character c arrays dim For integers a range may be specified by low high Parameters may be specified as optional by appending an o to the type i e faci key1 1 5 key2 f key3 1 6 10 key4 co 20 A data file must follow the specifications of a parser definition file It looks then very similar the type specification replaced by values facility parameter value parameter value facility parameter value parameter value parameter value parameter value Example Version 4 3 October 28 2003 73 GSI Multi Branch Svstem User Manual Data Structures Currentiv there are three parser definition files For single branch setup profiles for multi branch setup pr
61. LE HISTOGRAM The qualifer EVENTCOPY is obsolete There two new commands ENABLE DISABLE EVENT_COPY 14 13 4 ENABLE TCP The qualifer INCLUSIVE is now default There is a new qualifier EXCLUSIVE 14 13 5 START TASK The path of a task can now be specified together with the program SBS old SBS START TASK m read meb Mydir m read meb MBS new MBS START TASK Mydir m read meb Note that the quotes are no longer needed Version 4 3 October 28 2003 157 GSI Multi Branch Svstem User Manual Release Notes 14 13 6 STOP TASK This command now has new qualifiers for a better task control STOP TASK task pid ALL KILL ZOMBIE task Task program name pid Optional pid used with KILL if task not known ALL Stop all known tasks except message logger KILL Stop task by calling kill function with signal SIGTERM ZOMBIE Remove status blocks of terminated tasks to let them die Z to RIP 14 14 New Commands 14 14 1 REMOTE ACCESS This command sets the list of nodes which are allowed to send commands to a prompter prompt gt REMOTE ACCESS node list If no node list is specified no more command clients can connect 14 14 2 REMOTE SHOW Besides the new commands of the prompter to control remote dispatchers there are two new commands to get information of remote nodes and to cleanup remote nodes prompt gt REMOTE SHOW ALL TASKS DAQ NET prompt REMOTE SHOW LOCAL prompt gt REMOTE
62. MuBSY Id INTRO Version 4 3 Date October 28 2003 Revised October 28 2003 M ulti B ranch S ystem GSI Multi Branch System User Manual H G Essel N Kurz October 28 2003 GSI Gesellschaft f r Schwerionenforschung mbH Planckstrafe 1 D 64291 Darmstadt Germanv Tel 0 6159 71 0 List of Figures 2 1 3 1 3 2 4 1 4 2 5 1 6 1 6 2 7 1 10 1 10 2 10 3 10 4 Environment Tasks uou punk een Deu X Me woa 9 Hardware Configuration with 19 Hardware Configuration with 20 Local Commands and Messages 22 Local and Remote Commands and 27 Connections and Servers 36 Branch aid ie a Er Weg Eie ni e T 2 47 Buffers and Streams 49 Layer Str etute 4 2 2 22 2 en Me ee ar 66 Histogram Access one Base 108 Histogram Access two Bases 109 Histogram Data Base 5 110 On line Analysis Flow Chart 113 Version 4 3 October 28 2003 1 Version 4 3 October 28 2003 MBS Copv Right Chapter 1 Preface GMC EDIT GOOSY Copyright The GOOSY software package has been developed at GSI for scientific applications Any distribu tion or usage of GOOSY without per
63. Multi Laver Multi Branch Setup Specification designated as the master trigger module If an MBS svstem should be split into sub svstems for testing purposes the trigger bus must also be split The new commands ENABLE TRIG MOD and DISABLE TRIG MOD allow for keeping or removing trigger modules logically from the trigger system even when the cabling remains unchanged This doesn t help of course in the case mentioned above if systems are split or combined In this cases the trigger bus cabling has to be appropriately adjusted To set up a multi layer multi branch system the user has to provide the setups for all single branches in the standard way Each node above layer 0 requires an additional setup facility This is described in the next section 7 2 Multi Layer Multi Branch Setup Specification The parameters for a multi layer multi branch system are specified in one additional setup file i e set usf For each node in the system this file must contain the setup facility ML SETUP It is loaded during an early phase in the startup of a system with the command LOAD ML SETUP 7 2 1 Setup File Parameters Now follows the description of the ML SETUP parameters The syntax is found in 8 1 2 page 76 HOSTNAME string 15 useable chars Simply the network node name of this processor RD HOSTNAME 0 RD HOSTNAME 15 array of strings 15 useable chars each Network names of hosts where a pipe has to be collected from This must be filled con
64. October 28 2003 B dk db dt HH List Mode Data Structures task Optional task name to show commands FULL Commands with arguments ALL All commands with arguments 2 kk kk kk Function Show all known commands including the commands of inactive tasks by ALL Routine f_disp_sho_cmd Task m_dispatch 1 gt K gt k gt k gt k gt k ak gt k sk 3k 3K 3K 3K 5k 5k 3K 5k KK KK 3K 3K 3K K K K K K K ACA ACA I K KK K K KR K K KK K K K OR R K K _dispatch SHOW COMMANDS task co 16 FULL ALL Version 4 3 October 28 2003 85 GSI Multi Branch Svstem User Manual Event Serving and Filtering 86 Version 4 3 October 28 2003 Event Servers Chapter 9 Event Serving and Filtering GMC_MBS_EVSERV 9 1 Stream Server There is a new version of the MBS stream server It provides several operation modes for best performance in different setups In all modes the scale factor controls the DAQ performance The default mode after startup is same as by following command mbs gt set stream server scale 2 NOSYNC NOKEEP This means for every 2nd stream the server checks if a client requested a stream 9 1 1 Synchronous Mode The new synchronized mode is enabled by switch SYNC mbs gt set stream server scale lt n gt SYNC This means for every nth stream the server waits for the client s request of cause onl
65. S SMI name address m smi m smi Opens a shared segment to access smi ATTACH BASE name m_histogram m_histogram Attaches existing histogram data base CAMAC CNAF cnaf dr LOG NOPRINT m esone serv m esone serv Executes local CAMAC cnaf CAMAC FILE filenam LOG NOPRINT m esone serv m esone serv Executes local CAMAC cnaf CLEAR DAQ STATUS COUNTER m util m util Clears status counters in the global daq status segment CLEAR DAQ STATUS PROCTAB m util m util Clears daq process table in the global daq status seg ment CLEAR DAQ STATUS STATUS m util m util Clears daq status bits in the global daq status segment CLEAR HISTOGRAM name m histogram m histogram Clears histogram CLEAR PIPES m read meb m read meb Clears the subevent pipes queue CLEAR POLYGON name m_collector m_collector Clear polygon condition counters CLEAR SMI FASTBUS m smi m smi Removes all SMI signal assertion to Fastbus Version 4 3 October 28 2003 141 GSI Multi Branch Svstem User Manual Command Summarv CLEAR TRIG MOD m util m util Resets the trigger module CLEAR WINDOW name m collector m collector Clear window condition counters CLOSE FILE tape m transport m transport Closes file CNAF cnaf d r m camac m_camac Executes local CAMAC cnaf COMMENT line ERROR INFO COMMAND m dispatch m dispatch Writes line to log file CONNECT DISPATCHER node ALL m_prompt
66. SLAVE START START ACQUISITION START ARECEIVER START EVENT_SERV Version 4 3 October 28 2003 137 GSI Multi Branch Svstem User Manual Kevword Summarv START MESSAGE START OUTPUT START RIRECEIVER START TASK STATUS CLEAR DAQ STATUS STATUS STOP STOP ACQUISITION STOP ARECEIVER STOP OUTPUT STOP RIRECEIVER STOP TASK STREAM SERV SET STREAM SERV TAPE DISMOUNT TAPE INITIALIZE TAPE MOUNT TAPE TASK SET TASK START TASK STOP TASK TCP DISABLE TCP 138 Version 4 3 October 28 2003 ENABLE TCP TEXT SET HISTOGRAM TEXT THRESHOLD LOAD SMI THRESHOLD TORECEIVER SET TORECEIVER FLUSHTIME TPSCAN READ SMI TPSCAN TRANSPORT CONNECT TRANSPORT DISCONNECT TRANSPORT TRIG MOD CLEAR TRIG MOD DISABLE TRIG MOD ENABLE TRIG MOD SET TRIG MOD TVPE TVPE EVENT Version 4 3 October 28 2003 MBS keywords 139 GSI Multi Branch Svstem User Manual Command Summarv VERBOSE SET VERBOSE DISPATCHER SET VERBOSE ESONE SERV SET VERBOSE EVENT SERV SET VERBOSE GLOBAL SET VERBOSE HISTOGRAM SET VERBOSE PROMPT VOID VOID WINDOW CLEAR WINDOW CREATE CONDITION WINDOW CREATE WINDOW DUMP WINDOW RESTORE WINDOW SET WINDOW WRITE WRITE SMI BROADCAST WRITE SMI MODULE WRITE SMI NTA WRITE SMI SEQUENCER WRITE SMI SLAVE XDISPLAY SET XDISPLAY XSHELL XSHELL SLAVE 140 Version 4 3 October 28 2003 Command Summarv Chapter 13 Command Summarv ACCES
67. Slave Processors 6 3 1 6 5 1 6 6 1 6 7 1 Version 4 3 October 28 2003 Contents ili GSI Multi Branch Svstem User Manual 7 Multi Laver Multi Branch Svstems 65 dl Intr ductiota 2x eG ele ja maa eur be Da ES 65 7 2 Multi Layer Multi Branch Setup Specification 67 7 2 1 Setup File Parameters 67 7 3 Example Multi Branch 69 7 4 Example Multi Layer Multi Branch Setup 70 8 Data Structures 73 8 1 Profile Definitions 73 8 1 1 Single Branch Setup File 74 8 1 2 Multi Branch Setup 16 81 3 Readout T bl s 4 deg een o e v PC 77 8 2 List Mode Data Structures 79 6 21 Glossary i upa et hs vg EROS L A but ee trek eh 79 89 22 Byte u tic toe ede dam Zh Del tere d eti s 79 822592 Butlers L 2 ae el a oe ET 80 8 24 Buffer Pules 3 0 N ERU Ex 80 8 2 5 GSI File Header Buffer 80 8 2 6 GSI Buffer Element 81 8 2 1 vGsLBuller aS eI bU ER EA SS EM 82 Event Spannings ar Q a bao nce D Lene ga kage 82 8 2 8 Streams and Buffers 82 8 2 9 Event Structures
68. _gethist CHARS pc_node CHARS pc_basename CHARS pc_hisname CHARS ppc_buf INTS4 pl_buflen Get histogram data from histogram server f_his_getdir CHARS pc_node CHARS pc_basename CHARS ppc_buf INTS4 pl buflen Get histogram list in a base from histogram server 116 Version 4 3 October 28 2003 Chapter 11 Esone Clients ESONE Librarv GMC MBS ESONE 11 1 Esone Clients The libraries to build ESONE clients are VMS TOOL LIB ESONECLI OLB AIX usr local GSI AIX lib libesonecli a DECunix usr local GSI AXP lib libesonecli a Lynx mbs prod esone lib libesonecli a On all UNIX platforms descriptions are available via help On VMS a help library is on TOOL LIB ESONE HLB The routines are described in the MBS reference manual A brief de scription follows here cccc cccd ccci CCCZ ccopen cdreg int cccc long EXT generate dataway clear int cccd long EXT int L Enable or Disable Crate Demand int ccci long EXT int L Set or clear Datawav inhibit int cccz long EXT generate datawav initialize int ccopen char HOSTNAME long HOSTADD Enable or Disable Crate Demand int cdreg long EXT long B int C int N int A Declare CAMAC register Version 4 3 October 28 2003 117 GSI Multi Branch Svstem User Manual ESONE Librarv cerror cfga cfmad cfsa cfubc cfubr cgreg csga csmad cssa csubc csubr ctcd 118 char cerror int ERROR int FLAG Simple
69. a e rettet ety Ne SO unt BS 11 2 90 ColleetoE G i te eae T le Sls esce ae Be duo hae 11 2 9 6 Transport ume om o md A S s e eR ee 11 2 5 Event Server uen A L a GA U 12 2 5 8 Stream Servera 22428058025 Re Rok E e X s d REO Ro Roe 12 2 5 9 Server u zs bL s RR OR RE RUE ERO REOR 12 2 5 10 Histogram Manager 12 DILL inii cM uc oe Oh a an g u ta T 12 2 6 Standalone Programs 12 2 7 Software Organisation 13 241 File Organisation 4 Re eo D uu ES ara ns 13 Version 4 3 October 28 2003 i GSI Multi Branch Svstem User Manual Production and Development 13 Directories usa AL ave OS S Oe US e le a ae dex b SUS S S 14 2 7 2 Naming 14 Eile N Ames Z Sur us hed cS an A E M Mae sat Ar td 14 Environment 14 2 3 Profile Interface 225 82 ugut ie Oo gsx Rp 15 3 Hardware 17 3 1 Single Branch Systems 17 3 2 Single Branch Hardware Setup Examples 18 3 2 1 One VSB Branch 2 G i dee ay ee ipoh duy 18 3 222 One V ME Branch sira g don ee Fa verc RO RR ex 19 3 3 Per
70. a from MBS buffer streams 9 4 Remote Event Server The remote event server connects as client to a Stream Server running on the front end and receives on request complete buffer streams from there A buffer stream consists of a number of buffers with events acquired with the MBS system Depending on the parameters specified for the remote event server and on the filter conditions valid for the clients some or all events received from the stream server are passed over the network to connected Event Clients On Alpha VMS workstation after execution of the command TOOLLOGIN two symbols concerning the Remote Event Server are set 1 REVSERVER the command for invocation and 2 REVSERVNEW the command to switch to the new version Default is the production version On AIX workstations the executables are available in 1 usr local bin revserver production version and 2 usr local bin revservnew new version 9 4 1 Parameters Starting the remote event server there are ten parameters available The first two are required and specify node name and port number of the stream server whereas the other parameters are optional All parameters in detail 1 node the node name of the front end running the data acquisition 2 port no the port number of the stream server on the front end 6002 normally 3 clients the maximum number of event clients connected at a time default 3 4 should be zero default Version 4 3 Octo
71. age logger o Start Stop tasks o Dispatch Commands The components are forked MBS commands are dispatched to the task where the command is executed The dispatcher hibernates until it gets an acknowledge message from the task The tasks executing the command can use the terminal for output but should normally send their output to the message logger see below The dispatcher can be left by commands EXIT or QUIT and restarted It then acknowledges all known tasks Do not leave the dispatcher by CTRL Z This kills all tasks See also 4 2 page 21 2 5 2 Message Logger See figure 2 1 This program m msg log is started automatically when running the dispatcher or prompter It accepts messages and writes them to the log file mbslog 1 and or to the terminal If the message logger is not running all tasks sending messages will wait including the dispatcher When started by the prompter the message logger acts as a message server It then accepts TCP connections from other remote message loggers clients 2 5 3 Prompter This program m_prompt is started by alias prm to control components running in remote envi ronments It can be called only once on a Lynx system It executes the following functions e Start message server e Start remote dispatchers and message loggers clients e Connect disconnect remote dispatchers e Dispatch Commands to remote dispatchers The nodes of the environments to be controlled by the prompter must be
72. am of events All events sent from the stream server on the front end to the Remote Event Server are passed to the client if readv After each 500 received events a notification appears on standardout The server sends a buffer each two seconds PAW 2 gsi goocli input axp605 6003 10000 Connect to a Remote Event Server running on the Alpha VMS node axp605 and request all of the next 10 000 events After each 1 000 events 1096 a notification appears on standardout 9 10 Filters The clients can specifiy event filters to get only events with certain characteristics and or copy filters to get only parts of these events A complete filter set is made out of one copy filter subset and several event filters subsets Each subset is made of several specification lines with nine values each Due to the potential complexity of filters it is recommended to write one filter set specification in one text file In these files there are lines according to the following syntax comment subset 1 number of specification lines n line 1 gt l Nine values for each line line n gt subset 2 number of specification lines m line 1 gt l Nine values for each line line m lisubset SSeS tS 9 10 1 Copy Filter The client may get the whole event that matched the event filter or only parts of such an event as specified by a copy filter This selection is indepen
73. an user interfaces in your local directory the non PAW client program will be created and invoked by the commands goopaw make gooshrcli gooshrcli lt argument list gt For the argument list see 9 9 page 99 or the AIX man page gooshr The client allocates a global section if not already existing containing the HBOOK histograms and Ntuples as booked in uastart and filled in uanal4 You may access these data from any number of standard PAW sessions running on the same host A sample PAW session accessing these data might look as follows PAW gt global section The global section named section is mapped This name must be identical with that used in uastart Caution PAW requires capital letters for the name of the global section The following PAW command sequence executes without change on AIX and VMS PAW gt zone 1 3 PAW gt idle 1 h pl 1 h pl 2 h pl 3 Version 4 3 October 28 2003 95 GSI Multi Branch Svstem User Manual Event Serving and Filtering In this example the displav window is prepared for three displavs The last PAW command idle means that if nothing is typed at the keyboard for 1 second you will see plots of IDs 1 2 3 You can type at any time at the keyboard to interrupt this sequence To stop this sequence type PAW gt idle O If a big number of events is provided vou can see vour histograms growing in time Vou can do this also with overlavs i e PAW gt h pl 1 k h pl 2 h pl
74. and then mounted The initialization and the mount should be done by transport commands MBS gt INIT TAPE lt label gt MBS gt MOUNT TAPE lt label gt The label of the tape is used for the initialization After that the tape file will be opened and started like a disk file Note INIT TAPE deletes all data on the tape The MOUNT TAPE command may take a long time when the tape already contains data files because all files are skipped To dismount the tape issue the MBS commands MBS gt CLOSE FILE MBS gt DISMOUNT TAPE Version 4 3 October 28 2003 33 GSI Multi Branch Svstem User Manual Running a Data Acquisition End of Tape The transport counts the number of buffers and knows the size of the tape Normallv the file is closed before the end of tape is reached When by any reasons the physical end of tape is reached the current file is closed and the tape is dismounted The data acquisition is not stopped Tape Errors When a tape error occurs the tape is marked as dismounted and the file is marked as closed in MBS i e no real tape activities are done and the last file remains open One should remove the tape immediatelv from the drive The last file can be read later up to the end It is not recommended to mount such a tape again for writing 5 3 2 File Output Writing list mode data from Transport to a file must be explicitly started and stopped by com mands The acquisition can be started and stopped without affecting th
75. ar by the current new version There are three different clients available providing the HBOOK data structures in shared memorv in VMS permanent global sections or conventionallv in the user s address space 1 A stand alone non PAW program providing the data in shared memorv 2 A PAW module providing the data in shared memory AIX only and 3 A PAW module providing the data in the user s address space The clients have a Fortran user interface to create and fill HBOOK data structures histograms and Ntuples for further analvsis and visualization with PAW In the last two cases the client is integrated into PAW In case 3 for visualization and further analvsis the HBOOK histograms and Ntuples are accessible onlv in the current PAW session In case of shared memorv usage however the data can be accessed in parallel bv anv number of additional PAW sessions running on the same node as the client Note that case no 2 is not supported on OpenVMS All clients work with the CERN software versions 94a and later Event analysis on the client side is controlled bv user written interface programs in Fortran defined similarlv to those of the APE package uastart create HBOOK histograms and Ntuples uanal4 fill HBOOK histograms and Ntuples uastop user actions before end of analysis uclinfo user statistics routine new version only The following sections describe the clients on OpenVMS and AIX 9 7 PAW Clients on VMS The first command sh
76. arameters are only required if OUT MODE 1 or 3 WR PIPE BASE ADDR Base address of the collector output pipe WR PIPE LEN Size of the collector output pipe in bytes WR_PIPE_N_FRAG Number of fragment slots which will be reserved in the collector output pipe fragment consists of either one or more subevents with its header The next three paramters are only required if OUT MODE 2 or 3 In the case where a processor acts as a branch master and as a multi layer node and event formatting is required there is a clash where to specify the output buffer structure In this case the appropriate values are taken from this ML SETUP facility and NOT from the single branch setup EV BUF LEN Length in bytes of one buffer multiples of 1024 up to 32768 are allowed N_EV_BUF Number of buffers contained in one stream N STREAM Number of streams 68 Version 4 3 October 28 2003 Multi Branch Setup 7 3 Example Multi Branch Setup In this section an example will be shown where 4 single branches are connected together through one processor E7 12 on layer 1 This example is actually the running KAOS experiment setup Event formatting and monitoring is done only on E7_12 The four branches are 1 A CAMAC crate with a CVC27 writing its subevent pipe into local memory 2 A transputer system in FASTBUS read out by E7 16 writing its subevent pipe into local memory 3 A FASTBUS SMI sequencer read out by E7 15 writing its subevent pipe
77. artup scom to start all tasks needed The following example shows a startup file for a single crate system with table readout The files setup usf and readout mrf must be provided start task m util load setup setup usf set trig mod start task m read meb load read readout mrf start task m collector start task m transport optional tasks start task m esone serv start task m histogram start task m event serv start event noport allow TCP client to connect transport enable tcp setup usf and readout mrf are file names and may be different When leaving the dispatcher by CTRL Z instead of QUIT all tasks are stopped This behavior can be used to shut down the environment After such a hard shutdown or after a reboot one should first cleanup inimbs mbs mbs gt startup or remote reset local mbs mbs gt Ostartup where startup scom executes the lines written above Version 4 3 October 28 2003 31 GSI Multi Branch Svstem User Manual Running a Data Acquisition 5 2 5 Start Remote Environments When there are several nodes environments must be started on each node The node names should be in a text file nodelist txt one per line For each environment one should have setup redaout and startup files prepared Then the master startup file startup scom could look like this Ostartup local e 1 0startup 7 1 e 2 0startup e 2 e7 3 0startup e7 3 enable tcp This procedure must be executed by the promp
78. ay of base pointer for execution of remote CAMAC actions via VSB for crate number bh crate nr master readout task 58 Version 4 3 October 28 2003 Readout Specification pl dat Pointer where to write data ps veshe Pointer to access and manipulate subevent header 1 se read len Pointer to return total subevent length in bytes 1 read stat Pointer for status return not used yet For each occurrence of a trigger the f user readout function is called once for each crate The same object file compiled from functions f user init and f user readout will be linked into the master and slave readout tasks The data acquisition system takes into account for which crate number the readout functions are called The template files show one possible procedure to distinguish actions for different crate numbers and trigger types with a C switch statement This method allows the complete init readout actions to be kept in a single file regardless of crate number trigger type master or slave readout task Similarly init readout actions of crates or trigger types not used for a specific run can be left in the code which saves unnecessary compilation time 6 6 1 Macro Readout Method One may use convenient readout macros in f user init and or f_user_readout Five macros have been prepared and are found in read mac h in the mbs prod exa cvc camac single crate macro read template directory Each macro repre sents a CAMAC action In macros
79. be modified after the prompter is started The prompter accepts input from terminal and TCP if enabled 14 11 2 Remote Tasks When a remote task terminates the remote dispatcher removes it automatically from the task list The new message dispatch I f stc read interrupted recover tasks dispatch Task xxx ID x removed indicates that a task terminated 14 12 Obsolete Commands 14 12 1 SET MAXCLIENTS EVENT SERV Function is now in command SET EVENT SERV 14 12 2 SET STREAM Function is now in commands SET EVENT_SERV for event server and SET STREAM SERV for stream server 14 12 3 SET MAXCLIENTS EVENT SERV Function is now in command SET EVENT SERV 14 13 Changed Commands 14 13 1 Start Dispatcher To make clear that one is using MBS instead of SBS the dispatcher is now invoked by mbs and answers with mbs gt The functionality of the dispatcher is almopst the same as in SBS 156 Version 4 3 October 28 2003 Release Notes 14 13 2 START EVENT SERV The command START EVENT SERV stream events maxclnt NOPORTS VERB has been changed to START EVENT SERV scale events maxclnt NO PORTS VERB scale scaledown streams to analyse Def 1 take all events maximum number of events to copy from a stream Def 1 take all maxclnt maximum number of clients Def 3 VERB Verbose mode The NOPORTS option is now default The first argument has been renamed from stream to Scale 14 13 3 ENAB
80. ber 28 2003 89 GSI Multi Branch Svstem User Manual Event Serving and Filtering 10 server mode 0 quiet default 1 verbose 2 measure the event rate processed by the remote event server 3 measure the maximum event rate delivered by the stream server without event clients Streams scaledown of buffer streams to be processed for the clients default 1 take all incoming streams events the maximum number of events to be processed per buffer stream default 1 all events max look if not all clients are ready to receive the next event the maximum number of calls looking for further clients becoming ready default 1000 add 1ook the maximum number of additional calls looking for further clients becoming ready Used for synchronization purposes in case of nearly identical clients in 96 of the calls needed for the first client client mode 0 only default 100 client mode 1 the remote event server processes the next event if at least one client is ready thus ignoring all not ready clients for this event 2 before processing the next event the remote event server waits until all clients are ready or for at least max_look calls 0 if not all clients are ready wait some additional calls add look this is recommended for nearly identical clients default 0 The last three parameters specify the treatment of the connected clients and strongly influence the event throughput
81. cation lines for event filter and copy filter have the same nine fields separated by spaces 1 Target Specify target for event or copy filter 1 event 0 subevent 2 Event Line is in event filter subset 0 no 1 yes 3 Copy Line is in copy filter subset 0 no 1 yes 4 Operator The specified mask and object see below are connected by the following oper ators The result is TRUE or FALSE ALL IDENT object mask ANY object amp mask INCL object amp mask object EXCL object amp mask mask Q N ro e e 102 Version 4 3 October 28 2003 PAW Clients on AIX 5 lt LT object lt mask 6 gt GE object gt mask 5 Operator The lines in a filter subset are connected by 0 OR 1 AND 6 Operator The filter subsets are connected by 0 OR 1 AND 7 Object Object specification The referenced names are from structures s vehe and s_veshe see 8 2 9 page 83 0 Take all 1 Object is trigger longword event header 2 Object is pattern and offset subjevent header 4 Object is type word sub event header 8 Object is subtype word sub event header 12 Object is subtype amp type longword sub event header 16 Object is procid word subevent header 32 Object is control amp subcrate word subevent header 48 Object is control amp subcrate amp procid longword subevent header 8 Mask Mask bit pattern to compare with object specified as decimal
82. chronous which implies that the data acquisition will block if the selected output channels are not ready to take the data See also 9 page 87 A GOOSY transport manager may connect as client GOOSY command CONNECT TRANSPORT The transport also passes streams already written to its synchronous output channels to the optionally running event or stream server for data event monitoring purposes See also 9 2 page 88 Version 4 3 October 28 2003 11 GSI Multi Branch Svstem User Manual Overview 2 5 7 Event Server See figure 2 1 The event server m event serv runs optionally to send samples of the data to connected clients Clients could be GOOSY analysis programs or PAW programs in the same way as for the GOOSY PAW server The clients may specify filter conditions to select events See 9 10 page 101 The event server gets buffer streams processed by the transport and marks them free after processing Events are copied to event buffers for the clients After startup of the task the event server must be activated by MBS command START EVENT SERV See also 5 4 page 36 and 9 5 2 page 92 There is also a remote event server which runs on all GSI platforms OpenVMS AIX DECunix It gets data from the stream server see below Clients may get events from the local or remote event server in the same way See also 9 4 page 89 2 5 8 Stream Server The stream server task n stream serv may run alternatively and exclusively to the event server
83. cond one the current number of the CNAF in the file big endian 6 5 3 Table Readout Example Example mbs prod exa cvc_camac_single_crate_table_read read mrf 56 Version 4 3 October 28 2003 Readout Specification INITFILE file init urf READFILE file readi urf trigger 1 READFILE file readi urf trigger 3 READFILE file readi4 urf trigger 14 READFILE file readi5 urf trigger 15 The example shows that for each trigger type a file must be provided the same files are allowed for different trigger types If the init file is not specified this results simply in no action Also if trigger types occur during data taking which have no corresponding readout file a subevent without data will be produced and found in the event The extensions of the files must be urf for User Readout File Example mbs prod exa cvc_camac_single_crate_table_read init urf CAMINIT c 0 n 30 a 9 f 24 CAMINIT c 0 n 2 a 0 f 16 d 0x2468 CAMINIT c O n 2 0 f 0 rep 3 CAMINIT c 1 n 30 a 9 f 24 CAMINIT c 1 n 2 a 0 f 16 d 0 1111 CAMINIT c 1 n 2 a 0 f 0 CAMINIT c 5 n 30 a 9 f 24 CAMINIT c 5 n 2 a 0 f 16 d 0x5555 CAMINIT c 5 n 2 a 0 f 0 It is good habit to include the CAMAC action shown in the example CAMINIT c 0 n 30 a 9 f 24 for each crate since this removes the CAMAC inhibit which is set after power on Most commercial modules require this t
84. cquisition CVC40 event ser mbs gt sta ac CVC40 CVC40 CVC40 CVC40 util read_meb read meb collector mbs gt sho ac CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 CVC40 mbs gt ty CVC40 40 40 40 40 mbs gt 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 11511 transport transport transport transport mbs gt enab tcp CVC40 CVC40 transport transport Server created HOST CVCAO PORT 6003 start acquisition found trig type 14 start acquisition READ cnaf 0x80004000 data 0 2468 acquisition running ACQUISITION STATUS at O9 Mav 95 19 09 02 active tasks m read m util m msg log m collector m transport m event serv m dispatch Status INITIALIZED setup LOADED from setup usf Readout table LOADED from read mrf acquisition RUNNING There are 16 streams with 2 buffers a 4096 b each Current crate is 0 event builder is CVC Crate 0 ID 10 LOCAL SYNC CVC subevent slots 500 trig 1 cvt 20 fclrt 10 usec max se length 812 b trig 14 cvt 20 fclrt 10 usec max se length 16 b trig 15 cvt 20 fclrt 10 usec max se length 16 b Event server delivered O events 0 000
85. d cam slav esone serv stream serv histogram prompt The number in the first column is the task pid Lynx When a task crashed and is still in this task table one must cleanup everything with remote reset The dispatcher reads this table to get the pids of all known MBS tasks 5 5 3 Hanging TCP Sockets When a server having a connection from a client was killed the socket is not freed immediately First it is necessary that the client notices that the connection is broken and closes the socket Then it can take up to a minute until the socket is freed The sockets in use are shown by Lynx 38 Version 4 3 October 28 2003 Error Recoverv command netstat see example below The port numbers used bv MBS servers are defined in mbs prod inc portnum def h PORT TRANSPORT 6000 PORT ESONE SERV 6001 PORT STREAM SERV 6002 PORT EVENT SERV 6003 PORT PROMPT 6004 PORT MSG LOG 6005 PORT PROMPT R 6006 As long as a socket with one of these port numbers is in state TIME WAIT no server can use this port number again This state normally disappears after some time 1 min State FIN WAIT 2 indicates that a client did not close the socket In this case the socket remains locked until the client closes the socket It may take some time until a client gets noticed that a connection is broken because this happens only when it reads or writes from to the socket Normally all clients then close the socket and the socket should change its s
86. de name i e for commands for informations and for error messages An example of a log file looks like 12 Apr 95 13 38 46 CVC40 dispatch Command set task res finished with error 12 Apr 95 13 40 26 CVC40 event ser exit 12 Apr 95 13 40 42 CVC40 stream se task m stream serv started 24 Version 4 3 October 28 2003 Remote Environment 4 7 Remote Environment 4 7 1 Prompter In remote environments see figure 4 2 page 27 there are also dispatchers and message loggers one on each node These dispatchers are started remotely by the prompter The prompter is started by alias prm There are several ways to specify the nodes the prompter shall connect to prn nodes from file node_list txt prm r lt node gt get input from send command from node prm r lt node gt n no node at all prm r lt node gt n lt node gt one node prm r lt node gt 1 local node prm r lt node gt f filename nodes from specified file The prompter starts the dispatchers as well as a local message server It then connects to the dispatchers The remote dispatchers start their message loggers as clients which connect to this message server via TCP All commands are sent by the prompter to the destination dispatcher and then to the destination task A task sends output to its local message logger which sends it to the message server where it is printed or logged into the log file 4 7 2 Additional Prompter Features T
87. delete and create message files must be first action after reboot e help call help e news call news e rate Show data acquisition rate continuously The time interval can be specified by ts where s are seconds Leave it by CTRL C e camac Execute local cnafs e tasks Show tasks status in MBS control structure e remote Executes commands on remote nodes show shows environment tasks on remote nodes message status and netstat reset kills environment tasks on remote nodes cleans message files and DAQ status remote SHOW RESET LOCAL on local node remote SHOW RESET node on remote node remote SHOW RESET lt file gt nodes from file e send Send one command line to a prompter for execution The prompter must have been started with r node where node specifies from where send commands are accepted This command is provided to be used in shell scripts send e7 10 sho task 2 7 Software Organisation 2 7 1 File Organisation Production and Development The MBS software is kept in two versions The production version and the development version The difference is in the directorv path mbs prod and mbs deve Users should use the produc tion software All file references in the MBS software are prefixed bv the environment variable Version 4 3 October 28 2003 13 GSI Multi Branch Svstem User Manual Overview MBSROOT This variable is changed bv commands deve and prod respectivelv There are alias names s
88. dent of the event filter e g the event filter may check the trigger number and a pattern in one subevent but the copy filter may specify two other subevents to be received by the client Version 4 3 October 28 2003 101 GSI Multi Branch Svstem User Manual Event Serving and Filtering 9 10 2 Event Filter Event filters may be applied on events of type s vehe and or on subevents of type s_veshe see 8 2 9 page 83 A complete filter set consists of a subset with the copy filter specifications and one or more subsets with event filter specifications In simple cases you need only one subset for both copy and event filter see examples Description The lines of one event filter subset may be combined with logical operators Event filter subsets also can be combined with logical operators Each subset applies on a different region of the event e g 1st subset on event header trigger number etc 2nd subset on a certain subevent etc In case of a subevent one must unambigiously specify in the first entry of the filter subset on which subevent the subset shall be applied by giving e g the processor id In order to maintain performance all filter specifications are internally translated into bit masks and offsets The masks and offsets must be word or longword aligned in the event The event specific filter subsets must come first followed by optional subevent specific filter subsets Filter Subset Specification The specifi
89. ds to these tasks It is started by alias mbs It starts a local message logger All tasks send their output to this message logger which in term writes them to the log file mbslog 1 and or to the terminal In the following we give a short summary of most often used commands to control the tasks START TASK STOP TASK SHOW TASK SHOW COMMAND QUIT Tasks can be stopped in two ways The softest way is STOP TASK lt name gt Then the task executes the command EXIT and terminates A harder stop is to kill known tasks by STOP TASK lt name gt KILL and unknown tasks by STOP TASK PID lt pid gt KILL Then the dispatcher kills the tasks sending the SIGTERM signal the same way as the Lynx command kill lt pid gt does With qualifier ALL all known tasks are stopped Qualifier ZOMBIE is useful if tasks terminated abnormally and are in Z status as shown by Lynx command ps axnt see also 5 5 page 38 4 2 Line Input A command line is composed by command keywords followed by arguments separated by spaces All command input except strings enclosed in or beginning with a slash is changed Version 4 3 October 28 2003 21 GSI Multi Branch Svstem User Manual Command Interface Communications local Figure 4 1 Local Commands and Messages automaticallv to lowercase as are the command definitions Command kevs and argu ment names can be entered in lower or upper case An MBS command line can be given in the following situations
90. e Parameters The syntax is found in 8 1 1 page 74 Now follows the explanation of the relevant parameters in the setup file MASTER Indicates the type of the branch master 1 CVC 2 E6 3 ET REM MEM BASE array Physical base address for a shared segment inside a remote subevent pipe will be seen by the branch master On VSB systems this must be 0xF0000000 for E6 and E7 and 0x08000000 for a CVC as branch master REM MEM OFF array Offset to a shared segment On VSB based systems this must be crate nr 0x200000 REM BASE REM MEM OFF define the physical start address of a remote subevent pipe REM MEM LEN array Length of a shared segment with physical base REM MEM BASE REM MEM OFF and therefore length of the remote pipe in bytes The memory on the CVC can be accessed via VSB only from the beginning of the RAM with base address 0x100000 up to about 500 kB But normally this is also the base address of the LynxOS UNIX kernel As a compromise the kernel base address has been moved to 0x140000 leaving an address window from 0x100000 to 0x140000 free for the subevent readout pipe For the AEB EBI fastbus controller the subevent readout pipe is placed into the EBI memory with base address 0x1000000 seen from the AEB REM CAM BASE array Physical base address to a shared segment for executing remote CAMAC from the branch master via a CBV On VSB systems this must be OxF0180000 for E6 and E7 and 0x08180000 f
91. e Analysis 9 7 PAW Clients VMS rs 9 7 1 PAW as Client for the Event Server in VMS 9 7 2 Using VMS Global Sections with PAW 9 8 PAW Clients on 9 8 1 PAW as Client for the Event Server in AIX 9 82 Writing to Shared Memory outside PAW 9 8 3 Accessing Shared Memory with PAW 9 9 Argument Description for Event Clients 9 9 1 Function 2 konn I meh USE 9 9 2 Arguments 2 4 spa uolss a Yoko Row 9 93 Examples puos bee Er SU US B 9 10 eth eee dab 9 10 1 9 10 2 Event Filter 0 Description S438 ae E o a Filter Subset 9 10 3 Filter Simple Event Filter Complex Event Filter Copy and Event Filter 9 11 General Purpose Event I O Library 10 Histogramming 10 1 Introduction 10 1 1 Histogram Manager 10 1 2 Analysis Template 10 1 3 Histogram 10 2 Histogram 10 2 1 General Description 10 2 2 Histogram Command Overview 10 3 Histogramming CC Emm nn 10 3 1 General Description
92. e buffer sizes 14 17 Help The help command has been enhanced The path with the help files can be optionally specified by environment variable HELPDIR Otherwise the MBS default MBSROOT lib is used Typing help without arguments lists the available help libraries A specific help library can be selected CVC38 goofy 43 help mbs Help library mbs file mbs prod lib mbs hlp attach camac clear close cnaf connect create define delete detach disable disconnect dismount dump enable help Version 4 3 October 28 2003 161 GSI Multi Branch Svstem User Manual Glossarv initialize load mount news open remove restore set show start stop type xshell When no library is specified all libraries are searched for keywords CVC38 goofy 44 help attach Help library goosy file mbs prod lib goosy hlp Help library mbs file mbs prod lib mbs hlp attach gt base 162 Version 4 3 October 28 2003 Glossarv Chapter 15 Glossarv GMC_MBS_GLOSS AEB Aleph Event Builder a Fastbus controller with an 68020 processor running OS 9 Branch Logically a branch is a set of pipes read from one collector Physically a set of memories addressable from one master CAV CAMAC VSB Controller GSI developed CAMAC board mapping CAMAC to VSB CBV Enhanced version of CAV Copy filter Parameter set specified by event clients to receive only parts of events See also Event fi
93. e correct subevent length in bytes has to be returned xl se read len length in bytes For users familiar with the LvnxOS operating svstem there is also the possibilitv to create shared memory segments in any hardware address window in the f user init function with the smem create library call The return value of this function would be the virtual pointer offset to the base of the specified hardware adress window In that way it is possible to access any address based hardware which is connected to the specific controller 6 6 3 Changing Subevent Headers Changing or introducing more private subevent headers can be done in the same way for both user readout function methods In front of each subevent data part filled by the readout function a standard GSI subevent header is added by the system see 8 2 9 pagerefdata subevent It is up to the user to add 60 Version 4 3 October 28 2003 Readout Specification information behind this header bv writing at the verv beginning of each readout onto pl dat pl_dat The structure of this header is found in mbs prod inc s_veshe h see 8 2 9 page 83 Some quantities in the subevent header have been already specified in the setup file some have to be calculated at run time like the subevent length The user gets access to the subevent header with the pointer ps_veshe passed into the f user readout function If the function writes a value into ps_veshe 1_dlen the system assumes that the u
94. e file status The file can be on disk or on tape The tape to be used must be initialised and mounted When a client i e a GOOSY Transport Manager running under Open VMS connects via TCP to the MBS transport task the buffer stream is sent to this client and to tape except the TCP channel was enabled by ENABLE TCP EXCLUSIVE In this case all data are written to tape or to the TCP channel Files may have a specified size and automatic opening of new files is supported as in GOOSY To start file output to a new file and close a file one types MBS gt OPEN FILE lt file gt MBS gt CLOSE FILE The CLOSE FILE command does not stop the acquisition File Header The OPEN FILE command writes as first buffer a GSI file header to the file see 8 2 5 page 80 The header information can be prompted or read from a text file see description of OPEN FILE File Names The file names must follow some conventions to be usable on both VMS and UNIX e Use a z 0 9 and underscore e Do not count on case sensitiveness e File name extension should be LMD where this dot should be the only one e The length can be up to 16 characters ANSI file names 34 Version 4 3 October 28 2003 Controling MBS 5 3 3 CAMAC Esone Calls The utility program m_esone provides some commands to execute local CAMAC functions and to test specific CAMAC modules The commands are camac cnaf lt c gt n a f d lt r gt Note that a proper set
95. e_type 2000 short filhe_frag short filhe_used long filhe buf long filhe evt long filhe current i long filhe stimel2 long filhe free 4 free 0 1 gt swap short filhe label 1 length of tape label string char filhe label 30 x tape label short filhe file 1 length of file name char filhe_file 86 file name short filhe_user_1 length of user name char filhe_user 30 user name char filhe_time 24 date and time string short filhe_run_1 length of run id char filhe_run 66 run id short filhe exp 1 length of explanation char filhe exp 66 explanation x long filhe lines of comment lines struct cv_string s_strings 30 max 30 comment lines L3 8 2 6 GSI Buffer Element Header Each header i e of events or subevents has at least one standard header which looks like Big Endian representation typedef struct long 1 dlen Length of following data in words short i subtype Number specifying element structure short i type Number specifying element structure s evhe NOTE The length field alwavs counts the 16 bit words following this header even if specific headers are longer The only exception is the buffer header itself The structure of a specific Version 4 3 October 28 2003 81 GSI Multi Branch Svstem User Manual Data Structures header should be known from the type subtype numbers Howeve
96. ee streams CLEAR Clear counters 14 14 6 ENABLE DISABLE EVENT COPY This command replaces the EVENTCOPY qualifier of the ENABLE HISTOGRAM command Version 4 3 October 28 2003 159 GSI Multi Branch Svstem User Manual Release Notes 14 14 7 ENABLE DISABLE IRQ 14 14 8 ENABLE DISABLE TRIG MOD 14 14 9 LOAD ML SETUP 14 15 Stream Server There is a new version of the MBS stream server It provides several operation modes for best performance in different setups In all modes the scale factor controls the DAQ performance The default mode after startup is same as by following command mbs gt set stream server scale 2 NOSYNC NOKEEP This means everey 2nd stream is delivered to a client if a request was there 14 15 1 Synchronous Mode The new synchronized mode is enabled by switch SYNC mbs gt set stream_server scale n SYNC This means for every nth stream the server waits for the clients request With n 1 the client gets all streams and acquisition speed is defined by client 14 15 2 Asynchronous Modes In NOSYNC mode there are two flavors of the KEEP mode Conditional Keep mbs gt set stream server scale n KEEP When n 1 the server keeps a stream as long as there are more than 3 free streams available The effect is that during spill pauses the client will get as many streams as he requests if there are any but the acquisition speed may slow down especially at high event rates but low data rates With n gt 1 keepi
97. em Contents of the start procedure start task m util load setup setup usf clear daq counter set trig mod start task m read meb m read meb start task m collector start task m transport This sequence should be kept since the commands rely on running tasks The START TASK command starts tasks needed to run the system LOAD SETUP parses the file setup usf and loads it into memory CLEAR DAQ COUNTER zeroes all run statistic numbers SET TRIG MOD initalizes the trigger module The readout task is taken from the local memory No readout table is loaded since the readout functions are already linked into the readout task 6 7 2 Running a System with Slave Processors In this example the startup of a system with an E7 as master event builder and two CVCs in two CAMAC crates as intelligent crate controller is described The CVCs read their local crates and fill the subevent pipe residing in their local RAM NOTE that the crate number is specified with the load setup command because CVCs do not know their own crate number The E7 reads no 62 Version 4 3 October 28 2003 Running a Svstem with User Readout Functions crate but collects the two subevents from the pipes via VSB To control the three processors from one terminal one mav use prm instead of mbs see 4 7 1 page 25 Contents of procedure to start environment on CVC in crate 1 start task m util load setup setup usf crate nr i clear daq counter disable cvc cam irq set
98. ent Server parameter 5 Then the time needed to process each 100 buffer streams is measured and the resulting processed event rate in kbyte sec is presented In parallel the event clients should be started with climode t Then also the corresponding clients present the processed event rate in kbyte sec for each 1000 events received new client version V13 only Varying max_look and add look with server mode 2 you should be able to find the optimal values according to your requirements Version 4 3 October 28 2003 91 GSI Multi Branch Svstem User Manual Event Serving and Filtering 9 5 GOOSY On line Analysis 9 5 1 GOOSY Transport Manager There are several ways to connect GOOSY to an MBS and get data from it The transport manager must be initialized by command GOOSY gt INITIALIZE ACQUISITION TCP SIZE buffersize COUNT buffers The buffersize must match the MBS buffersize default is 16K Connection to MBS Transport With GOOSY command CONNECT TRANSPORT one connects to the transport server and starts the GOOSY acquisition All data are transfered to the GOOSY transport manager Analysis programs may get data from there in a standard way Caution Depending on the MBS transport setting writing to tape may be suspended Connection to MBS Stream Server With command CONNECT STREAM one connects to the stream server and starts the GOOSY ac quisition This opens an asynchronuous channel Samples of data are transferred to the
99. error handling routine int cfga int FUNC long EXT int DATA int Q int CB General multiple CAMAC action int cfmad int FUNC long EXT int DATA int CB Address scan mode int cfsa int FUNC long EXT int DATA int Q Perform single CAMAC action int cfubc int FUNC long EXT int DATA int CB Controller synchronized block transfer int cfubr int FUNC long EXT int DATA int CB Controller synchronized block transfer int cgreg long EXT long B int C int N int A Analyse register identifier int csga int FUNC long EXT int DATA int Q int CB General multiple CAMAC action 16 bit words int csmad int FUNC long EXT int DATA int CB Address scan mode 16 bit int cssa int FUNC long EXT int DATA int Q Perform single CAMAC action with 16 bit data words int csubc int FUNC long EXT int DATA int CB Controller synchronized block transfer 16 bit int csubr int FUNC long EXT int DATA int CB Controller synchronized block transfer 16 bit int ctcd long EXT int L Test crate demand enabled Version 4 3 October 28 2003 ctci int ctci long EXT int L Test Dataway inhibit ctgl int ctgl long EXT int L Test Crate Demand present ctstat int ctstat int L test status of preceding camac action Version 4 3 October 28 2003 Esone Clients 119 GSI Multi Branch Svstem User Manual Kevword Summarv 120 Version 4 3 October 28 2003 Chapter 12 Kevword Summarv Ver
100. errupt i e trigger module is not located inside the local crate not yet implemented 3 special no interrupt but polling mode In this mode the readout task polls a bit in the trigger status register No other task can execute until the Lynx time slice is over and the scheduler switches execution to another task In all modes the fast clear and conversion time will be taken from parameters TRIG_FCT 0 and TRIG CVT 0 Version 4 3 October 28 2003 53 GSI Multi Branch Svstem User Manual Readout Control SPECIAL MEB TRIG TYPE Must be specified when MEB TRIG MODE is not set to zero 1 CAMAC trigger module 2 VME trigger module 3 FASTBUS trigger module SPECIAL MEB TRIG BASE Must be specified when MEB TRIG MODE is not set to zero NOTE If the trigger module is in a remote VSB CAMAC crate the CAMAC VSB base address must be specified For example 0xF0580000 for a CAMAC trigger module in crate 2 serving m read running on an in a VME crate TRIG STAT NR array Station number of trigger module Set always to 1 and in CAMAC crates it must be housed in station number 1 TRIG FCT array Fast clear time for trigger modules The number specified has to be in the range of 20 65535 and must be smaller than TRIG CVT The fast clear time is set to 100 nanoseconds TRIG_FCT TRIG_CVT array Trigger conversion time The number specified has to be in the range of 20 65535 The conversion time is set to
101. ets trigger module SET VERBOSE DISPATCHER ON OFF m dispatch m dispatch Sets verbosity for dispatcher SET VERBOSE ESONE SERV ON OFF m esone serv m esone serv Sets verbosity for Esone Server SET VERBOSE EVENT SERV ON OFF m event serv m_event_serv Sets verbosity for m event serv SET VERBOSE GLOBAL ON OFF NEUTRAL m util m util Sets verbosity for all tasks SET VERBOSE HISTOGRAM ON OFF m_histogram m_histogram Sets verbosity for m_histogram SET VERBOSE PROMPT ON OFF m prompt m prompt Sets verbosity for m prompt SET WINDOW name x1 x2 y1 y2 CURSOR m collector m collector Set limits of window condition SET XDISPLAY node m prompt m prompt Set name of remote display SHOW node task LOCAL TASKS DAQ NET m remote m remote Shows remote info Executed by alias remote SHOW ACQUISITION seconds SETUP CRATES SERVER RATE LOG m util m util Shows acquisition SHOW BASE name FULL m histogram m histogram Shows information about histogram data base SHOW COMMANDS task FULL ALL m dispatch m dispatch Shows known commands 148 Version 4 3 October 28 2003 Command Summarv SHOW CVC_IRQ_MASK m util m util Reads irq mask of the CVC irq controller SHOW DISPATCHER node m_prompt m prompt Shows connections to remote dispatchers SHOW ENVIRONMENT m dispatch m dispatch Shows environment parameters SHOW ESONE SERV FULL LOG CLI
102. events are written by the m read task into the subevent pipe which is read by a next layer collector 3 this mode includes mode 0 and 1 It makes it possible to pass data to output devices on any node with a running collector ML PIPE BASE ADDR Base address of a collector output pipe Only requested if COL MODE is either 1 or 3 ML_PIPE_SEG_LEN Length of the collector output pipe in bytes Only requested if COL MODE is either 1 or 3 ML PIPE LEN Number of subevent fragment slots of the collector output pipe Only re quested if COL MODE is either 1 or 3 NOTE The structure of the collector output pipe is actually the same as the subevent pipes written by the readout tasks The collector scans for all pipes it has to read and writes all subevents consecutively into the output pipe COL RETRY Number of scans for ready pipes the collector task performs before giving other tasks the chance to execute by system call yield MEB TRIG MODE This parameter can be used to specify special modes for the trigger module serving the m read meb task Modes are 0 standard local interrupt CAMAC LAM VME irq For the next special modes the setup parameters SPECIAL MEB TRIG BASE and SPECIAL MEB TRIG TYPE described below must specify the base address and trigger module type respectively 1 special local interrupt CAMAC LAM VME irq but non standard base address of the triggermodule 2 special remote VSB int
103. f mbs anal written by the user In order to do that histogramming must be enabled for the base to be used see below The return status of f_mbs_anal allows individual events to be selected or suppressed in the output buffer i e on line data reduction While histogramming is enabled histograms mav not be deleted A template as well as an example for f mbs anal c is available on mbs prod exa analysis The user has to modify it Histograms are accumulated by macros HISACCnt NAME float x float y incr where n 1 2 and t I R for one and two dimensions and integer and float respectively The bin s will be automatically calculated from the limit s and number s of channels see 10 4 page 115 The flowchart of the subevent processing is shown in figure 10 4 10 3 2 Enabling and Disabling Histogramming Histogramming can be enabled and disabled by two commands executed in the collector task e ENABLE HISTOGRAM base Enable histogramming The specified histogram data base must exist as a shared segment Otherwise it must be created or restored first If the subevents are not available on the local memory but must be accessed via VSB the ENABLE DISABLE EVENTCOPY command may increase the performance When this flag is set the subevents are copied once into a local event buffer where they can be accessed faster by subsequent processing i e analysis and event formatting e DISABLE HISTOGRAM Disable histogramming detach collector task f
104. ffect the connection to the MBS but one should keep in mind that the TMR is waiting in SYNC mode for the analysis programs GOOSY and PAW without Filters One should use the TMR and connect GOOSY analysis programs in a standard way In addi tion one starts the GOOSY PAW server GPS by commands CREATE PROC GPS GPS and START SERVER channel 3 The PAW analysis then connects to the GPS Note that GOOSY analysis and GPS must use different mailbox numbers channels Therefore it is recommended to use number three for the GPS and one for the GOOSY analysis default But only channel one can be synchronized Using the Event Servers The MBS event server skips streams when there is no request from clients i e it is an asvn chronous channel The remote event server gets data from the MBS stream server which can be set to synchronous or asynchronous mode The channel between GOOSY or PAW clients and the remote event server is synchronous GOOSY and PAW with Filters The GOOSY analysis can get filtered events from all event servers by command START INPUT EVENT For PAW connections see 9 page 87 Filters are described in 9 10 page 101 Any Program without Filters One can use the event I O library to get easily events into programs The event input can be the MBS transport the MBS stream server or a file See 9 11 page 106 A more detailed discussion about on line analysis programs is in 9 page 87 Version 4 3 October 28 2003 37 GSI Multi
105. formance Measurements 19 4 Command Interface 21 4 1 Local Environment 21 42 L 12 x igib uA Rot NE dried et ssa dica 21 4 8 Arguments and Qualifiers 23 4 4 Command Procedures 23 4 5 Defaulbs 2 iu a Ap Gee RO Se Gas A egeat rex Be 23 2 6 Dog Bilet ae ou d Rr Ion iude ob etd dest ee aN ass n etico 24 4 7 Remote Environment 22 30 Bar wt oer ue EU na dere 2 25 Al Prompt r xz RR nern Esp BRL ee s M D a e os 25 4 7 2 Additional Prompter 25 4 8 Motif Interface 27 4 9 Command Example 2 4 2i hv ARR ee 27 4 10 User Defined 28 5 Running a Data Acquisition 29 5 1 Prerequisites for 5 29 29 5 L2 Login Procedure i02 x 22 2 pu NO C pu 29 5 2 Starting MBS ner biez e er V EE b rH SE 30 5 221 Steps i y e e te hy ie ie drm ut a y had 30 522 25 den eal mde aa rete deg VR P Dont bus 30 5 02 97 Readout s s uU e e e e BIER RS 30 CAMAC Readout Profile 30 Readout by
106. h is changed automatically to lowercase as the command definitions are See more in 4 page 21 2 3 Help The documentation of all MBS commands and modules is done using the GSI documentation tools The help libraries are available on Lynx by command help It works similar as the VMS HELP help list of available libraries help lt lib gt content of speficied library help lt lib gt lt keyl gt next level help lt key gt search key in all libraries help mbs MBS help library help goosy GOOSY help library DAQ commands Currently the mbs help file mbs h1p is generated on OpenVMS and then moved to directory HELPDIR MBSROOT lib The helpfile is generated from MBSROOT set mbscom cdf and MBSROOT set utilcom cdf 2 4 News There is a news tool which can be called from shell or from dispatcher by command news Currently news for lynx and for daq are available news get list of available news news daq get list of unseen topics news lynx news daq a get list of all topics The news files are on directory NEWSDIR mbs news 8 Version 4 3 October 28 2003 MBS Environment 2 5 MBS Environment Software Components 5 Utilities Command dispatcher PAW GOOSY Application Figure 2 1 MBS Components Figure 2 1 shows the main components of MBS which will be described briefly in the following sections MBS components are tasks executing commands Both terms are used in this manual These components ca
107. have to be written bv users A librarv provides routines to copv histograms out of an MBS svstem into anv program for further processing 10 2 Histogram Manager 10 2 1 General Description The histogram manager runs in an MBS environment The software package is designed to create data bases and histograms within them The package also provides all commands for manipulating these bases and histograms including saving histograms and base contents into files For the time being the MBS system is being implemented on Lynx OS On this POSIX operation system the histogram data bases are organized as shared segments in order to allow reading writing access from different tasks So histograms may be accessed by routine f_mbs_anal called in program m_collector and controlled by commands executed by program m_histogram at the same time Figure 10 1 shows the access API is the set of routines used to access the histograms within f_mbs_anal In routine f_mbs_anal a decision can be made if the current m_col lector 4 Figure 10 1 Histogram Access event should be skipped or copied into the output buffers The program m histogram and routine f mbs anal may refer to the same base or to two different data bases In the case of one base at the same time a lock mechanism always ensures the integrity of the data see figure 10 2 page 109 The histogram base internally consists of a directory for the histogram entries and a pool for the data i
108. he prompter changes its prompt string always to the node name of the default dispatcher i e prm CVC40 prompt connected to dispatcher CVC40 pid x CVC40 gt SET DISPATCHER CVC38 CVC38 SHO DISPATCHER CVC40 prompt connected dispatchers CVC40 prompt 0 CVC40 pid 26 CVC40 prompt 0 CVC38 pid 30 CVC40 prompt Current set dispatcher is CVC38 The default dispatcher is changed by command SET DISPATCHER The prompter sends the com mands to the default dispatcher To send it to a different one prefix it by lt node gt By prefix the command is sent to all connected dispatchers CVCAO CVC39 lt command gt CVC40 gt lt gt The prompter can be left any time by QUIT and started again All tasks continue to run All output from the tasks still appears on the terminal It is therefore not recommended to enter anv editor When starting the prompter in a running environment it connects to all dispatchers Version 4 3 October 28 2003 25 GSI Multi Branch Svstem User Manual Command Interface specified This mav take some time When the remote nodes should be hanging the command REMOTE RESET ALL will cleanup all nodes i e kill all MBS tasks create new message queues and clear the DAQ status table The command does not cleanup the local node because the local message logger may get still messages To cleanup everything one leaves the prompter and uses shell command remote reset This com
109. heir data into a configurable subevent pipe See also 6 page 47 5 2 3 page 30 and 8 1 3 page 77 2 5 5 Collector See figure 2 1 The collector m_collector normally composes events from the subevent pipes filled by the readout tasks and formats GSI buffers format see page 82 It also provides a user function interface for on line histogramming and or early data analysis including event rejection Formatted streams of buffers are passed logically to the transport task which writes them to the output channels tape disk TCP In the case of a multi layered system the user may specify if the collector formats either events into GSI buffers or writes the data collected from subevent pipes unformatted into an output pipe to be collected by a next layer collector These two options may be set up to run simultaneously See 7 page 65 2 5 6 Transport See figure 2 1 The transport task m transport can write all data buffers to tape or disk to network TCP or both After startup all data buffers are simply discarded by the transport The output channel to a tape drive is opened after mounting a tape and opening a file by command The TCP channnel must be enabled with the command ENABLE TCP When a clients connects all buffers are sent to this client When tape writing was active buffers are written to tape and the TCP channel To write to tape or network exclusively T CP must be enabled by ENABLE TCP EXCLUSIVE All output channels are syn
110. ich reads that remote crate via VSB and remote CAMAC actions pl hwacc and pl rem cam are passed into the function 6 6 2 Static Pointer Readout Method The structure of the f user c file must be as following Before the code of the three functions f user get virt ptr f user init and f user readout all hardware addresses CNAFs VME accessed during the init phase and readout have to be be defined as static volatile long pointers Arrays or structures of pointers are of course possible In the function f ut get virt ptr these pointers have to be constructed as virtual pointers that means an offset has to be added to the hardware adresses The necessary offsets are passed as parameters with the function and are known only at runtime The same rules holds like in the macro method Crates read out by local intelligent controllers have an offset pl loc hwacc For non local crates read out by the master readout task the offset is pl rem cam crate nr To create virtual pointers to acccess CAMAC a macro CNAF is coded in the very beginning of f user c The call virt_ptr CNAF c n a f offset creates the virtual pointer for the use in the f user init and f user readout function In the f user readout function the user now has to care for the correct incrementing of the pl_dat pointer when writing data into the subevent A typical operation to read from hardware and write into the subevent would be pl_dat virtual ptr At the end th
111. iguration information The best way to produce a setup file ist to copy a template file and change all entries according to the following explanations In the directorv mbs prod exa several subdirectories will be found which contain complete working environments for various data acquistion setups Each of them contains a valid setup usf file The names of these directories describe alreadv the kind of setup The following description will follow the sequence in the template files All values for param eters not mentioned should not be changed For more information on those see s_setup h on mbs prod inc Behind each parameter in the user setup file follows a number which could also be an array of numbers where the index of the array indicates up to now always the crate number NOTE If a parameter requires an array of numbers for crate 0 15 values for all array elements must be specified regardless if a crate is used or not This is required bv the parser Version 4 3 October 28 2003 49 GSI Multi Branch Svstem User Manual Readout Control svntax All these values are meaningless as long as the values given for the Readout Flag parameter RD FLG which one can think of as the master flag are zero Valid values for the RD_FLG parameter as a function of the crate number are 0 Nothing should be done with this crate 1 The branch master must read out this crate 2 A local intelligent controller reads this crate 6 3 1 Setup Fil
112. init urf and readout tables ie readxv urf must be provided Second the init and readout tables urf files which define the CAMAC actions must also be created Once the files have been created they can be loaded into shared memory tables with the com mand LOAD READOUT fn mrf when the readout task is running This command can be executed with different master readout files as many times as the user likes to do The last loaded will come into operation 6 5 1 Table Readout Parameters In the master readout file one can specify the following facilities i e lines with a certain syntax identified by a name facility The provided parameters are written in brackets INITFILE file lt gt Specification of init file READFILE file lt gt trigger lt gt Specification of readout files for each trigger In the init file one can specify the facility CAMINIT crate lt gt nstation lt gt address lt gt function lt gt optional data lt gt and repetition lt gt CNAF specification In the readout file one can specify the facility CAMREAD crate lt gt nstation lt gt address lt gt function lt gt optional repetition lt gt CNAF specification The lt gt have to be replaced by the appropriate values 6 5 2 Table Readout Subevents Table readout performes a zero suppression For each CNAF resulting a non zero value there are two 16 bit words in the subevent The first one is the value the se
113. laved event building DISABLE DEL EB COL m collector m collector disables delayed event building DISABLE EVENT COPY m collector m collector Disables event copy durinq data acquistion DISABLE HISTOGRAM m collector m collector Disables histogramming durinq data acquis tion DISABLE RECEIVE DATA m dr m dr Disables data receive of a dr node DISABLE TCP m_transport m_transport Disables tcp connection DISABLE TRIG MOD m util m_util Disables trigger module on trigger bus DISCONNECT DISPATCHER node ALL KILL m prompt m_prompt Disconnects prompter from remote dispatcher DISCONNECT TRANSPORT name m to m to disconnect from m transport DISMOUNT TAPE tape UNLOAD m transport m transport Dismounts tape DUMP BASE base file COMPRESS OVERWRITE m histogram m histogram Dumps base into file DUMP HISTOGRAM name file SEPARATE m_histogram m_histogram Dumps histogram in file or files Version 4 3 October 28 2003 143 GSI Multi Branch Svstem User Manual Command Summarv DUMP WINDOW file m collector m collector Dump window conditions ENABLE CVC_CAMAIRQ m util m util Enables CAMAC LAM and VSB interrupts ENABLE DELAYED EB lo mark hi mark m ds m ds enables delayed event building ENABLE DEL EB lo mark hi mark m collector m collector enables delaved event building ENABLE EVENT COPV m collector m collector Enables event copy during da
114. listed in a text file one per line The default file is node_list txt The remote dispatchers are started by the prompter using remote shell commands rsh The prompter then connects to them via TCP MBS commands are dispatched to the specified node The prompter hibernates until it gets an acknowledge message from the remote dispatcher The prompter can be left by command EXIT or QUIT and restarted It then connects to all nodes found in a file node_list txt on the current directory Do not leave the prompter by CTRL Z See also 4 7 1 page 25 10 Version 4 3 October 28 2003 MBS Environment 2 5 4 Readout See figure 2 1 The master readout m_read_meb runs on the node controlling an indiviual single branch The event readout is triggered either by an interrupt or by polling a trigger bit in some hardware register normally from the GSI trigger module It reads the local crate and optionally other crates equipped with non intelligent crate controllers The readout can be specified either through user written readout functions or in the case of a pure CAMAC setup through simple readout tables These tables have to be written as text files and must be loaded by command The slave readout m read cam slav runs on CVCs in slave CAMAC crates It polls on the local interrupt bit from the trigger module The readout specification is done either through user readout functions or CAMAC readout tables like for the m read All readout tasks write t
115. ll be done ERR HIS EANAL Error in f mbs anal but no disabling will be done ERR HIS SKIPEVT Skip event ERR HIS SKIPSEV Not yet implemented 114 Version 4 3 October 28 2003 Histogramming Functions 10 4 Histogramming Functions The routines are described in the MBS reference manual A brief description follows here f his anal f his anal ini f his accul f his accu2 l status f his anal ps form Template for analvsis program l status f his anal ini ps head pps spe ppl data c_hisname Initialize histogram for analysis routine l status f_his_accul ps_spe pl_data r_energy r_incr Accumulate histogram dim 1 in analysis routine l status f his accu2 ps spe pl_data r_energyl r_energy2 r_incr Accumulate histogram dim 2 in analysis routine Version 4 3 October 28 2003 115 GSI Multi Branch Svstem User Manual ESONE Librarv 10 5 Histogram Server To process histograms generated inside MBS in other program systems one method is to dump the histograms to ASCII files transfer these via TCP to the desired computers and read them into these programs For GOOSY and PAW this method is provided but yet somewhat unconvenient Therefore one can use the histogram server inside MBS and a client library elsewhere on any GSI supported platform which provides routines to copy histograms out of an MBS system The server is started as thread automatically 10 6 Histogram Client Library f_his
116. loped at GSI to connect CAMAC and Fastbus crates with VME modules Window The address space where a collector can access pipes a VME processor sees all pipes of a VSB branch in one address window Multiwindow means that the addresses of pipes can be specified quite freely 164 Version 4 3 October 28 2003 Contents Contents 1 Preface 3 1 1 Intended Readers 4 a kon or Rs p A Ro g p a a eee 4 11 1 New Users 5 4 11 2 Experienced Users of SBS LL 4 1 1 3 Optional Facilities i 4 2 2 kdo ox eos ran a ng 4 1 14 Reference Chapters uz Rec des ye oe Re RECO YI ES qe 4 1 18 Lastofall Chapters 2 22 ao ko E ues 5 1 2 Other Manuals Ea RR ee een ee bo ea eh 5 121 GSI Multi Branch System Reference Manual 5 13 MBS Authors and Advisory Service 6 2 Overview 7 2 1 Summary Qa aes iew i BT Bl a b ee EO POS 7 2 2 Command Interface ai a e ge BS kw a an T ASE vr a 7 2 9 EODD ass det e oru A bd a rn a neben Tua Ob Arte 8 2 4 NEWS a BA al eu a a a aa 8 2 5 MBS Environment 9 2 5 1 Command Dispatcher 10 2 9 2 Message Logger s bb L a Ae Ae De day eae Sek as SG MP Oe OM 10 2 5 9 PYOMpter daos Lk a dh botti Le dere Be ar sh 10 2 574 Readout 1 5 ahinat
117. lter and Filter set CVC CAMAC VSB Computer GSI developed CAMAC board with 68030 processor and fast memory mapped CAMAC access Can be used also as crate controller Runs pSOS and Lynx EBI GSI developed AEB to VSB interface Event filter Parameter set specified by event clients to receive only certain events See also Copy filter and Filter set Environment Set of all tasks controlled by one dispatcher Several environments on several nodes can be controlled from one prompter FIFA GSI developed SMI to VSB interface Filter set Complete parameter set specified by event clients to receive only parts of certain events See also Copy filter and Event filter Version 4 3 October 28 2003 163 GSI Multi Branch Svstem User Manual Glossarv Master Similar to slave used in different context 1 Hardware Masters can read write to remote memorv i e there are VSB and VME masters sometimes called branch masters 2 Software Readout masters fill one pipe in local memorv One master readout task is running on one processor branch master together with at least a collector 3 Trigger One trigger module must be master It is the one getting the trigger signals from the experiment Pipe Piece of memorv where readout tasks or multi laver collectors write subevents and a collector reads them Svnchronization is done through the pipe Profile An ASCII file where named parameters and values are stored Profiles are read bv programs t
118. mand accepts either a node name or Qfile for the nodes to be cleaned up See 5 5 4 page 39 Prompter commands CONNECT DISPATCHER DISCONNECT DISPATCHER SET DISPATCHER SHOW DISPATCHER REMOTE RESET REMOTE SHOW QUIT The DISCONNECT command optionallv kills the dispatcher KILL The REMOTE RESET command kills all MBS tasks on specified nodes except the local node Message files and DAQ status are reset Example prm CVC40 gt lt command gt CVC40 gt CVC39 lt command gt CVC40 gt lt command gt CVC40 gt CONNECT DISPATCHER CVC38 CVC40 gt SET DISPATCHER CVC38 CVC38 gt SHO DISPATCHER CVC40 prompt connected dispatchers CVC40 prompt 0 CVC40 pid 26 CVC40 prompt 0 CVC38 pid 30 CVC40 prompt Current set dispatcher is CVC38 CVC40 gt DISC DISPATCHER ALL prompt gt CONNECT DISPATCHER ALL CVC38 REMOTE SHOW ALL CVC38 gt STOP TASK ALL CVC38 gt REMOTE RESET ALL Note that the messages are prefixed by a hyphen the node name and the task name without leading m_ The STOP TASK ALL command should be used to shut down all tasks if possible It does not stop the remote dispatchers nor message loggers Therefore one can immediately continue calling the startup procedure After REMOTE RESET everything starts from scratch which takes much longer time Figure 4 2 page 27 shows how more nodes can be controlled from one terminal through the prompter 26 Version 4 3 October 28 2003 Remote Envir
119. maximum number of clients for m event serv SET PRINT ESONE SERV ON OFF m esone serv m esone serv Sets terminal output Esone data for Es one Server SET RIRECEIVER FLUSHTIME time m rirec m rirec Sets stream flushtime SET SMI 1810 LECROY slot csr1 4 0 4 1 dsr2 dsr3 dsr4 m smi m smi Initialize LeCroy Module 1810 SET SMI 1872A_LECROY 510 csr0 csrl m smi m smi Initialize LeCroy Module 1872A SET SMI 1872_LECROY slot csr0 csrl m smi m smi Initialize LeCroy Module 1872 SET SMI 1875A_LECROY slot csr0 csrl m smi m smi Initialize LeCroy Module 1875A SET SMI 1875 LECROY slot csr0 csrl m smi m smi Initialize LeCroy Module 1875 SET SMI 1881M_LECROY slot csr0 csrl csr3 csr7 threshold m smi m smi Initialize LeCroy Module 1881M SET SMI 1881 LECROY slot csr0 1 csr3 csr7 threshold m smi m smi Initialize LeCroy Module 1881 SET SMI 1882F_LECROY slot csr0 csrl m smi m smi Initialize LeCroy Module 1882F SET SMI 1885F LECROY slot csr0 1 m smi m smi Initialize LeCroy Module 1885F Version 4 3 October 28 2003 147 GSI Multi Branch Svstem User Manual Command Summarv SET STREAM SERV scale INO SYNC NO KEEP SCALED KEEP CLEAR m stream serv m stream serv Selects scaledown of streams SET TASK task pid CLEAR m dispatch m dispatch Sets task id SET TORECEIVER FLUSHTIME time m to m to set stream flush time SET TRIG MOD SLAVE m util m util S
120. mission of GSI is not allowed To get the permission please contact at GSI Mathias Richter tel 2394 or E Mail M Richter gsi de or Hans Georg Essel tel 2491 or E Mail H Essel gsi de MBS Copyright The MBS software package has been developed at GSI for scientific applications Any distribution or usage of MBS without permission of GSI is not allowed To get the permission please contact at GSI Mathias Richter tel 2394 or E Mail M Richter gsi de or Hans Georg Essel tel 2491 or E Mail H Essel gsi de or Nikolaus Kurz tel 2979 or E Mail N KurzQgsi de Conventions used in this Document Examples in this manual show both system output prompts messages and displays and user input which are all written in typewriter style Names and keywords are also in typewriter style Items to be replaced by actual values are enclosed in lt gt The change bars mark changes between MBS and SBS Registered Trademarks are not explicitly noted Version 4 3 October 28 2003 3 GMC_READER 1 1 Intended Readers GSI Multi Branch System User Manual 1 1 1 New Users of MBS Overview Chapter 2 page 7 Hardware Chapter 3 page 17 Command Interface Chapter 4 page 21 Running a Data Acquisition Chapter 5 page 29 Event Serving and Filtering Chapter 9 page 87 1 1 2 Experienced Users of SBS Release Notes Chapter 14 page 153 Readout Control Chapter 6 page 47 Multi Layer Multi Branch Systems Chapter 7 page
121. n least significant bit is in byte with highest address When using these structures on Little Endian architectures such as OpenVMS the bytes in a longword must be swapped and all word or byte declarations must be declared in reversed order i e short i subtype short i type char h begin char h end short i used must be declared on a Little Endian machine like OpenV MS as short i type short i subtype short i used char end char h begin Version 4 3 October 28 2003 79 GSI Multi Branch Svstem User Manual Data Structures 8 2 3 Buffers The MBS dump file format defines the structure of dumps of data produced bv MBS for later analysis or exchange of data between MBS and other systems It is identical with the GSI GOOSY structures The smallest entities of data which are transported by MBS in the sense mentioned above are called buffers Presently these buffers have a fixed length of multiples of 1024 up to 32768 On disk the buffers are stored in one RMS record while on tape several buffers can be stored into one tape record e Buffer Element An MBS buffer contains an arbitrary number of buffer elements Any buffer element is composed of two parts e Buffer Element Header Headers work like envelopes for data Examples for headers are the buffer header see below and the event header see below The header specifies the type and size of the following data Size is in words excluding two longwords of header
122. n be started from the shell or run in background In the first case they get the commands from the terminal in the second case from a dispatcher program Thus several components can be controlled from one terminal The set of components controlled from one terminal is called environment There are one local and optionally several remote environments Each environment has one dispatcher and one message logger On the node of the local environment the prompter is used to dispatch commands If there are no remote environments the dispatcher is used instead of the prompter The tasks communicate through common memory sections or message files There are two kinds of tasks Known and Unknown lasks which execute commands must be known to the dispatcher because the dispatcher must send the commands to these tasks These known tasks are forked started in background directly by the dispatcher by the START TASK command The dispatcher can also start tasks which do not execute commands These unknown tasks are forked as childs of the Lynx INIT task They are shown as detached by the dispatcher Known tasks can only run once at the same time Version 4 3 October 28 2003 9 GSI Multi Branch Svstem User Manual Overview 2 5 1 Command Dispatcher See figure 2 1 This program m_dispatch is started by alias mbs to control components running in its environment It can be called only once on a Lynx system It executes the following functions o Start mess
123. n crate Intelligent slave controllers read only their local crate Each intelligent controller which has to perform hardware readout has to be triggered by its GSI trigger module Two modes of trigger operation interrupt and polling are supported and specified in the setup file In interrupt mode the trigger module must be housed in the same crate as the controller In polling mode the controller needs address mapped access to the internal register of the trigger module which can be therefore located in the local or in a remote crate Trigger modules are available with the same functionality for all supported crate types CAMAC VME and FASTBUS All trigger modules in a system must be connected via a trigger bus cable to ensure synchronisation of the hardware readout One trigger module in a system must be designated as master trigger module It gets the trigger inputs and distributes them via the trigger bus cable to the slave trigger modules The master trigger module must be controlled by a LynxOS crate controller but can be in any crate The trigger module allows for 15 different trigger sources called trigger types Trigger type 14 and 15 are used by the system to start and stop the readout the remaining types 1 13 are free for the user The minimal hardware requirements for a single VME or CAMAC crate system are VME crate or VME trigger module or CAMAC crate CVC CAMAC trigger module There are more hardware configurati
124. n order to allow on line data analysis and histogramming the MBS histogramming tool has been developed It consists of o Histogram Manager program m_histogram o Analysis routine f mbs anal o Histogram Server thread o Histogram client library 10 1 1 Histogram Manager The MBS Histogram Manager can be started from the shell by command histogram or in an MBS environment by the MBS command START TASK m_histogram The histogram manager allows data bases for histograms with the dimensions of 1 and 2 to be created All operations on histograms may be done within this program package Histogram contents may be written in files with an exchangeable format Thus histograms can be imported or exported from GOOSY PAW and SATAN Whole bases can be dumped and restored into files The histogram server thread sends histograms on request to remote clients 10 1 2 Analysis Template There is a user modifiable C code template that allows histogramming during on line data ac quisition on the Multi Branch System This analysis routine f_mbs_anal is called in the MBS collector task before the subevents are copied into the event buffers A make file is provided for linking the m_collector with the modified module f_mbs_anal Version 4 3 October 28 2003 107 GSI Multi Branch Svstem User Manual Histogramming 10 1 3 Histogram Server The histogram manager provides a server functionalitv to send histograms to clients Clients on anv GSI supported platform
125. n will be corrupted after the first invocation of the client 9 7 1 PAW as Client for the Event Server in VMS Having prepared the four Fortran user interfaces uastartc for uanal4 for uastop for and ucinfo for optionally in new version only in your local directory your PAW executable con taining the client for the Event Server will be created and invoked by the commands 94 Version 4 3 October 28 2003 PAW Clients on VMS goopaw make goopawcli goopawcli Within PAW the client will be invoked with the command PAW gt gsi goocli input lt argument list gt For the argument list see 9 9 page 99 the AIX man page goocli or the on line help information available in vour session PAW with PAW 2 help gsi goocli Here several help menues are offered providing information on o the command interface of the client o the event filter including extensive examples o the user interfaces for event analvsis control o and some general informations including some hints on the client version writing to shared memorv The HBOOK histograms and Ntuples as booked in uastart and filled in uana14 are available only in the common data block PAWC in the current PAW session If the client is running pressing CTRL g invokes the call of a user modifiable FORTRAN subroutine uclinfo that may displav statistical information The client can be terminated with CTRL a 9 7 2 Using VMS Global Sections with PAW Having prepared the four Fortr
126. n_CVC m_read_meb 1 5 mbs deve bin_CVC m_util 1 6 mbs deve bin CVC m msg log 1 7 mbs deve bin CVC m collector 1 8 mbs deve bin CVC m transport 1 10 mbs deve bin CVC m stream serv 1 Inactive tasks event serv dispatch mbs mon read cam slav esone serv histogram prompt CVC40 gt rate t1 Interval 1 s 2 buffers a 4096 b per stream 109622 Bufs 493301 Evts 0 Bufs s 0 KB s 0 Evts s 109768 Bufs 493961 Evts 143 Bufs s 586 KB s 6047 Evts s 109911 Bufs 494602 Evts 139 Bufs s 569 KB s 6022 Evts s 110050 Bufs 495227 Evts 136 Bufs s 558 KB s 613 Evts s C CVC40 gt mbs mbs gt sho task CVC40 dispatch Task table of MBS CVC40 dispatch mbs deve bin_CVC m_read_meb m_read_meb id 4 4 Version 4 3 October 28 2003 43 GSI Multi Branch Svstem User Manual Running a Data Acquisition CVC40 dispatch m util mbs deve bin CVC m util id 5 5 CVC40 dispatch m msg log mbs deve bin CVC m msg log id 6 1 CVC40 dispatch m collector mbs deve bin CVC m collector id 7 7 CVC40 dispatch m transport mbs deve bin CVC m transport id 8 8 CVC40 dispatch m stream serv mbs deve bin CVC m stream serv id 10 10 CVC40 dispatch m dispatch mbs deve bin CVC m dispatch id 16 16 CVC40 dispatch Task table of dispatcher CVC40 dispatch m_dispatch started CVC40 dispatch m_read_meb started CVC40 dispatch m_collector started CVC40 dispatch m util started CVC40 dispatch
127. nd a conversion time of zero The numbers represent therefore the absolute maximum one will not achieve in real life Data Transfer VSB to CVC CAMAC 68030 Distance 1 m 2 7 MB sec 15 m 2 4 MB sec One CVC one CAMAC crate One word events 2 2 KHz 700 word events 900 KB sec Version 4 3 October 28 2003 19 GSI Multi Branch Svstem User Manual Command Interface Hardware Configuration VME VSB Fastbus CAMAC CAMAC CBV SMI Segment Manager Interconnect CAMAC VSB interface 109498 H Figure 3 2 Hardware Configuration with VME 600 KB sec to tape TZ87 240 KB sec via TCP to client One CVC one CAMAC slave One word events 8 3 KHz 500 word events 1230 KB sec 760 KB sec to tape TZ87 One CVC two CAMAC slaves 1000 word events 1400 KB sec 800 KB sec to tape TZ87 One ELTEC E7 VME one CAMAC slave One word events 13 4 KHz 500 word events 1140 KB sec 1130 KB sec to tape TZ87 480 KB sec via TCP to client One ELTEC E7 VME two CAMAC slaves 1000 word events 2040 KB sec 1230 KB sec to tape TZ87 20 Version 4 3 October 28 2003 Local Environment Chapter 4 Command Interface GMC_MBS_COMIN The MBS command interface runs on Lynx AIX HP UX DECunix and OpenVMS Dispatcher and message logger run only on Lynx and DECunix 4 1 Local Environment In a local environment see figure 4 1 page 22 a dispatcher accepts terminal input forks tasks and dispatches comman
128. nd then created again 9 9 Argument Description for Event Clients See also man pages goocli or gooshr on AIX The arguments are the same on VMS and AIX 9 9 1 Function Connect to a Remote Event Server and request a number of events Under control of user written interface programs HBOOK spectra and Ntuples are created and filled either in shared memory or in the user s adress space private memory All arguments except imode are the same for the non PAW client see man gooshr 9 9 2 Arguments host name The name of the host running the Remote Event Server port no The port number of the Remote Event Server 6003 event no optional gt 0 the number of events requested from the server 0 test mode e g for the filter conditions The client will be started with the given arguments but the connection to the server will NOT be established 1 Request an unlimited number of events from the server Default 500 filter optional Specifv filter conditions on events or subevents to be applied bv the server A Select all events subevents F Filter conditions will be prompted filename Name of a file containing the filter conditions Default A sample rate optional 0 The server tries to send every event that matches the filter 0 The server tries to send every n th event that matches the filter Default 0 Version 4 3 October 28 2003 99 GSI Multi Branch Svstem User Manual Event Serving and Filtering
129. need to be enclosed in In addition strings beginning with a slash are not lower cased any longer Thus a command load setup Mydir setup can be written as load setup Mydir setup 14 11 Distributed Environment Prompter The next important new feature is that remote dispatchers can be controlled from one central prompter The prompter is a new program invoced by prm It starts a local message server and dispatchers and message clients on remote nodes found in node list txt Then commands can be sent by the prompter to one or all remote dispatchers The output of all remote tasks is sent to the message server and printed on the terminal Thus a multinode environment can be controlled from one terminal Prompter and message server will be available soon on AIX DECunix and eventually on OpenVMS 14 11 1 Remote Commands The prompter optionallly may receive input from a remote node There is a routine f pr send to send a command line to such a prompter via TCP Using this routine remote programs may execute commands in the MBS No information except the command completion status is returned Version 4 3 October 28 2003 155 GSI Multi Branch Svstem User Manual Release Notes back Text output of the command will go to the prompter s message server s terminal The prompter must be started bv prm r nodelist where nodelist is a list of nodes which are allowed to connect and send commands By command REMOTE ACCESS this list may
130. ng is switched off and the mode is like NOKEEP Scaled Keep mbs gt set stream server scale n SCALE 160 Version 4 3 October 28 2003 Release Notes The server keeps everv nth stream as long as there are more than 3 free streams available The effect is that during spill pauses the client will get streams on request but maybe not as many as in KEEP mode On the other hand in SCALE mode the impact on the acquisition speed can be controlled With n 1 this mode is the same as KEEP The show command has been enhanced and displays the mode and counters The coun ters are only incremented if a client is connected See HELP SET STREAM SERV and HELP SHOW STREAM SERV One should play with the modes to get the best compromise of DAQ performance and data transfer for monitoring 14 16 Transport Server When a client GOOSY Transport Manager connects to the MBS Transport Server the server first sends four longwords with information about buffer sizes and streams Endian longword must be 1 Buffer size bytes Buffers per stream Number of streams Q N P This is the same information as the stream server sends after accepting a client The GOOSY Transport Manager checks if the buffer parameters conform to its own ones and disconnects if not Note The buffer size can be specified in GOOSY TMR by command INIT ACQ TCP size xxx But this command can only be executed once Therefore the TMR must be restarted in order to change th
131. nted via NFS to a different file system than on Lynx nodes Readout actions for all AEBs used in a data acquisition system can be put in a single file like it is done for the LynxOS controllers int f user init unsigned char bh crate nr long pl stat bh crate nr Crate number pl_stat Pointer for status return not used yet int f_user_readout unsigned char bh_trig_typ unsigned char bh_crate_nr long xpl dat Ss veshe ps veshe long l se read len long xl read stat Version 4 3 October 28 2003 61 GSI Multi Branch Svstem User Manual Readout Control bh trig typ Trigger type bh crate nr Crate number pl dat Pointer to write data ps veshe Pointer to access and manipulate subevent header se read len Pointer to return total subevent length in bytes l read stat Pointer for status return not used yet The same rules are valid for pl_dat 1 se read len and the change of subevent headers as de scribed in section in the previous section 6 7 Running a System with User Readout Functions To start and stop a svstem a sequence of commands must be executed after the command dis patcher has been started mbs This can be simplified bv collecting these commands in a com mand procedure file with an extension scom and execute it with Qfilename In the following it is assumed that the dispatcher was called in the directorv where the make was invoked to link the readout tasks 6 7 1 Running a Single Processor Syst
132. o be accessible on the CAMAC bus Both CAMAC read and write functions are allowed in the init part Example mbs prod exa cvc_camac_single_crate_table_read readi urf for trigger type 1 CAMREAD c 0 n 2 0 f 0 rep 100 CAMREAD c 1 n 2 0 0 rep 5 CAMREAD c 5 n 2 0 f 0 rep 1 Due to performance considerations only CAMAC read functions are allowed in the readout part In the init and readout files all actions can be put regardless if the readout will be executed by a slave controller or the branch master CAMAC actions CNAFs specified for crates not read out are not loaded if the setup parameter RD_FLG is 0 for these crates 6 6 User Function Readout There are two different methods to create user readout functions The first one uses macros to read out hardware It is intended for users with no knowlege of the C programming language Version 4 3 October 28 2003 57 GSI Multi Branch Svstem User Manual Readout Control The second method uses static pointers If the user wants to produce the fastest possible readout the second method has to be chosen since the simplicitv of the first one is paid by a slightly lower performance readout The best way to make a user readout would be to copy a template directory and make changes in the template f_user c file In the directory mbs prod exa several subdirectories will be found which contain complete working environments for various data acquistion setups Each
133. o get these values i e setup files and readout files Readout There are two versions of readout tasks Master and Slave These names do not imply a relation between them The master version runs on the branch master where the collector runs The slave version runs alone Therefore the slave polls for triggers whereas the master waits for an interrupt Optionallv the master can also be set up to poll Segment A segment in Lynx is a contiguous array in virtual memory When created by smem create it is mapped to a physical address range which is contiguous When cre ated by smem get it is contiguous in virtual memory but may cover several noncontiguous physical memory locations SFI Struck Fastbus controller with a VME create builtin providing two VME slots Slave Used in different contexts 1 Hardware Slaves cannot write to remote memory Le there are VSB and VME slaves 2 Software Readout slaves fill one pipe Only one task the slave readout is running on one processor When the processor is bus master the pipe can be located in remote memory 3 Trigger All trigger modules except one master are slaves They get the trigger signal from the master trigger via trigger bus Stream A set of buffers Events do not span between streams One stream is either free locked by the collector locked by the transport or locked by stream or event server VME Versa Module Enhanced bus VSB VME Subsystem Bus Differential version deve
134. of them contains a valid f user c file The names of these directories describe already the kind of setup The readout task is then compiled and linked by executing the make command The necessary Makefile is also placed in this directory NOTE It is absolutely vital that the maximum subevent size specified in the setup file MAX SE LEN TRIGTVP1 MAX SE LEN TRIGTVP15 is not exceeded in the user readout func tion The f_user c template file contains the functions f user init and f_user_readout The calling is the same for both methods mentioned above int f user init unsigned char bh crate nr long xpl loc hwacc long xpl rem cam long xpl stat bh crate nr Crate number pl loc hwacc Base pointer for execution of local crate readout master or slave readout task plrem cam Array of base pointers for execution of remote CAMAC actions via VSB for crate number bh crate nr master readout task m read pl stat Pointer for status return not used vet f user init is called once for each crate readout after the START ACQUISITION command int f user readout unsigned char bh trig typ unsigned char bh crate nr register long 1 loc hwacc register long 1 rem cam long pl dat Ss veshe ps veshe long xl se read len long xl read stat bh trig typ Trigger tvpe bh crate nr Crate number pl loc hwacc Base pointer for execution of local crate actions master or slave readout task plrem cam Arr
135. ofiles and for readout table profiles In both kind of files definition files and profiles the sign at the beginning of lines marks comments Spaces are ignored key2 3 14 key3 8 key4 Abc faci key1 1 2 3 4 5 8 1 1 Single Branch Setup File The setup parser definition file is MBSROOT set setup pdf A detailed description of the user setup setup usf file will be found in 6 3 page 49 Template user setup files are in the directories in mbs prod exa parser definition file pdf for setup N Kurz SBS_SETUP_TABLE MASTER REM_MEM_BASE REM MEM OFF REM LEN REM_CAM_BASE REM_CAM_OFF REM_CAM_LEN LOC_ESONE_BASE REM_ESONE_BASE ESONE_OFF LOC_MEM_BASE LOC_MEM_LEN CVC_CRR_OFF CVC_CSR_OFF CVC_CLB_OFF SE_MEB_ASY_LEN 74 ULo ULo 16 ULo 16 ULo 161 ULo 161 ULo 16 ULo 16 ULo ULo ULo ULo 16 ULo 16 ULo ULo ULo ULo Version 4 3 October 28 2003 LOC PIPE BASE PIPE OFF PIPE SEG LEN PIPE LEN MAX SE LEN TRGTYP1 MAX SE LEN TRGTYP2 MAX SE LEN TRGTVP3 MAX SE LEN TRGTYP4 MAX SE LEN TRGTYP5 MAX SE LEN TRGTYP6 MAX SE LEN TRGTYPT7 MAX SE LEN TRGTYP8 MAX SE LEN TRGTVP9 MAX SE LEN TRGTYP10 MAX SE LEN TRGTYP11 MAX SE LEN TRGTYP12 MAX SE LEN TRGTYP13 MAX SE LEN TRGTYP14 MAX SE LEN TRGTYP15 RD FLG RD TYP CONTROLLER ID SY ASY FLG ME
136. om the LynxOS branch master so no terminal access is needed for the AEB The startup procedures on the CVC and on the E7 are the same as described in the previous example 64 Version 4 3 October 28 2003 Multi Laver Multi Branch Svstems Chapter 7 Multi Laver Multi Branch Systems GMC_MBS_MBS 7 1 Introduction Up to now the description of the MBS Multi laver multi Branch System software has only covered single branch systems including single crate systems This is apart from improvements just what was supported with the first version of this software package which was named SBS Single Branch System With the MBS it is now possible to connect single branch systems in an easy way together to form multi branch or even a multi layer systems The method to combine single branch systems is designed in such a way that only one setup parameter COL_MODE inside a single branch system has to be changed to switch it from a fully functional stand alone single branch system to a branch of a multi branch system This parameter specifies the output mode output pipe of a collector running on the branch master see description of the setup parameters thus allowing a versatile partioning of a data acquisition system For example it could be that subdetectors which are read out by individual single branch systems during a testing phase are combined to the complete data acquisition system in a production run with virtually no change in the set
137. onment Communications Figure 4 2 Local and Remote Commands and Messages 4 8 Motif Interface On nodes providing motif a motif interface can be called This feature is currently not used in MBS 4 9 Command Example The following command has two positional arguments and two switches Command description START EVENT stream events maxclnt verb Valid commands are then START EV 1 1000 1000 events from all streams START EV max 3 allow 3 clients sta ev verb verbose output An invalid command would be STA EV abc Switch not known STA EV abc illegal value Version 4 3 October 28 2003 27 GSI Multi Branch Svstem User Manual Running a Data Acquisition 4 10 User Defined Commands Besides the commands provided by MBS the user may create his own commands and tasks A description is found in f_cmd c An example can be found on VMS in the file TOOL examples m cmd test c 28 Version 4 3 October 28 2003 Prerequisites for MBS Chapter 5 Running a Data Acquisition GMC MBS RUN 5 1 Prerequisites for MBS If you never have used MBS before some preparations are needed You must be familiar with the basic Lynx UNIX concepts and commands and the interrupt handler for CAMAC must be loaded This is normally done during the boot process 5 1 1 Account Ask the MBS group if your account is sufficiently privileged to run MBS 5 1 2 Login Procedure During login the group specific script etc csh login is e
138. ons supported This includes for example systems with multiple VSB branches or systems with two CVCs as master and slave in a single crate both increasing the performance substantially Ask the DAQ people if you need a configuration not covered by this description 3 2 Single Branch Hardware Setup Examples 3 2 1 One VSB Branch In figure 3 1 page 19 one can see an example with CAMAC computer boards CVC The VSB is the branch The board is fully equipped with a 68030 processor ethernet SCSI and VSB 18 Version 4 3 October 28 2003 Performance Measurements Several different subsvstems mav be connected to the VSB i e other CAMAC crates with CVCs or Fastbus crates with Aleph Event Builders AEB or LeCrov s Segment Manager Interconnect SMI The standard software version assumes that each readout processor is triggered bv a GSI trigger module 3 2 2 One VME Branch Figure 3 2 page 20 shows an example of a VME based setup The VME bus is the branch The MBS is running on ELTEC VME CPU boards E6 ET under Lynx see also figure 6 1 Hardware Configuration Ethernet AEB Slave CAMAC m CAMAC H CBV CAMAC CVC Maste 100508 9 CBV CAMAC VSB interface CVC CAMAC VSB Computer AEB Aleph Event Builder Figure 3 1 Hardware Configuration with CVC 3 3 Performance Measurements There are some measurements of the performance of the system on different hardware configu rations Note that we used a fixed pulser a
139. or a CVC as a branch master REM CAM OFF array Offset to a shared segment On VSB based systems this must be crate nr 0x200000 REM CAM BASE REM CAM OFF define the physcial start address of a remote CAMAC segment These base adresses are passed as virtual pointers into the user readout function 50 Version 4 3 October 28 2003 Single Branch Setup Specification REM CAM LEN array Length of a shared segment with physical base REM_CAM_BASE REM CAM OFF and therefore length of the remote CAMAC segment REM MEM LEN 0x50000 is enough to cover the complete CAMAC space of one remote crate LOC_ESONE_BASE This setup parameter is used only if the task m esone serv is running on a branch master CVC In this case it must be set to 0x4180000 REM ESONE BASE This setup parameter specifies the address window to access remote CAMAC on slave crate controllers connected via VSB from a VSB branch master The VSB master could be any processor type For a CVC this parameter must be set to 0x8180000 for an E6 and E7 it must be set to Oxf0180000 ESONE OFF Principally CAMAC cnafs can be executed from the m esone serv task at the same time a readout is running and accessing CAMAC Then the problem arises that it is not possible to distinguish if CAMAC X and Q belongs to the readout or ESONE cnaf This problem has been circumvented only on CVCs regardless if VSB master or slave by implementing a second CAMAC address window reserved for
140. ould be cernlogin to setup all definitions needed to use PAW and to specify the version of the CERN software to be used If you like to use the new version of the client software invoke the command goopawnew All modules you need to create your event clients are then available on directory goopaw For a non PAW client using shared memory case 1 above you need make gooshrcli com command file to create your client link gooshrcli com link script called in make gooshrcli com Version 4 3 October 28 2003 93 GSI Multi Branch Svstem User Manual Event Serving and Filtering uastarts for called at the begin of input uanal4 for template program for the analysis of events uastop for called at the end of input uclinfo for returns current statistics For a PAW client collecting the data in the PAW common data block PAWC in the user s address space number 3 above the relevant modules are make goopawcli com command file to create your PAW client link goopawcli com link script called in make goopawcli com uastartc for called at the begin of input uanal4 for template program for the analysis of events uastop for called at the end of input uclinfo for returns current statistics Copy the templates to your own file system and fill them with your analysis code See also the extensive in line documentation in the template files If further user modules or libraries are needed copy also the required command files make
141. ow lt file gt net To check if everything is cleaned up execute remote show local or remote show lt file gt to show MBS tasks pending messages or internet connections in state other than ESTABLISHED It should look like CVC40 goofy 17 remote show loc pid tid ppid pgrp pri text stack data time dev user S name 2 32767 20 20 17 32 12 16 0 21 ttvpO goofy C bin ps 20 32767 24 20 17 44 8 52 0 28 ttypO goofy W bin sh 24 32767 22 24 17 184 16 104 3 79 ttypO goofy W bin tcsh 25 32767 20 20 17 48 12 40 0 10 ttypO goofy W bin grep 11524K free 940K used in this display Task table of MBS daqst Aktive tasks Inactive tasks read_meb collector transport event_serv msg_log dispatch util mbs_mon read_cam_slav esone_serv stream_serv histogram prompt Message and command files e LLL No pending messages in dev msg No pending messages in dev com TCP status Active Internet connections Proto Recv Q Send Q Local Address Foreign Address state tcp 0 0 CVC40 gsi de telnet VSCA gsi de 2889 ESTABLISHED 40 Version 4 3 October 28 2003 Session Example 5 6 Session Example In the following we show a few examples of MBS sessions Complete file sets for different hardware setups can be found on directorv mbs prod exa 5 6 1 Single CAMAC System Lines beginning with Z are comments added here CVC40 gt is the shell prompt mbs gt is the M
142. pecifving path and filename without the leading m to call programs i e msg log to call mbs prod bin CVC m msg log These aliases always point to the selected software version Directories The main directories of the MBS software are below MBSROOT bin_ HOSTTYPE Programs and shell scripts for different platforms i e CVC src Sources lib Help and object libraries set Parser definition files profiles command definition files inc Include files script Script files exa Examples The following are above MBSROOT same for prod and deve mbs Top directory Alias definition script MBS login scripts mbs news News files inf and txt 2 7 2 Naming Conventions File Names Sometimes it is useful to mark files with a certain content by filename extensions i e setup usf where usf stands for user setup file The advantage is that one can select the files in directories but need not specify the full name in commands where there are defaults for the extensions For example help files have the extension h1p but in commands you can omit this extension The following is a list of extension defaults recognized in MBS pdf Parser definition file Text file containing definitions for setup files usf User setup file Text file containing parameters and values describing the setup mrf Master readout file Text file containing specifications for CAMAC readout tables urf User readout
143. perating system must be des ignated as the branch master ie must have read write access to remote subevent pipes In VSB based systems it has therefore to be the VSB master to read write from into the VSB slave address window To set a CVC as VSB master the front panel switch has to be set to 0 and the CVC rebooted E6 and E7 work per default simultaneously as VSB master and slave The Version 4 3 October 28 2003 17 GSI Multi Branch Svstem User Manual Hardware AEB EBI running under OS 9 is not allowed to be branch master therefore one needs a CAMAC or VME svstem for event building Similarlv the SMI FIFA setup needs a readout processor in CAMAC or VME With the new Struck FASTBUS Interface SF T340 it is possible to run Fastbus single crate svstems stand alone in combination with a VME processor board and a VME trigger module Apart from the branch master all controllers run as VSB or VME slaves This is done bv setting the front panel switch to a non zero value for the CVC and the AEB EBI and rebooting it Also the non intelligent crate controllers like CBVs must get a unique crate number bv setting the front panel switch to a non zero value On an E7 a specific slave VSB and VME address window can be set by the upper front panel switch For the E6 an internal chip has to be programmed to set the VSB slave address window The branch master reads the hardware modules in all crates equipped with non intelligent crate controllers and or its ow
144. r each data element can be skipped without knowing the header structure following this standard header 8 2 7 GSI Buffer Big Endian representation Generated from SA BUFHE TXT typedef struct 1 long 1 dlen Length of data field in words short i_subtype short i_type char h_begin Fragment begin at end of buffer char h end Fragment end at begin of buffer short i_used Used length of data field in words long 1 buf Current buffer number long 1 evt Number of fragments long 1 current i Index temporarily used long 1 time 2 Time stamp long 1 free 0 Byte order longword 1 long 1 free 1 Length of last event in buffer long 1 free 2 0 long 1 free 3 0 data field s_bufhe Event Spanning When an event does not fit into a buffer the total length of the event is copied into 1_free_1 of the buffer header The length field in the event header is then changed to the actual number of words of the event fitting into the buffer Then the byte h_begin is set in the buffer header Then the next buffer is used Byte h_end is set in the buffer header A standard element header 2 longwords length type subtype is written and then the remaining event data The length field of the element header is the number of words following 8 2 8 Streams and Buffers A stream is a set of contiguous GSI buffers Events may span over buffers but not over streams
145. re reserved for a general pipe control structure Then follow PIPE LEN subevent control structures 20 bytes each The remaining Version 4 3 October 28 2003 51 GSI Multi Branch Svstem User Manual Readout Control space is divided into two longword aligned data buffers The values for PIPE SEG and PIPE_LEN should be specified so that on average the data for subevents fit into the two data buffers Note that subevents cannot span over buffer boundaries It must be ensured that the largest subevent is not bigger than the size of one data buffer ie PIPE_SEG_LEN 20 x PIPELEN 1 2 The subevent data in the pipe buffers includes the subevent header s MAX SE LEN TRIGTYPI MAX SE LEN TRIGTVPI15 arrays These 15 param eters are optional and must ONLY be specified if user readout functions are used as readout method For table readout they can be ommited They specify the maximum size of a subevent in number of bytes as a function of crate number and trigger type For each trigger type which possibly will be fed into the trigger module the appropriate MAX SE TRIGTYPX must be found in the setup file RD FLG array 0 Crate shall not be read 1 Crate shall be read by master event builder 2 Crate shall be read by slave controller RD TYP Readout method 0 table readout CAMAC only user readout functions CONTROLLER ID array Type of crate controller 1 CVC 2 E6 3 E7 4
146. rom the histogram base 112 Version 4 3 October 28 2003 Histogramming histo histo disabled enable f his anal API disable histo Event buffer Figure 10 4 On line Analysis Flow Chart Version 4 3 October 28 2003 115 GSI Multi Branch Svstem User Manual Histogramming 10 3 3 f mbs anal Event Access and Return Status The analvsis routine has access to the event data before the event is formated into the usual standard event structure or a user defined one Therefore the event access is conducted with the help of the structure s form in which the addresses of the subevents are given struct s form 1 unsigned char bh ev begin flg unsigned char bh trig typ long lp stream seg long lp stream ctr unsigned char bh n frag long xpl dat start MBS N CR 1 unsigned long bl dat len MBS N CR 1 unsigned long lp daq status The important parts of the structure for this purpose bh trig typ Trigger type bh n frag Number of subevents so called event fragments xpl dat start i virtual pointer to data fragment i e subevent bl dat 1 length of data fragment in bytes with 0 i lt bh n frag The details of the subevent fragment data structure depend on the readout see 5 2 3 page 30 The following return status values of f mbs anal are interpreted by the collector ERR SUCCESS Successfull completion ERR ERROR Fatal error Disabling histogramming wi
147. rver sends first four longwords with information about buffer sizes and streams Endian longword must be 1 Buffer size bytes Buffers per stream Number of streams N After this the client must request a stream by sending three longwords all zero and then read one complete stream The GOOSY Transport Manager checks if the buffer parameters are conform to its own ones and disconnects if not 9 2 Iransport Server When a client Le a GOOSY Transport Manager connects to the MBS Transport the server sends first four longwords with information about buffer sizes and streams Endian longword must be 1 Buffer size bytes Buffers per stream Number of streams Q N P This is the same information as the stream server sends after accepting a client After this the client must read buffer by buffer The GOOSY Transport Manager checks if the buffer parameters are conform to its own ones and disconnects if not Note The buffer size can be specified in GOOSV TMR bv command 88 Version 4 3 October 28 2003 Event Servers INIT ACQ TCP size lt bytes gt But this command can only be executed once Therefore the TMR must be restarted to change the buffer sizes 9 3 Event Server This server runs on Lynx as a component of MBS The client handling is the same as in the GOOSY PAW server Clients may use both servers without change The difference is that the event server is written entirely in C and that it gets its dat
148. rz Lynx setup readout collector multi branch systems Tel 2979 R S Mayer Event server error message handling 1992 1995 W Ott Message logger transport stream server taping Tel 2979 D Schall CVC hardware trigger left GSI in 1996 The authors thank Margareta Hellstr m and Piotr Koczon for useful hints and for reviewing this manual resulting in substantial enhancements Further suggestions to enhance the manual are welcome The manuals are accessible also through WWW http www gsi vms gsi de img doc or http www gsi vms gsi de daq home H Essel gsi de 6 Version 4 3 October 28 2003 Summarv Chapter 2 Overview GMC MBS INTRO 2 1 Summary The Multi Branch System MBS runs under the operating system Lynx OS v2 5 a realtime UNIX system Almost all of the software is written in GNU C The tcsh shell must be used in order to run the system The software runs on the GSI developed CAMAC processor board CVC on the ELTEC E6 and E7 VME processors and on VME PowerPC platforms CES RIO2 Although the data acquisition system is called Multi Branch System MBS it is in fact scalable from small single crate CAMAC or VME systems single branch systems with multiple intelligent controllers to large hierarchical structured multi layered multi branch systems CA MAC VME and FASTBUS are supported The data bus between crate controllers and event builders can be memory mapped like VME bus differential VSB bus and PVIC CES
149. sec utively always starting from RD HOSTNAME 0 RD HOST FLAG array Flag corresponding to RD HOSTNAME XV to indicate the type of the node where to read from 0 nothing to read 1 pipe must be read the node where to read from is a branch master 2 pipe must be read the node where to read from is NOT a branch master but node above layer 0 Nodes where to read pipes from must also be indicated beginning with index 0 of the array and filling up consecutively SBS SETUP PATH 0 SBS SETUP PATH 15 array of strings 127 useable chars each This parameter string is only required if RD HOST FLAG with the corresponding index indi cates that a node where to read from is a branch master The full pathname where the single branch setup is found must be specified RD PIPE BASE ADDR array Specifies the base address of the pipes to read out as seen from this host The length and structure of the read pipe will be obtained by parsing either the single branch setup file or the output pipe specification in the corresponding ML SETUP Version 4 3 October 28 2003 67 GSI Multi Branch Svstem User Manual Multi Laver Multi Branch Svstems faciltiv in the set_ml usf file In this way the pipe specification is kept exclusively in one place OUT MODE Output mode of the collector running on this node 1 Write data from all read pipes into an output pipe 2 Format events into event buffer streams 3 Do 1 and 2 The next three p
150. ser took full control over the subevent header and does not change it any more By this method the readout function can overwrite the values in the subevent header i e type and subtype If ps_veshe 1_dlen is not changed the system sets it using the parameter 1 se read len which must be correctly set by the readout function anyway As long as the readout function does not split its data buffer into several subevents ps_veshe 1_dlen must be 1 se read len 2 2 if set It is possible to generate e g two subevents instead of one for one event in one readout function In that case ps veshe 1 dlen must be set to length of 1st subevent gt 2 2 Behind length of 1st subevent gt bytes in the data buffer there must be the second subevent header followed by data This subevent header must be filled properly 1 se read len 2 2 still must return the total length of the data buffer 6 6 4 User Readout Functions on AEB EBI under OS 9 The AEB EBI runs as an intelligent crate controller only under the operating system OS 9 It can be used only as a slave controller running the readout task m read aeb slave The hardware readout is executed by FAS TBUS function calls which invoke actions on the FASTBUS engine of the AEB Therefore the f user c template as found on an AEB in the directory mbs prod src contains again the functions f user init and f user readout but with a reduced set of argu ments passed On the AEBs directory mbs prod src is mou
151. sion 4 3 October 28 2003 Kevword Summarv 121 GSI Multi Branch Svstem User Manual Kevword Summarv MBS key words Keywords In the following the MBS command keywords are listed with their oc curance in the commands 1810 LECROY SET SMI 1810 LECROY 18724 LECROY SET SMI 1872 LECROY 1872 LECROY SET SMI 1872 LECROY 1875A LECROY SET SMI 1875A_LECROY 1875 LECROV SET SMI 1875 LECROV 1881M LECROV SET SMI 1881M LECROV 122 Version 4 3 October 28 2003 1881 LECROY SET SMI 1881 LECROV 1882F LECROY SET SMI 1882F LECROY 1885F LECROY SET SMI 1885F LECROY ACCESS ACCESS SMI REMOTE ACCESS ACQUISITION START ACQUISITION STOP ACQUISITION ARECEIVER SET ARECEIVER FLUSHTIME START ARECEIVER STOP ARECEIVER ATTACH ATTACH BASE BASE Version 4 3 October 28 2003 MBS keywords 123 GSI Multi Branch Svstem User Manual Kevword Summarv ATTACH BASE CREATE BASE DELETE BASE DETACH BASE DUMP BASE RESTORE BASE BROADCAST READ SMI BROADCAST WRITE SMI BROADCAST CAMAC CAMAC CNAF CAMAC FILE CHANNEL SET HISTOGRAM CHANNEL CLEAR CLEAR DAQ STATUS COUNTER CLEAR DAQ STATUS PROCTAB CLEAR DAQ STATUS STATUS CLEAR HISTOGRAM CLEAR PIPES CLEAR POLYGON CLEAR SMI FASTBUS CLEAR TRIG MOD CLEAR WINDOW CLOSE CLOSE FILE 124 Version 4 3 October 28 2003 CNAF CAMAC CNAF CNAF COMMANDS DEFINE COMMANDS COMMENT COMMENT CONDITION CREATE CONDITION INCLU
152. t subtype SE CONTROL This parameter can be used freely by the user but it is strongly recommended to put a branch identifier in multi branch systems at this place to be able to identify branches in analysis programs SE PROCID Subevent processor identifier which can be set freely by the user NOTE Don t mix up subevent type and event subtype 6 4 Readout Specification Both readout methods table readout and user readout proceed in the following way After the command START ACQUISITION the init function is called which executes actions but no data will be moved into the event stream This is intended for proper initalization of hardware modules Then a software trigger with type 14 is send to the trigger module which starts an event readout sequence The first event after START ACQUISITION is always of trigger type 14 After that the system waits for hardware triggers and for each occurrence an event will be built The STOP ACQUISITION command initiates a software trigger of type 15 which also starts a normal event readout sequence Thus the last event in the data will always be trigger type 15 Version 4 3 October 28 2003 55 GSI Multi Branch Svstem User Manual Readout Control 6 5 Table Readout Svntax see also 8 1 3 page 77 Table readout is only possible in systems which include only CAMAC modules It is specified in two steps First a master readout file i e read mrf which specifies the filenames for the init i e
153. ta acquistion ENABLE HISTOGRAM basename m collector m collector Enables histogramming during data acquis tion ENABLE IRQ E m util m util Disables trigger module to send IRQ or LAM ENABLE RECEIVE DATA m dr m dr Enables data receive of a dr node ENABLE TCP INCLUSIVE EXCLUSIVE m transport m transport Enables tcp connection ENABLE TRIG MOD m util m util Enables trigger module on trigger bus HELP k1 k2 k3 k4 k5 library m prompt m prompt Outputs help information by keywords INITIALIZE SMI FASTBUS m smi m smi Initializes FastBus INITIALIZE TAPE label tape m transport m transport Initializes tape LOAD ML SETUP usffie m util m util Loads setup file of multi layer multi branch daq system LOAD MO SETUP usf file m util m util Loads setup file multi output collector mbs system LOAD READOUT usffile m read meb m read meb Loads readout table 144 Version 4 3 October 28 2003 Command Summarv LOAD SETUP usf file crate_nr m util m util Loads setup file LOAD SLAVE READOUT usf file m read cam slav m read cam slav Loads readout table LOAD SMI PEDESTAL slot range channel value m smi m smi Write to pedestal memory of SMI LOAD SMI THRESHOLD range value m smi m smi Write threshold to SMI MOUNT TAPE tape m transport m transport Mounts tape NEWS facility item path ALL m dispatch m dispatch Outputs news OPEN FILE name
154. tate to TIME WAIT and disappear 5 5 4 Recovery It may happen that something hangs up There are some steps one may perform to restart a hanging system before rebooting all nodes Trv in MBS or PRM to kill all tasks by command STOP TASK ALL This stops all tasks except the message loggers and dispatchers If that does not work use shell command remote reset to kil MBS tasks on remote nodes cleanup message files and DAQ status file lt file gt contains one node name per line Note that the shell command must be lowercase remote show local local node remote show node one node remote show O file nodes from file file remote reset local local node one node remote reset lt node gt remote reset lt file gt nodes from file file The command remote reset local does the same as the following single steps 1 Use alias tasks to get the IDs of tasks which are still running Kill them 2 Use ps command to see if all MBS tasks are gone 3 Initialize the control and status segment by alias inimbs 4 Clear the message and command communication by alias msg new When there are connections in states other than ESTABLISHED check if all clients closed their connections Then wait until all connections are OK or gone may take up to a minute To get Version 4 3 October 28 2003 39 GSI Multi Branch Svstem User Manual Running a Data Acquisition the netstat of all nodes use command remote sh
155. ter The first command starts the local environ ment The next ones execute the startup procedures of the remote nodes remote reset prm prm Ostartup where startup scom executes the lines written above 32 Version 4 3 October 28 2003 Controling MBS 5 3 Controling MBS A more detailed description of the commands can be found in the MBS command description manual 5 3 1 Acquisition Control data taking First some data taking control commands MBS START or STOP or SHOW ACQUISITION MBS gt OPEN or CLOSE FILE Writing to tape disk A START ACQUISITION generates trigger 14 by software Thus a user readout function may do some specific data collection for the first event Similar a STOP ACQUISITION generates software trigger 15 The event with trigger number 15 last event is traced through collector and transport to empty the buffer queues With remote environments SHOW ACQUISITION may output different information depending on the node where it is executed Some other commands SHOW TAPE TYPE EVENT lt events gt VERBOSE SET FLUSHTIME SHOW RATE CLEAR DAQ COUNTER Tape Handling The MBS writes the data in ANSI format to tapes or to disk files Tapes and files are written in standard GSI format but in big endian byte ordering Therefore on OpenVMS byte swapping must be done All GOOSY commands provide byte swapping Writing to tape requires some additional operations If the tape is new it must first be initialized
156. that write data into the event stream care is already taken for incrementing the subevent length and the pointer pl dat were the data has to be written The user is free to create further macros The syntax and parameters to pass for CAMAC macros are CNAF_RD_INIT c n a f offset Reads one CAMAC word from a module but writes nothing into the subevent data CNAF_RD c n a f offset Reads one CAMAC word and writes it as a long word into the subevent data CNAF_RD_OSUP c n a f offset Reads one CAMAC word checks if CAMAC data is zero if not writes 16 bit of data into bit 16 31 and an incremented channel number into bits 0 15 of a long word and writes it into the subevent If the CAMAC data value is 0 only the channel number is increased This is actually the same action as implemented for the standard table readout CNAF_TOUCH c n a f offset Dataless CAMAC function CNAF_WR c n a f data offset CAMAC write action c crate number n station number a subaddress f function Version 4 3 October 28 2003 59 GSI Multi Branch Svstem User Manual Readout Control data data to write into CAMAC modules offset pl_loc_hwacc if crate is the local of the intelligent crate controller were the readout task runs m read or m read cam slav offset pl rem camlcrate nr if crate is not local to the crate controller which reads that crate This can only be the master readout task m read wh
157. the home path specifying trusted hosts The file looks like trustedhost trusteduser CVC40 gsi de root e7_1 gsi de root The target node reads this file and checks if a request from a remote node is allowed 154 Version 4 3 October 28 2003 Release Notes 14 9 1 Default Path When a dispatcher is started directly by mbs the default path is the same as current PWD When tasks are started bv this dispatcher the default path of these tasks is the same When a dispatcher is started bv the prompter however the default path of this dispatcher and all its tasks is the HOME path of the user When the message logger is started bv interactive dispatcher the log file will be located on PWD The same is true when the message server is started bv the prompter 14 9 2 Relative Path Specifications NOT VET IMPLEMENTED Optionally one may set the environment variable MBSHOME to an arbitrary path Then this path will be the default path of all tasks except the message logger which still uses PWD for the log file All file references setup files readout files command procedures may then reference MBSHOME by DOT ie Mydir abc Note that independent of PWD the prompter uses MBSHOME as default path 14 10 Command Interface Syntax Command qualifiers switches are now preceded by a hyphen instead of a slash i e SBS com mand set verb on would in MBS be set verb on The advantage is that path specifications containing slashes no longer
158. tself as can be seen in figure 10 3 page 110 The length of the directory table i e the maximum number of histograms in the base must be specified The approximate length 108 Version 4 3 October 28 2003 m collector histo 1 histo 2 histo n Histogram Manager Figure 10 2 Histogram Access with Two Bases for one entry is 352 bytes The size of the data pool has to be specified Each histogram is described by a header with the following structure struct s spe 1 unsigned long ul attr short i slotlef short i slotrig long l bins 1 long l bins 2 long l dim long l data unsigned long l counts double d contents dim 1 long l outlim up counts Version 4 3 October 28 2003 flag next slot left sort next slot right sort number of bins in dim 1 number of bins in dim 2 dimension size relative pointer to data Offset LW total sum of counts no of counts that are 109 GSI Multi Branch Svstem User Manual Histogramming 110 long float float float float dim long long float float float float Header n Slots Data Pool Figure 10 3 Histogram Data Base Structure l_outlim_low_counts r_limits_low r_limits_up r_factor r_offset 22 l_outlim_up_counts_2 l outlim low counts 2 x r limits low 2 x r limits up 2 r_factor_2
159. ue The names are found in the help description of the command A 77 gives a list of commands and 777 gives a list of commands with arguments A command with 7 as argument gives the argument definition of the command Qualifiers are preceded by a space and a hyphen qualifier They cannot specifiy a value 4 4 Command Procedures Command files are called by 0 Extension scom is assumed if only the name is specified Com mand files may be nested A backslash after the filename outputs the lines during execution Arguments separated by spaces may be passed to command files In the files placeholders 1 8 are replaced by the arguments Strings N are replaced by without replacement Strings are replaced by N In this case a following placeholder will be replaced All text behind is ignored except is inside mbs lt file gt util lt file gt N mbs gt lt file gt pari lt par2 gt 4 5 Defaults There is currently no default mechanism exept in the action routines Version 4 3 October 28 2003 23 GSI Multi Branch Svstem User Manual Command Interface 4 6 Log File As mentioned already most messages of MBS are written into a log file mbslog 1 on the current directorv In the log file each message is written together with the date the time and the node name The log file is opened for append and closed for each message Different kinds of messages are marked in the log file by one character between time and no
160. up It is also possible to go even a step further and combine two separatly running multi branch systems to one hierarchically structured multi layer multi branch system Generally it is possible to set up hierarchical structured or multi layered data acquisition systems On the lowest hierarchical level layer 0 one has the branch masters controlling single branches On the next hierarchical level layer 1 some processors multi layer nodes could collect the data provided by the branch masters These nodes on layer 1 could itself write to output pipes which are read by a node of layer 2 and so on This tree like structure ends at the root with a single processor the master event builder On all nodes above layer 0 a collector task must run to collect data from pipes in the layer just below This collector can either format events into GSI buffers or write a single output pipe to be read by a collector of the layer just above or do both The pipes written by collectors are Version 4 3 October 28 2003 65 GSI Multi Branch Svstem User Manual Multi Laver Multi Branch Svstems Figure 7 1 Logical View of a Multi Laver Multi Branch Svstem Top is low structured in the same wav like the subevent pipes produced bv the readout tasks This means that a collector doesn t care if the pipe it scans is filled by a readout task or by a collector in a lower layer If the collector on a multi laver node is used to format events the m transport task must
161. up file must be loaded i e the same one used for the acquisi tion To execute CNAFs from remote nodes the ESONE module interface provided in GOOSY can be used The ESONE server m_esone_serv must be started On a GOOSY node a logical name CAMAC BRANCH 0 must be defined DEFINE CAMAC BRANCH O lt node gt ES lt user gt where node and user are specific An ESONE library to write ESONE clients is provided This library is available on VMS DECunix Lynx amd AIX See 11 page 117 m esone serv uses on CVC a CAMAC address window different from the readout Thus X and Q responses do not interfere In the setup file there is a parameter ESONE OFF which must be set to 0x60000 if one wants to use this extra window When the parameter is set to zero both readout and m esone serv use the same window On CPUs other than the CVC the parameter must be always zero T herefore one should never execute CNAFs on such CPUs when a readout task is running There is another parameter in the setup file which must be set properly to execute CNAFs That is PROC ID for each crate The values are CVC E6 ET AEB CBV CVI CAV Q and X inverted II Version 4 3 October 28 2003 35 GSI Multi Branch Svstem User Manual Running a Data Acquisition 5 4 On line Analysis 5 4 1 MBS Histogramming The MBS provides some tools for simple histogramming There are commands to handle his tograms CR
162. xecuted for tcsh shell The di rectory etc is in the group tree In the user specific login script the MBS specific script mbs prodlogin com must be executed It sets the default to the production version and defines alias names calling mbs alias prod com source mbs prodlogin com news lynx news daq One should not include the bin directories of MBS in the execution pathlist PATH because all tasks are called from shell by alias names With alias deve one executes mbs develogin com thus switching to the development version Alias prod again switches back to the production version by executing mbs prodlogin com All alias names are redefined accordingly Version 4 3 October 28 2003 29 GSI Multi Branch Svstem User Manual Running a Data Acquisition 5 2 Starting MBS 5 2 1 Steps To start MBS one must perform the following steps 1 Prepare the hardware and the on line programs for the frontend processors Prepare setup file see 6 3 page 49 Prepare readout files see 6 5 page 56 or functions see 6 6 page 57 Create an environment see below Start data taking or analvzing eroe del 5 2 2 Setup The setup profile describes the hardware and software setup It must be carefully checked The parser definition file for the syntax is mbs prod set setup pdf Examples of user setup files setup usf can be found in the directories in mbs prod exa a detailed description in 6 3 page 49 for a single branch setup and 7
163. y if a client is connected With n 1 the client gets all streams and defines the acquisition speed 9 1 2 Asynchronous Modes In NOSYNC mode there are two variants of KEEP modes Conditional Keep mbs gt set stream server scale lt n gt KEEP Version 4 3 October 28 2003 87 GSI Multi Branch Svstem User Manual Event Serving and Filtering Whith n 1 the server keeps each stream as long as there are more than 3 free streams available The effect is that during spill pauses the client will get as manv streams as it requests if there are anv but the acquisition speed mav slow down especiallv at high event rates but low data rates With n gt 1 keeping is switched off and the mode is like NOKEEP Scaled Keep mbs gt set stream server scale lt n gt SCALE The server keeps every nth stream as long as there are more than 3 free streams available The effect is that during spill pauses the client will get streams on request but maybe not as many as in KEEP mode At the other hand in SCALE mode the impact on the acquisition speed can be controlled With n 1 this mode is the same as KEEP The SHOW STREAM SERV command has been enhanced and displays the mode and counters The counters are only incremented if a client is connected One should play with the modes to get the best compromise of DAQ performance and data transfer rate for monitoring When a client i e a GOOSY Transport Manager connects to the stream server the se
164. y the routines The sources are on and DECunix in directory usr local GSI getevt the objects are in usr local GSI AIX lib libgsi a and usr local GSI AXP lib libgsi a respectively On OpenVMS the sources are in directory TOOL SOURCE the objects in library TOOL LIB TOOLIB OLB The routines are described in the MBS reference manual A brief description follows here f getevt open f getevt get f getevt close f getevt error f putevt open f putevt put f putevt close f putevt error 106 long 1 mode char amp c server s channel amp s chan char ppc_server_info f getevt open opens an event stream from specified channel s channel amp s chan long ppl buffer long ppl_goobuf f getevt get returnes address of event s channel amp s chan getevt close closes event stream of specified channel long Lerror char amp c string long lout f getevt error displays error messages char c file long l size long 1 stream long l type long l subtvpe s channel ps chan char ps filhe f putevt open opens an event output stream s channel ps chan long evt buf f putevt put outputs event s channel ps chan f putevt close closes specified channel long Lerror char amp c string long lout f putevt error displays error messages Version 4 3 October 28 2003 Histogramming Introduction Chapter 10 Histogramming GMC MBS HISTO 10 1 Introduction I
Download Pdf Manuals
Related Search
Related Contents
Philips Spiral 929689647201 使用上の注意はカタログー取扱説明書をお読みください Steinfurth Can Pressure Tester (CPT) télécharger le document Dicota MultiCompact InPro® 6950 Series O2 Sensors Instruction manual Samsung RT41JSPN Εγχειρίδιο χρήσης GUÍA DEL USUARIO DE SOFTWARE Samsung DV180F User Manual Copyright © All rights reserved.