CScaler

Name

CScaler -- Abstract base class for reading scalers into a vector

Synopsis


#include <CScaler.h>
            
 class CScaler {

  CScaler();

  virtual   void Initialize();
  virtual   void Read(std::vector<unsigned long>& Scalers);
  virtual   void Clear();
  virtual   unsigned int size();
}

Description

The CScaler class is an abstract base class for high level support for scaler modules that append data into an STL vector. The interfaces defined by this class are suitable for use with scaler classes in the production readout skeleton.

Since CScaler is an abstract base class this documentation will only describe the expectations that must be met by concrete derived classes.

Public member functions

virtual void Initialize(void);

This function is expected to perform pre-start initialization. Once this function returns, the scaler managed by this object should be able to count given appropriate inputs.

virtual void Read(std::vector<unsigned long>& Scalers);

Read is supposed to read all channels from the scaler module controlled by this object and sequentially append them to the vector Scalers. An STL vector is appended to by invoking it's push_back() member.

virtual void Clear(void);

This function is expected to clear all scaler channels. Note that if Initialize and Read both exit with the scaler counters cleared, this function can be implemented as a no-op.

virtual unsigned int size(void); = 0

This function is no longer actually called but currently must be implemented. It used to return the number of scaler channels the object would read.

SEE ALSO

For information about STL's vector template class see: [ David R. Musser Gillmer J. Derge Atul Saini STL Tutorial and Reference Guide, C++ Programming with the Standard Template Library ]