I have created a set of new directories in the Physics EPICS tree on
the cebafb/e/h cluster. These contain all of the *.c and *.h files
that we (Hall B) have developed. They were all copied from the
$EPICS/base/src/dev, /drv, /rec and $EPICS/base/include
directories. The original files are undisturbed, in their original
locations. The new directories just contain copies at the
moment. They are maintained using cvs.
I would like people to try using the new structure. It is described in
detail below. As partially mentioned above, all of the things in the
old tree will work as they did before (makefiles, applications, IOC
load script, etc.). The new stuff is presently sitting off to the
side. If we decide to go as a group to the new scheme, or something
else similar, then the relevant files can be deleted from the old tree
and be used exclusively from the new tree.
The motivation for making this new directory tree is to allow
concurrent development of our software by multiple individuals. Up to
this point we have been using the current directory structure, not as
intended, but as one large repository, with all of us changing or
rebuilding the same copies of the core software potentially and
actually affecting the behavior of others' programs. In addition,
speaking for myself, I have been very reluctant to jump into the
production source area and play with the code, trying new things,
since everybody else would then have to deal with my bastardized
versions of the code while I was playing and count on me to restore
all files back to their original condition after I was done. I think
most of us would agree that this is an unacceptable way to work.
The original intention (as Johnny described it to me) was for our
local code to reside in the relevant individualized application
directory. The problem with this is that many of our applications are
sharing the same set of basic record and device support, and it is
desirable that there be one authoritative copy of this code, rather
that separate ones sitting in a bunch of different application
directories.
So please try it out. Let me know what you think.
Mark M. Ito, Thomas Jefferson National Accelerator Facility
12000 Jefferson Ave., Mail Stop 12H, Newport News, VA 23606
Email: marki@cebaf.gov, Office: (804)249-7175, Pager: (804)680-7175
-------------------------------------------------------------------
To get a private version of the Hall B EPICS core software:
> setup epics_physics/hallb # Our standard setup.
> cd local_dir # where local_dir is an arbitrary directory
# of your choosing. (You'll need ~1.5 MB)
> cvs checkout baseB # Get the current version of the software
# from cvs. The directory baseB will appear
# in your local_dir.
> cd baseB # Go to the new directory.
> install_baseB # Runs a cshell script that will install
# versions of the Hall B device support and
# record support. Messages that contain
# "Error 0" are OK.
The procedure presently creates the following four files:
local_dir/baseB/bin/mv162/devSupB
local_dir/baseB/bin/mv162/recSupB
local_dir/baseB/bin/mv167/devSupB
local_dir/baseB/bin/mv167/recSupB
I'm still working on the driver support stuff.
To use these files, in your IOC load script instead of the standard:
ld < iocCore
ld < drvSup
ld < recSup
ld < devSup
ld < seq
do the following (for example, with a 167 target):
ld < iocCore
ld < drvSup
ld < recSup
ld < local_dir/baseB/bin/mv167/recSupB
ld < devSup
ld < local_dir/baseB/bin/mv167/devSupB
ld < seq
Presently this will essentially overwrite the versions of the routines
that are already present in the standard record and device
support. Since right now the routines are the same, doing this should
make no difference to your application.
If for example you would like to modify the routine devAiLecroy.c in
our device support:
> cd local_dir/baseB/src/dev # go to the source directory
> emacs devAiLecroy.c # make your changes with the editor
> make TARGET=mv167 # rebuild the library
A new version of local_dir/baseB/bin/mv167/devSupB will be created
with your changes reflected. If you like your changes and would like
to incorporate them into the Hall B cvs repository then:
> cd local_dir/baseB/src/dev # same directory as above
> cvs commit -m "I changed it to make it better" devAiLecroy.c
The -m option is a required comment. If you want to make a longer
comment, leave out the -m and cvs will fire up an editor to let you
input your comment. Now all others that checkout baseB will get your
new version of the routine. And we know when the version changed. And
we know who did it. And we know why. And we can get back to the old
version if we want to.
Note the following:
o Until the "cvs commit" step in the above procedures you are free to
hack around to your heart's content without affecting anyone else.
o The directory structure under baseB is exactly the same as you find
under $EPICS/base.
o If you want to use the Hall B software without modification, then use
the files in the tree $EPICS/baseB (i. e. local_dir = $EPICS). These
should reflect a built version of the current cvs repository. You
should not modify files here. Rather make your own copy and play with
that.
o There is more to CVS than is mentioned here obviously. See the
document in:
$EPICS_PHYSICS/DOC/cvs.ps
Of particular interest is the "cvs release" command that will let you
see which files of your local copy you have changed, or whether they
have become "obsolete" due to someone else making a change in the
repository. "cvs diff" will let you see the differences between your
local copy and the one in the repository. Also "cvs add" will allow
you to add a new file or directory to the repository.
o My final goal is for us never to go into $EPICS/base or
$EPICS/extensions to change things and just let the Accelerator
Division maintain those directories, give us updates, new versions,
etc. If we have local versions of things that are in there, we can
maintain them separately on our own tree.
o I need feedback on whether I have identified the Hall B routines and
header files correctly, or if I have left any out. Your comments here
would be appreciated.