SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Det. Search
Who's who?
Meetings
FAQ
Images
Archive
Systems
Performance
Intern. region
Vertex Tracker
Drift chamber
DIRC
Calorimeter
IFR
LST
Magnet
Electronics
Trigger
Operations
Run Coordination
Contact Experts
Shift Takers Info
Operations Manual
Electronic Logbook
Ops Hypernews
Shift Signup
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)
 
EMT Monitoring

Fast Monitoring Code 
Tower Mask
HOW TO RUN JAS FROM YOUR HOME
Installing the new L1TMonTools Package yourself 
Installing reference histograms 
The QuickMon

FAST MONITORING CODE

All the Level 1 Trigger fast monitoring code is to be found in L1TFMon/L1TFMonEmt.cc/hh . This package also contains the cron job which uses cronFMon.kumac and thus shiftFMonEmt.kumac. These kumacs call histos by number so if you add histograms to L1TFMonEmt.cc then you should be careful to update these numbers too. You can run the Monitoring job yourself using a command like:
L1TFMonXtcApp -b3000000 -n<# of events> -f XTCFILE.xtc L1TFMonXtcApp.tcl
xtcfiles can be found in /a/tcstage/tcfiles (not visible from Bristol Linux boxes). Or staged to that area using "tcstage 'tcstage [RUNNUMBER]'". Even more recent xtcfiles are in /nfs/bbr-srv02/u2/.
You can change the doExpert or doEmtExpert flags in tcl for even more histos.

TOWER MASK

In order to get the tower mask from the DB, use is made of the IR2LiveL3 histograms which are available to JAS. These access the DB through configDict, an instance of a ProxyDict. There are two modules added to the L3 job that allow this. They are to be found in L1EmtConfig. They are:
L1EmtConfigLoader.cc/hh which loads the EMT proxies into configDict.
L1EmtConfigMonitor.cc/hh which gets an L1EmtAxRecord object from the configDict and fills the tower mask histo.
 

This then is accesible to JAS as "IR2LiveL3/L1EmtConfigMonitor emtTowerMask"

HOW TO RUN JAS FROM YOUR HOME

Make a trickle stream:

On a tersk machine (tersk03 say):
cd /nfs/bbr-srv02/bfdist/Builds/8.6.5-online-1-LiveFastMon.c.test
OepSimplePlaybackApp -f /nfs/tcstage/tcfiles/babar-0016990-001.xtc playback.tcl

On another tesk machine:
cd /nfs/bbr-srv02/bfdist/Builds/8.6.5-online-1-LiveFastMon.c.test/
srtpath
ambientboot
cd workdir
LiveFastMon -h tersk04 tersk03 24245
LiveFastMonJas -h tersk04 -n LiveFastMon-wah

On your machine of choice (local LINUX box)
cd /nfs/bbr-srv02/bfdist/Builds/8.6.5-online-1-LiveFastMon.c.test
bin/SunOS5/RemoteBabarJas
 

To run on an hbook file instead

On whatever (SUN)
HbkServer -n wahserver -f  l1tfmonxtcapp2-17336.hbook

On tersk04
cd /nfs/bbr-srv02/bfdist/Builds/8.6.5-online-1-LiveFastMon.c.test
JasInterfaceServer -n LiveFastMon@Dot/wahserver -u 5 -V

On your machine of choice (local LINUX box):
cd /nfs/bbr-srv02/bfdist/Builds/8.6.5-online-1-LiveFastMon.c.test
bin/SunOS5/RemoteBabarJas

to run on the IR2 trickle stream:

I find it easiest to use my local LINUX box and simply run:
/nfs/bbr-srv02/bfdist/Production/bin/SunOS5/RemoteBabarJas

but, if that fails, you could try (EDs Instructions)
ssh tersk01
setenv NO_AWT_MITSHM true
cd /nfs/bbr-srv02/bfdist/Production
srtpath
RemoteBabarJas

Installing the new L1TMonTools Package yourself

Make a new tag of L1TMonTools then:
cd /nfs/bbr-srv02/bfdist/MonitoringData
srtpath
addpkg L1TMonTools VXX-XX-XX
LiveFastMon-html-install .
chmod -R g+w .

This should be visible in JAS immediately

Installing reference histograms

Find a nice run with good statistics in /nfs/bbr-srv02/u4/FastMon/Outputs/LiveFastMon/ numbered by start time.
Make a new hbook file with just the directory L1TFMon in it by doing, in PAW (I'll write a kumac soon):

h/fil 1 [OLD FILE]
h/fil 2 [NEW FILE] ! N
cd //LUN1/L1TFMON
hrin 0
cd //LUN2
mdir L1TFMON
cd //LUN2/L1TFMON
hrout 0
close 1
close 2

copy it to /nfs/bbr-srv02/u4/Monitoring/References/L1T/LiveFastMon/ l1trefhis_[DATE].hbook.
Break and remake the link LiveFastMon.hbook to point at your new one.
cd /nfs/bbr-srv02/bfdist/MonitoringData/
srtpath
LiveFastMon-hbook-install . LiveFastMon                              - error messages will appear as it fails to find L3 and OEP refs. You should say yes to replacing the merged hbook                                                                                                            (make a backup of it - if you are concerned - its in /nfs/bbr-srv02/u4/Monitoring/References/merged)
chmod -R g+w References/merged/LiveFastMon.hbook  .                -so other people can change it (note the . at the end !)

now you need to restart the reference server (you could get the shifter to do this)
or look at
/BFROOT/www/Detector/Operations/shifts/DQM_shortterm.html
for the instructions on "resetting the reference server" given here:
1.ssh bbr-con11 -l babar (get password from shift leader if you do not know it)
2.cd /static/logfiles/Oep/tmp/refServerTest
3.srtpath
4.DotAdmin -n LiveFastMon-ref -s
5.hbsRun >& /dev/null &

The QuickMon

The QuickMonEmt.pl is a script that runs QuickMon.kumac on your choice of recent FastMon hbook files
which are dumped out when FastMon is cleaned up in IR2 and reside in /nfs/bbr-srv02/u4/FastMon/Outputs/LiveFastMon/.
It produces a ps file viewable from the comfort of your home.
Presently the plots include the Phi/Theta occupancy plot with and without an energy cut, the EMC digi occupancy, the energy/time plot and the energy spectrum.
These may be changed in the kumac to suit changing needs.
The numbers of the histograms dumped by LiveFastMon can change unpredictably so the kumac contains a method wherby histos are referred to by name.