![]() | ![]() | ![]() | Integrating your scaler readout with the readout | ![]() |
Now that we have a scaler readout class (CMyScaler), we must:
To register an object of type CMyScaler, two addtions must be made to Skeleton.cpp
First locate the includes in Skeleton.cpp adn add an include for the CMyScaler class header:
#include <CReadoutMain.h> #include <CExperiment.h> #include <CInterpreterStartup.h> #include <CInterpreterCore.h> #include <CRunVariableCommand.h> #include <CRunVariable.h> #include <CStateVariableCommand.h> #include <CStateVariable.h> #include <TCLInterpreter.h> #include <CDAQTCLProcessor.h> #include <CVMEScalerLRS1151.h> #include <CTraditionalEventSegment.h> #include <CTraditionalScalerReadout.h> #include <CEventSegment.h> #include <CMyScaler.h> // Added.
Next locate the CMyExperiment::SetupScalers function and add a line to create and register a scaler object:
void CMyExperiment::SetupScalers(CExperiment& rExperiment) { CReadoutMain::SetupScalers(rExperiment); // Insert your code below this comment. // For test,setup an LRS 1151 at 0x200c00 // CScaler* pScaler = new CVMEScalerLRS1151(0xc00200); // rExperiment.AddScalerModule(pScaler); rExperiment.AddScalerModule(new CMyScaler(0xc00200, 0)); // <-- added. }
To ensure that CMyScaler is built and linked to Readout, add CmySaler.o to the definitions of Objects:
Objects=Skeleton.o .. CMyScaler.o
The ... above idicaes there may be other files.
![]() | ![]() | ![]() | Integrating your scaler readout with the readout | ![]() |