Notes and Further References
None so far.
Exercises
Before running any exercises see tutorial preparation.
To create a test release, first decide a name. For the purposes
of this exercise call it MyTest and assume that it is to
be created in the directory called <myname> that you own.
Carry out the following steps:-
- Move to your working directory:-
cd <myname>
- Create the release:-
newrel -t development MyTest
This will create the subdirectory MyTest and set up some subdirectories
ready for srt.
- Now
cd MyTest
srt_setup -a
This defines the environmental variable
$SRT_PRIVATE_CONTEXT that will point to <myname>/MyTest.
- Initially the Test Release is empty; everything will still come
from the development Base Release, so the next thing to do is to add
the package that you want to modify, but this will involve pulling a
copy out of the Repository as explained in the
cvs. This should be done automatically when
you use the addpkg command.
- Now you can add the packages you want to modify, in your
case its only Demo:-
addpkg -h Demo
and should see cvs copying them into your Demo subdirectory.
If this fails it may be that anonymous cvs read access has not been
enabled so, as explained in the
Remote cvs access
slide:-
setenv CVSROOT :pserver:anonymous@minoscvs.fnal.gov:/cvs/minoscvs/rep1
cvs login
If you don't know it, ask someone else in MINOS the password.
Now try the addpkg command again.
-
Next build the Demo library libDemo.so:-
gmake Demo.all
If you want to confirm the library really has been built type:-
ls -l $SRT_PRIVATE_CONTEXT/lib/$SRT_SUBDIR/libDemo.so
SRT places libraries below the lib/ directory in a subdirectory that
is specific to the platform and compiler. For example $SRT_SUBDIR =
Linux2.4-GCC means the Linux kernel 2.4 running the gcc compiler.
- Finally run loon just to confirm that it is working:-
cd ../
loon -q $MINOS_TUTORIAL_MACROS/run_EventDump.C $MINOS_TUTORIAL_DATA/F00018143_0000.mdaq.root
Although loon has not been rebuilt, thanks to the wonderful world of dynamic
libraries, it should load your libDemo.so instead of the standard on.
Of course, at this stage it is identical to the standard one
but at least it confirms that you build produced a valid library.
Once you logged out the $SRT_PRIVATE_CONTEXT variable will no longer
be defined. As explained in the slide above when you log back
in you will have to remember to:-
cd /MyTest
srt_setup -a