From: <ro...@us...> - 2009-03-19 18:11:28
|
Revision: 2104 http://nscldaq.svn.sourceforge.net/nscldaq/?rev=2104&view=rev Author: ron-fox Date: 2009-03-19 18:10:31 +0000 (Thu, 19 Mar 2009) Log Message: ----------- Integrate run variable processing with the readout program. Modified Paths: -------------- trunk/nextgen/sbs/readout/CExperiment.cpp trunk/nextgen/sbs/readout/CReadoutMain.cpp trunk/nextgen/sbs/readout/triggerresponseTests.cpp Modified: trunk/nextgen/sbs/readout/CExperiment.cpp =================================================================== --- trunk/nextgen/sbs/readout/CExperiment.cpp 2009-03-19 18:00:58 UTC (rev 2103) +++ trunk/nextgen/sbs/readout/CExperiment.cpp 2009-03-19 18:10:31 UTC (rev 2104) @@ -29,6 +29,7 @@ #include <CScalerBank.h> #include <CTriggerLoop.h> #include <CDocumentedPacketManager.h> +#include <CVariableBuffers.h> #include <vector> #include <string> @@ -386,7 +387,10 @@ m_nLastScalerTime = m_pRunState->m_timeOffset; } + // For now documented variables are tied to this trigger too: + ScheduleRunVariableDump(); + } /*! @@ -423,7 +427,9 @@ void CExperiment::ScheduleRunVariableDump() { - // TODO: Write the body of this stub function. + CVariableBuffers* pVars = CVariableBuffers::getInstance(); + pVars->triggerRunVariableBuffer(m_pRing); + pVars->triggerStateVariableBuffer(m_pRing); } Modified: trunk/nextgen/sbs/readout/CReadoutMain.cpp =================================================================== --- trunk/nextgen/sbs/readout/CReadoutMain.cpp 2009-03-19 18:00:58 UTC (rev 2103) +++ trunk/nextgen/sbs/readout/CReadoutMain.cpp 2009-03-19 18:10:31 UTC (rev 2104) @@ -119,8 +119,13 @@ // Now initialize via the virtual functions. + + // State and run variables require the state/runvar manager + + new CDocumentedVars(*(getInterpreter())); SetupRunVariables(getInterpreter()); SetupStateVariables(getInterpreter()); + SetupReadout(m_pExperiment); // From derived class. SetupScalers(m_pExperiment); // Allowed to be null (the default). @@ -234,7 +239,6 @@ { CTCLInterpreter& interp(*getInterpreter()); CRunControlPackage::getInstance(interp); - new CDocumentedVars(interp); } Modified: trunk/nextgen/sbs/readout/triggerresponseTests.cpp =================================================================== --- trunk/nextgen/sbs/readout/triggerresponseTests.cpp 2009-03-19 18:00:58 UTC (rev 2103) +++ trunk/nextgen/sbs/readout/triggerresponseTests.cpp 2009-03-19 18:10:31 UTC (rev 2104) @@ -18,6 +18,8 @@ #include <RunState.h> #include <stdint.h> #include <vector> +#include <TCLInterpreter.h> +#include <CVariableBuffers.h> #define private public #include "CExperiment.h" @@ -77,13 +79,22 @@ public: + CTCLInterpreter* m_pInterp; + CVariableBuffers* m_pBufs; void setUp() { + m_pInterp = new CTCLInterpreter; + m_pBufs = new CVariableBuffers(*m_pInterp); + if (CRingBuffer::isRing(ringName)) { CRingBuffer::remove(ringName); // In case it already exists, remove it } m_pExperiment = new CExperiment(ringName, 4096); + } void tearDown() { + delete m_pBufs; + delete m_pInterp; + delete m_pExperiment; m_pExperiment = reinterpret_cast<CExperiment*>(0); CRingBuffer::remove(ringName); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |