Instructions for installing MIDAS (as recorded by EF) ------------------------------------------------------ (examples on ef2p@helana.phys.virginia.edu/pen/analyzer and frlez@pc4926.psi.ch/analyzer_root) 1. Go to http://savannah.psi.ch/viewcvs (you can log in as pibeta with new pibeta password) (savannah.psi.ch is the PSI central point for development, distribution and maintenance of software projects. See http://subversion.tigris.org/) 2. Select "midas" 3. You can use the directory revision "3313". This is a stable version (Aug. 2006). Use higher versions at your own peril. The system used is SVN package. SVN - subversion project is a version control system that is a compelling replacement for CVS in the open source community. 4. If you click on "Download tarball" midas.3313" will be saved on the disk as "trunk.tar.gz". Rename it to, say, midas3313.tar.gz. Then uncompress and expand tar -zxvf midas3313.tar.gz 5. The resulting files are the midas source files, in my example residing in "/home/ef2p/pen/midas". 6. Next, create a new subdirectory for compiled MIDAS. The compiled MIDAS (libraries, binaries, etc) should be in a different subdirectory from sources. E.g., I have used "mkdir /home/ef2p/pen/MIDAS". 7. Edit Makefile: change prefix to the subdirectory that contains the midas source files. E.g., we have downloaded the midas source to helena.phys.virginia.edu. The PREFIX line in Makefile then is (Emil's subdirectory): PREFIX = /home/ef2p/pen/MIDAS 8. Edit Makefile. Set "NEED_ZLIB=1". This provides optional zlib support for analyzer (reading and writing the compressed files.) 9. For compilation you will also need "mxml.c" library. The copy can also be downloaded from http://savannah.psi.ch/viewcvs/?root=mxml (I use the version 42) As analyzer sets "MXML_DIR=../mxml", I put the library at /home/ef2p/pen/mxml subdirectory (mxml is "Minimal XML - Dom oriented library". See http://mxml.sourceforge.net/apidoc-plus/) 10. Compile MIDAS with "make" "make install" (For "make install" you might need the root privileges. Call your system administrator.) 11. In your login file (I use "csh" shell so I edit .cshrc) set the subdirectory for MIDAS executables and the analyzer subdirectory: setenv MIDASSYS /home/ef2p/pen/MIDAS setenv MIDAS_DIR /home/ef2p/pen/analyzer 12. Also, set PATH: setenv PATH /home/ef2p/pen/MIDAS/bin:/home/ef2p/pen/analyzer setenv PATH ${ROOTSYS}/bin:${PATH} 13. If you use bsh, edit .bash_profile: MIDASSYS =/home/ef2p/pen/MIDAS export MIDASSYS MIDAS_DIR =/home/ef2p/pen/analyzer export MIDAS_DIR PATH =/home/ef2p/pen/MIDAS/bin:/home/ef2p/pen/analyzer export PATH PATH =${ROOTSYS}/bin:${PATH} export PATH 14. You should use the recent version of ROOT, e.g., I use ROOT 5.08/00 15. Copy PIBETA analyzer files with root objects from ef2p@helena.phys.virginia.edu:pen/analyzer/* 16. Check that experm.h is the current one or the one you want to use. Set the correct value for N_BADC (12 or 36) in "analyzer.h" in "analyzer.c" add BTDC bank (new CAMAC TDC) and RDSC bank (Aquaris digitizer). Also set in analyzer.h N_BTDC (=8) and N_DGT (=3000) 3000 = 1000+1000+1000, meaning 1000 channels for B0, DEG, and TGT waveforms. 17. Create a big enough odb: odbedit -s 2000000 18. Recompile the analyzer cd /home/ef2p/pen/analyzer make 19. Run analyzer: ./analyzer -s 0 -i run60703.mid -o run60703.root ("-s 0" means "switch off the server" and is used in offline running.) 20. In odb "set /Analyzer/Book TTree n" 21. View the results: root run60703.root 22. Useful program for offline viewing "roody" - root display See http://midas.triumf.ca/roody/html/. Useful ssh flag "ssh -Y" - trusted X11 forwarding Emil Frlez, Aug. 25, 2006