<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="to-look-into.xsl"?>
<!DOCTYPE halld-doc SYSTEM "to-look-into.dtd">


<!--
  to-look-into.xml

  Example XML document (contrived) showing XSL transformations (XSLT)
  and document validation using a Document Type Definition (DTD)

  This document is a valid XML document against its DTD. 

  Must use external program (e.g. XT) to perform XSL transformation, as 
  browsers don't support XML well yet.

-->



<!-- 
  Alternate css stylesheet instead of xsl transformation:
      <?xml-stylesheet type="text/css" href="to-look-into.css"?> 
-->





<halld-doc>

  
<prolog> 

<title>Software that might be interesting for Hall D</title>
<author>E.Wolin</author>
<date>26-Nov-2002</date>

</prolog> 



<body>


<topic>
<name>Introduction</name>
<par>
Below I list and comment on a number of software packages and strategies
that might be interesting for Hall D.  This list is incomplete, and
will change without warning.  For an interesting perspective on open-source
programming and other topics, see essays by
<ref addr="http://www.tuxedo.org/~esr/writings/">Eric Steven Raymond</ref>, 
especially "The Cathedral and the Bazaar".
</par>
</topic>


<topic>
<name>XML</name>
<par>
<ref addr="http://www.xml.org">XML</ref> has become the standard
portable data interchange format. We could use it for calibration files, configuration files,
<ref addr="http://www.uiml.org">GUI building</ref>, as well as for documentation.  I agree 
with Larry Dennis that all data interchange should be done in XML format except perhaps 
for event and monte-carlo data.
</par>
<par>
Note that the <ref addr="to-look-into.xml">base document</ref> for this document
(you may need to view the document source...many browsers don't display XML and related
files properly) is a valid XML document against its 
<ref addr="to-look-into.dtd">Document Type Definition</ref> (DTD, but see below).  
I used an 
<ref addr="to-look-into.xsl">XSL</ref> stylesheet
to transform the base XML into HTML 
(using <ref addr="http://www.w3.org/TR/xslt">XSLT</ref>, or XSL Transformations).  
See also a 
<ref addr="to-look-into.css">Cascading Style Sheet</ref> (CSS), an older
method to convert XML to HTML. 
</par>
<par>
XSLT generally transforms one XML document into another.
</par>
<par>
Note that DTD's have recently been superceded by 
<ref addr="http://www.xml.com/pub/a/1999/07/schemas/index.html">XML Schemas</ref>
</par>
<par>
Many parsers available in C/C++, Java, PERL, etc.  Two strategies are
SAX (stream-oriented), and DOM (Document Object Model). 
</par>
<par>
(I use XML in this document as an example;  I am not proposing a document format).
</par>
</topic>


<topic>
<name>Electronic logbook</name>
<par>
The CODA group at JLab is working on an integrated notebook/logbook tailored for experiment 
use (<ref addr="http://coda.jlab.org/codalog">Codalog</ref>).  
It is still under development.
</par>
<par>
The <ref addr="http://www.hep.net/hepnrc/LogBook.html">Control Room Logbook</ref>.
logbook uses XML to define a custom GUI implementing predefined widgets.
The <ref addr="http://www.csm.ornl.gov/enote/">DOE2000</ref> 
logbook was developed by a group of three national labs.
</par>
<par>
The <ref addr="http://medusa.fnal.gov/e-log_about.html">Fermilab</ref>
logbook is an extension of the DOE2000 logbook
(<ref addr="http://www-pat.fnal.gov/CRL/logbook.html">alternate link</ref>).
The <ref addr="http://midas.psi.ch/elog/">MIDAS</ref> project at Triumph provides
a simple but robust elog.  The 
<ref addr="http://clasweb.jlab.org/clasonline">CLAS online logbook</ref> 
can support the features in all of these, but lacks a sophisticated GUI.
</par>
<par>
See also a 
<ref addr="http://www-ese.fnal.gov/ods/ode/Electronic%20Logbook%20Evaluation.htm">
Fermilab review</ref> of electronic logbooks.
</par>
<par>
Products range from simple, single-thread, glorified flat-file managers with a web 
interface, to sophisticated, multi-threaded, self-notarizing "notebook" systems 
that accept documents and images of all types.  Some are 100% web-based, 
others stand-alone 
or mixed.  They use databases, xml files, html files, all three, or just flat files. 
</par>
</topic>


<topic>
<name>Code Management</name>
<par>
<ref addr="http://www.sourcegear.com/CVS">CVS</ref>
is a standard release and version control package.  I personally don't like
CVS much (single repository bias and lack of detailed history).
There are good commercial alternatives, but I'd rather use CVS than pay.
There are some public domain alternatives, none widely used yet.
</par>
<par>
One very promising package is 
<ref addr="http://www.bitkeeper.com">Bitkeeper</ref>.  Read the FAQ for 
an excellent overview and criticism of CVS.  Bitkeeper was developed for
and adopted by projects such as Linux kernel development.  I have been using 
Bitkeeper for a while and think we should use it.
</par>
<par>
See also the <ref addr="teamware.ps">Sun Teamware
document </ref> which describes a case study of a similar code
management system. 
</par>
<par>
Others:  <ref addr="http://subversion.tigris.org/">Subversion</ref>
is an improved CVS clone.
</par>
<par>
Some sites devoted to code management: 
at <ref addr="http://www.dmoz.org/Computers/Software/Configuration_Management/Tools/">www.dmoz.org</ref>
and
<ref addr="http://www.daveeaton.com/scm/CMTools.html">CMTools</ref>
</par>
</topic>


<topic>
<name>Frameworks</name>
<par>
We need to structure our software around some sort of formal framework.  
<ref addr="http://lhcb-comp.web.cern.ch/lhcb-comp/Frameworks/">Gaudi</ref>
from LHC-B can be used as a starting point for discussion, although I
believe it is too much for us.
</par>
<par>
See also an article on 
<ref addr="http://web.ftech.net/~honeyg/articles/ed.htm">Evolutionary Delivery</ref>
and other interesting notes from the 
<ref addr="http://atddoc.cern.ch/Atlas/DaqSoft/sde/Welcome.html">
Atlas DAQ Software Development Site.</ref>
</par>
</topic>


<topic>
<name>Geant4</name>
<par>
<ref addr="http://wwwinfo.cern.ch/asd/geant4/geant4.html">Geant4</ref>
is the future of simulations in HENP.  We should start learning Geant4.
</par>
</topic>


<topic>
<name>GGE and GPE</name>
<par>
<ref addr="http://erpc1.naruto-u.ac.jp/~geant4/">Graphical</ref> 
Geant4 geometry and physics generators might be useful.
</par>
</topic>


<topic>
<name>MCFAST</name>
<par>
We use <ref addr="http://www-pat.fnal.gov/mcfast.html">MCFAST</ref> now, 
it might even be useful for life of experiment, but 
it would need to be kept up to date with the standard (Geant4) simulation.
</par>
</topic>


<topic>
<name>Inter-Process Communication</name>
<par>
I have extensive experience
with <ref addr="http://www.talarian.com">SmartSockets</ref>, a
publish/subscribe interprocess communication package
(CLAS, also used in CDF), 
<ref addr="http://www.corba.org">CORBA</ref> is an old standard for remote
method invocation, but seems to be disappearing.  I think
CORBA is over-designed, overly complicated, old-fashioned, and
shouldn't be used.
<par>
</par>
Other products exist.  We need to decide on message-based vs. object-based.
The former is simpler and more flexible, the latter is for more tightly coupled systems.
</par>
<par>
Agents are a new concept which might be useful (there's loads of info...use Google). 
<ref addr="http://www.fipa.org">FIPA</ref> agents are being tested by the CODA group at JLab.
</par>
<par>
Perhaps <ref addr="http://www.w3.org/TR/SOAP">SOAP</ref> is the wave of the future.
Or maybe 
<ref addr="http://java.sun.com/products/jms/">JMS</ref> or SOAP's cousin
<ref addr="http://www.xml-rpc.com">XML-RPC</ref>, or a newcomer 
<ref addr="http://www.xmlblaster.org">XML Blaster</ref>.  See the latter under
internet resources for links to all kinds of middleware info.
</par>
</topic>


<topic>
<name>Controls Software</name>
<par>
Many commercial and public domain products and systems exist, perhaps we can unite them 
all under CDEV (see below).
Software must be evaluated along with available hardware by the online group.
CERN <ref addr="http://itcowww.cern.ch/">Controls Group</ref> evaluated many 
systems.  We should look carefully at the agent-based package being developed by the 
CODA group.
</par>
</topic>


<topic>
<name>CDEV</name>
<par>
<ref addr="http://www.jlab.org/cdev">CDEV</ref> unifies control
systems via a thin dispatch layer to multiple protocols, and is
mainly being developed at JLab.  It uses a
"device,context,command,datain,dataout" pardigm.  CORBA, SmartSockets,
and Java RMI could be layers under CDEV, but with some loss of
functionality.  
</par>
</topic>


<topic>
<name>EPICS</name>
<par>
I dislike <ref addr="http://www.aps.anl.gov/asd/controls/epics/EpicsDocumentation/WWWPages/EpicsFrames.html">
EPICS.</ref>  I think it's overblown, too complicated, out in left
field, closed and insular.  If you don't buy into EPICS completely you
soon start cursing it.  Epics has just now (2003) realized that Java
exists, an indication of neanderthal-think in the Epics community.
If the old guard gets overthrown and sensible people take over,
perhaps Epics may be interesting.
</par>
<par>
The <ref addr="http://www.cosylab.com">Abeans/Cosybeans</ref> framework looks intersting, and the JLab DAQ group may develop a controls framework.
</par>
</topic>


<topic>
<name>UML</name>
<par>
<ref addr="http://www.omg.org/uml">Unified Modeling Language</ref>
for software design...should look into this, but 
maybe wouldn't help much...should we get this formal?  UML seems to
have fizzled out as fast as it became popular...
</par>
</topic>


<topic>
<name>DOE2000</name>
<par>
The <ref addr="http://www-unix.mcs.anl.gov/DOE2000/">DOE2000</ref>
project will develop collaboration tools as well as numerical programming 
and visualization packages.  They may produce something useful for us.
</par>
</topic>


<topic>
<name>Databases</name>
<par>
Do we need an object-oriented database?  Relational databases (e.g. 
<ref addr="http://web.mysql.com">MySQL</ref>) should be adequate.
<ref addr="http://www.us.postgres.org">Postgres</ref> seems very good.
</par>
</topic>



<topic>
<name>Data format</name>
<par>
I have extended and improved the CODA binary i/o package (EVIO) to
meet Hall D requirements.  In particular, I added a new 1-word header
fragment type, and added full support for 8-byte data types.  I
further wrote a pair of routines that transform evio to xml (evio2xml)
and back (xml2evio).  evio2xml replaces cefdump, and probably
xcefdump.  I also wrote eviocopy, a utility that extracts selected
events from an existing evio file.  I think we should use EVIO for our
binary format.
</par>
<par>
For all other formats I propose we use xml or a compressed version of xml.
</par>
</topic>



<topic>
<name>ROOT</name>
<par>
Should we use <ref addr="http://root.cern.ch">ROOT?</ref>  
How deeply?  Many big experiments are using ROOT for their
data format, online histogramming, etc.  
</par>
</topic>


<topic>
<name>JAS</name>
<par>
Should we use <ref addr="http://www-sldnt.slac.stanford.edu/jas/">JAS</ref>.
Plotting widgets looks good.  BaBar using this for 
online histogramming and perhaps for offline analysis.  CNU has been
using JAS for the trigger analysis and is very happy with it.
</par>
</topic>


<topic>
<name>Code Documentation</name>
<par>
<ref addr="http://www-cs-faculty.stanford.edu/~knuth/lp.html">
Literate programming</ref> is an effort to document programs by
writing documents that contain code (i.e. a document-centric
approach).  These efforts haven't been too successful.  CWEB
is a variant for C++.  
</par>
<par>
The most successfull strategies are
those that document the code via comments, then use a syntax-sensitive
preprocessor to extract and reorganize the comments into documention
(i.e. code-centric systems).
<ref addr="http://java.sun.com/products/jdk/javadoc/index.html">Javadoc</ref>
is widely used for Java.  See also
<ref addr="http://www.stack.nl/~dimitri/doxygen/">Doxygen,</ref>
which handles multiple languages.
</par>
<par>
If we don't use a multi-language documentation package like Doxygen,
I believe we should use Javadoc for all Java programs, and pick
an equivalent for C++ (perhaps 
<ref addr="http://www.joelinoff.com/ccdoc/index.html">ccdoc</ref>).
</par>
</topic>


<topic>
<name>CLHEP</name>
<par>
<ref addr="http://wwwinfo.cern.ch/asd/lhc++/clhep/">CLHEP</ref>
is a widely used standard C++ HENP class library.
</par>
</topic>


<topic>
<name>HTL</name>
<par>
<ref addr="http://wwwinfo.cern.ch/asd/lhc++/HTL/">HTL</ref>
is a the LHC++ Histogram Template Library.
</par>
</topic>


<topic>
<name>STDHEP</name>
<par>
<ref addr="http://www-pat.fnal.gov/stdhep.html">STDHEP</ref>
is another standard C++ HENP Monte Carlo class library.
</par>
</topic>


<topic>
<name>CERN ASD</name>
<par>
Who knows what else might be useful from the CERN
<ref addr="http://wwwinfo.cern.ch/asd">ASD.</ref>
</par>
</topic>



<topic>
<name>ZOOM, FNAL stuff, etc</name>
<par>
We need to check out 
<ref addr="http://www.fnal.gov/docs/working-groups/fpcltf/fpcltf.html">
ZOOM</ref> and other 
<ref addr="http://www.fnal.gov/cd/main/docsoft.html">Fermilab</ref>
and 
<ref addr="http://runiicomputing.fnal.gov/">Fermilab Run II</ref>
 offerings.  
<ref addr="http://www.freehep.org">FreeHEP</ref> lists lots of stuff.
Also:
<ref addr="http://cactus.phyast.pitt.edu/~joe/hepvis/hepvis.html">HepVis</ref>, 
OpenInventor from SGI, and 
<ref addr="http://www.lal.in2p3.fr/OpenScientist">OpenScientist</ref>.
</par>
</topic>


<topic>
<name>NAG libraries</name>
<par>
<ref addr="http://www.nag.co.uk">NAG</ref>
replaces mathematical parts of Cernlib, but costs money.
</par>
</topic>


<topic>
<name>Velocity, servlets, PHP, JSP, JavaScript, etc.</name>
<par>
For server- and client-side scripting, document transformation, etc..
Velocity + servlets looks very good, JSP and PHP violate the MVC (model-view-controller)
paradigm.  Javascript still seems useful.
</par>
</topic>


<topic>
<name>Colt</name>
<par>
Java <ref addr="http://tilde-hoschek.home.cern.ch/~hoschek/colt/index.htm">
numeric and analysis libraries</ref> from CERN.
</par>
</topic>


<topic>
<name>SoftRelTools</name>
<par>
Software <ref addr="http://runiicomputing.fnal.gov/runiiweb/cmgt.html">
release tools</ref> used by BaBar, CDF, D0, etc.
</par>
</topic>


<topic>
<name>STL</name>
<par>
C++ <ref addr="http://www.accesscom.com/~iburrell/cpp/stl.html">
Standard Template Library</ref>, widely used.
</par>
</topic>


<topic>
<name>Alternatives to Make</name>
<par>
I don't like Make.
<ref addr="http://www.dsmit.com/cons/">CONS</ref> from GNU is worth looking at.
and perhaps
<ref addr="http://www.canb.auug.org.au/~millerp/cook/cook.html">COOK.</ref>
</par>
<par>
See also a critique of 
<ref addr="http://www.canb.auug.org.au/~millerp/rmch/recu-make-cons-harm.html">
recursive make.</ref>
</par>
<par>
Recent alternatives:
<ref addr="http://jakarta.apache.org/ant/index.html">ANT</ref> from
Apache (java only), 
<ref addr="http://www.bell-labs.com/project/nmake/">nmake</ref> from Lucent, and 
<ref addr="http://www.freetype.org/jam/">JAM</ref>. 
</par>
</topic>


<topic>
<name>WIRED</name>
<par>
CERN web-based <ref addr="http://wired.cern.ch/">event display</ref> package.
</par>
</topic>


<topic>
<name>GUI Markup Languages</name>
<par>
XML based GUI generation may be interesting:
<ref addr="http://www.uiml.org">UIML</ref>, <ref
addr="http://www.alphaworks.ibm.com/formula/bml">BML</ref>, probably others.

</par>
</topic>

<topic>
<name>Kalman Filter fitting</name>
<par>
We must learn how to do a Kalman filter track fit.  A package from 
<ref addr="http://cmsdoc.cern.ch/~sijin/oo.html">CERN</ref> might be interesting.
if they did a good job.  Better perhaps is an algorithm from CLEO called
<ref addr="http://www-cpd.fnal.gov/personal/kutschke/Tracking/Kalman/cbx_96-20.ps
">"Billoir" fitting.</ref>  Billoir apparently worked out how to include 
energy loss in the usual Kalman fit formalism, a major advance.
</par>
</topic>


<topic>
<name>FNAL OO experts</name>
<par>
Should we invite them here for discussions?
</par>
</topic>


<topic>
<name>Mozilla tools</name>
<par>
<ref addr="http://www.mozilla.org">Mozilla</ref> has a number of interesting
tools, e.g. Bugzilla, Bonsai, Tinderbox, etc.
</par>
</topic>


<topic>
<name>Software Configuration</name>
<par>
Should we use a software configuration tool, e.g. 
<ref addr="http://www.gnu.org/software/autoconf">autoconf?</ref>
</par>
</topic>


<topic>
<name>Video/Audio/PPT archives</name>
<par>
CERN has an interesting system for archiving conferences.  They
combine video, audio, and ppt presentations in one unified
presentation called <ref addr="http://webcast.cern.ch">webcast.</ref>
An LHC <ref addr="http://documents.cern.ch/age?a00116">XML
conference</ref> was recorded this way.
</par>
</topic>


</body>

</halld-doc>
