Chapter 5. Complete program listings.
\param rExperiment - CExperiment& - A reference to the experiment object
that runs the readout. You will normally be making
calls to CExperiment::AddEventSegment to register your
own event segments in the experiment readout
*/
void
CMyExperiment::SetupReadout(CExperiment& rExperiment) // co:setupreadout
{
CReadoutMain::SetupReadout(rExperiment);
rExperiment.AddEventSegment(new MyEventSegment(10, 0xff00)); // co:addmysegment
// Make a new object of type MyEventSegment(slot#, ID)
}
/*!
This function allows you to describe your scaler readout configuration. This is done by
inserting scalers into the experiment object. Scalers come in the following flavors (all
derived from CScaler
- CCAMACScalerLRS2551 - CAMAC LeCroy model 2551 12 channel scalers.
- CCAMACScalerLRS4434 - CAMAC LeCroy model 4434 32 channel scalers.
- CVMEScalerCAENV830 - VME CAEN model V830 32 channel scalers.
- CVMEScalerLRS1151 - VME LeCroy model 1151 scalers.
- CScalerBank - A collection of scalers sequentially read out.
\param rExperiment - CExperiment& reference to the experiment object.
Normally you will call CExperiment::AddScalerModule to add
scaler modules to the readout.
*/
void
CMyExperiment::SetupScalers(CExperiment& rExperiment) // co:setupscalers
{
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);
}
/*!
In this function create and define any run variables you need.
A run variable is a TCL Variable whose value is logged to the
event stream. Run variables are always modifiable.
If, for example, you have a thermocouple that is monitoring
the temperature of a temperature senstive detector, you could
create a RunVariable, monitor the temperature periodically
and update the RunVariable. See CRunVariable and
CRunVariableCommand Run variables can also be
50
Kommentare zu diesen Handbüchern