From: <ro...@us...> - 2011-10-18 17:58:25
|
Revision: 2561 http://nscldaq.svn.sourceforge.net/nscldaq/?rev=2561&view=rev Author: ron-fox Date: 2011-10-18 17:58:18 +0000 (Tue, 18 Oct 2011) Log Message: ----------- Merge scaler display from 8.2 where it had diverged slightly in the meantime Modified Paths: -------------- trunk/nextgen/ChangeLog trunk/nextgen/configure.ac trunk/nextgen/docbuild/Makefile.am trunk/nextgen/docbuild/tutorial.xml trunk/nextgen/utilities/scalerdisplay/scaler.tcl Modified: trunk/nextgen/ChangeLog =================================================================== --- trunk/nextgen/ChangeLog 2011-10-18 16:50:56 UTC (rev 2560) +++ trunk/nextgen/ChangeLog 2011-10-18 17:58:18 UTC (rev 2561) @@ -88,5 +88,8 @@ to try to get better synch with the scaler trigger clock. - Fix error in CRingSelectionPredicate...would not allow the last ring item to be fetched until more were in the ring. +October 18, 2011 10.0-015 + - Pull in up to date scaler display program from 8.2..which + diverged after this forked off. Modified: trunk/nextgen/configure.ac =================================================================== --- trunk/nextgen/configure.ac 2011-10-18 16:50:56 UTC (rev 2560) +++ trunk/nextgen/configure.ac 2011-10-18 17:58:18 UTC (rev 2561) @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT(nscldaq, 10.0-014, fo...@ns...) +AC_INIT(nscldaq, 10.0-015, fo...@ns...) AC_CONFIG_SRCDIR([/utilities/StringsToIntegers.h]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) Modified: trunk/nextgen/docbuild/Makefile.am =================================================================== --- trunk/nextgen/docbuild/Makefile.am 2011-10-18 16:50:56 UTC (rev 2560) +++ trunk/nextgen/docbuild/Makefile.am 2011-10-18 17:58:18 UTC (rev 2561) @@ -1,6 +1,7 @@ EXTRA_DIST = alltsts.tcl docbuilder.tcl \ fragmenttest.tcl mansectests.tcl \ - metadirtest.tcl walkdirtest.tcl + metadirtest.tcl walkdirtest.tcl \ + tutorial.xml Modified: trunk/nextgen/docbuild/tutorial.xml =================================================================== --- trunk/nextgen/docbuild/tutorial.xml 2011-10-18 16:50:56 UTC (rev 2560) +++ trunk/nextgen/docbuild/tutorial.xml 2011-10-18 17:58:18 UTC (rev 2561) @@ -336,10 +336,10 @@ </variablelist> <para> Enough theory already. Let's look at a sample implemetation - of an event segment. + of an event segment. First the header: </para> <example> - <title>Simple Event Segment</title> + <title>Simple Event Segment Header</title> <programlisting> @@ -408,8 +408,46 @@ framework. </para> </callout> + <callout arearefs="m_pCardmember"> + <para> + This data element is why we needed the forward + declaration of <classname>CAENcard</classname>. + It is going to be a pointer to a <classname>CAENcard</classname> + object we will create in our class constructor. That + object will be used to manipulate the CAEN digitizer. + </para> + </callout> + <calllout arearefs="EVSConstructor"> + <para> + Normally your event segments will want to implement + a constructor. In this case we provide the + constructor with parameters that specify the module + base address, virtual slot number (<parameter>id</parameter>). + and VME crate number. + </para> + </calllout> </calloutlist> - + <para> + Lets look at the implementation (.cpp) file of the event + segment a chunk at a time: + </para> + <example> + <title>Event segment front matter</title> + <programlisting> +#include <config.h> <co id="config.hInclude" /> +#include "CCAENEventSegment.h" <co id="CCAENEventSegment.hInclude" /> + +#include <CAENcard.h> <co id="CAENCard.hInclude" /> + +<co id="EventSegment_otherIncludes" /> + +#include <string> +#include <stdlib.h> +#include <iostream> + + </programlisting> + </example> + </section> <section> <title>Creating scaler banks and scaler modules</title> Modified: trunk/nextgen/utilities/scalerdisplay/scaler.tcl =================================================================== --- trunk/nextgen/utilities/scalerdisplay/scaler.tcl 2011-10-18 16:50:56 UTC (rev 2560) +++ trunk/nextgen/utilities/scalerdisplay/scaler.tcl 2011-10-18 17:58:18 UTC (rev 2561) @@ -698,7 +698,7 @@ if {$channel != $Fakename} { set id $ScalerMap($channel) if {$ElapsedRunTime != 0} { - set Average [expr (1.0*$Scaler_Totals($id))/$ElapsedRunTime] + set Average [expr $Scaler_Totals($id)/$ElapsedRunTime] } else { set Average 0 } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |