#include <CDigitizerModule.h>
Inheritance diagram for CDigitizerModule:
Public Types | |
typedef list< CConfigurationParameter * > | ConfigArray |
typedef ConfigArray::iterator | ParameterIterator |
Public Member Functions | |
CDigitizerModule (const string &rName, CTCLInterpreter &rInterp) | |
virtual | ~CDigitizerModule () |
CDigitizerModule (const string &rName, CTCLInterpreter &rInterp) | |
virtual | ~CDigitizerModule () |
string | getName () const |
Retrieve a copy of the name:. | |
const ConfigArray & | getConfiguration () const |
virtual int | operator() (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
virtual int | Configure (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
virtual int | ListConfiguration (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgs, char **pArgs) |
virtual string | Usage () |
virtual void | Initialize ()=0 |
Initialize the readable (pure virt.). | |
virtual void | Prepare ()=0 |
Prepare module for readout (pure virt.). | |
virtual void | Read (DAQWordBufferPtr &rBuffer)=0 |
Read to DAQ buf. | |
virtual int | Read (void *pBuffer)=0 |
Read to ordinary buf. | |
virtual void | Clear ()=0 |
Clear (after read e.g.).(Pure virt). | |
void | AddIntParam (const string &sParamName, int nDefault=0) |
void | AddIntArrayParam (const string &rParamName, int nArraySize, int nDefault=0) |
void | AddBoolParam (const string &rName, bool fDefault=false) |
void | AddStringParam (const string &rName) |
void | AddStringArrayParam (const string &rName, int nArraySize) |
ParameterIterator | begin () |
Config param start iterator. | |
ParameterIterator | end () |
Config param end iterator. | |
ParameterIterator | Find (const string &rKeyword) |
ParameterIterator | Find (const char *pKeyword) |
virtual string | getType () const =0 |
Return module type string (pure virt). | |
Protected Member Functions | |
void | setName (const string am_sName) |
string | ListParameters (CTCLInterpreter &rInterp, const string &rPattern) |
string | ListKeywords () |
Private Member Functions | |
CDigitizerModule (const CDigitizerModule &rhs) | |
CDigitizerModule & | operator= (const CDigitizerModule &rhs) |
int | operator== (const CDigitizerModule &rhs) const |
int | operator!= (const CDigitizerModule &rhs) const |
CDigitizerModule (const CDigitizerModule &rhs) | |
CDigitizerModule & | operator= (const CDigitizerModule &rhs) |
int | operator== (const CDigitizerModule &rhs) const |
int | operator!= (const CDigitizerModule &rhs) const |
void | DeleteParameters () |
Private Attributes | |
string | m_sName |
name of module. | |
ConfigArray | m_Configuration |
Boolean flags. |
Configuration management is handled by deriving from CTCLProcessor. The object represents a new TCL command m_sName. The default parser for this command is able to handle three subcommands:
Data acquisition is done via the member functions called by the readout harness of the software:
Definition at line 313 of file CDigitizerModule.h.
|
Reimplemented from CConfigurableObject. Definition at line 347 of file include/CDigitizerModule.h. Referenced by getConfiguration(). |
|
Reimplemented from CConfigurableObject. Definition at line 348 of file include/CDigitizerModule.h. Referenced by begin(), CCAENModule::CCAENModule(), CCAENV775::CCAENV775(), CCAENV792::CCAENV792(), CCAENV830Module::CCAENV830Module(), Configure(), DeleteParameters(), end(), Find(), CCAENV830Module::Initialize(), CCAENV792::Initialize(), CCAENV775::Initialize(), CCAENModule::Initialize(), ListKeywords(), and ListParameters(). |
|
Constructor, creates a digitizer module. The configuration parameters can take care of themselves. The string gets initialized from the parameter.
Definition at line 317 of file CDigitizerModule.cpp. |
|
Destructor. The configuration parameters pointed to by the elements of the list are assumed to be dynamically allocated. Therefore they must be deleted. The list elements themselves are assumed taken care of by the list destructors. Definition at line 330 of file CDigitizerModule.cpp. |
|
|
|
|
|
|
|
|
|
Function: Adds a boolean parameter to the set of parameters that are recognized by the default Configure parser.
Reimplemented from CConfigurableObject. Definition at line 631 of file src/CDigitizerModule.cpp. References m_Configuration. |
|
Adds an array of parameters to the set of configuration parameter that are parsed by the default Configure function.
Reimplemented from CConfigurableObject. Definition at line 609 of file src/CDigitizerModule.cpp. References m_Configuration. Referenced by CCAENModule::CCAENModule(), and CCAENV830Module::CCAENV830Module(). |
|
Adds an integer configuration parameter to the set recognized by the default configuration parser.
Reimplemented from CConfigurableObject. Definition at line 587 of file src/CDigitizerModule.cpp. References m_Configuration. Referenced by CCAENModule::CCAENModule(), CCAENV775::CCAENV775(), CCAENV792::CCAENV792(), and CCAENV830Module::CCAENV830Module(). |
|
Adds a string array parameter to the set of parameters recognized by this module. A string array parameter has a parameter that is a tcl formatted list where each list element is an arbitrary string.
Reimplemented from CConfigurableObject. Definition at line 751 of file src/CDigitizerModule.cpp. References m_Configuration. Referenced by CCAENModule::CCAENModule(), and CCAENV830Module::CCAENV830Module(). |
|
Adds a string parameter to the set of parameters recognized by this module. A string parameter is a parameter with a single string valued value.
Reimplemented from CConfigurableObject. Definition at line 734 of file src/CDigitizerModule.cpp. References m_Configuration. |
|
Config param start iterator.
Reimplemented from CConfigurableObject. Definition at line 429 of file include/CDigitizerModule.h. References m_Configuration, and ParameterIterator. |
|
Clear (after read e.g.).(Pure virt).
Implements CReadableObject. Implemented in CCAENModule, CCAENV775, CCAENV785, CCAENV792, CCAENV830Module, CCAENModule, CCAENV775, CCAENV785, CCAENV792, and CCAENV830Module. Referenced by CReadOrder::ModuleClear::operator()(). |
|
Function: int Configure(CTCLInterpreter& rInterp, CTCLResult& rResult, int nArgs, char** pArgs) Operation Type: Purpose: Handles the "configure" command. The default implementation is to assume configuration is a set of keyword value pairs. e.g:
Each keyword is matched against the parameters in the following order. Naturally duplicate command keys are not a good thing.
See CConfigurationParameter CIntConfigParam CIntArrayParam CBoolConfigParam As many configuration options as can be performed get done. Any failures are reported by returning TCL_ERROR and placing stuff in the results string.
Reimplemented from CConfigurableObject. Definition at line 450 of file src/CDigitizerModule.cpp. References Find(), m_Configuration, and ParameterIterator. Referenced by CCAENV792Creator::Create(), CCAENV775Creator::Create(), and operator()(). |
|
Delete the parameter arrays. Reimplemented from CConfigurableObject. Definition at line 643 of file src/CDigitizerModule.cpp. References m_Configuration, and ParameterIterator. |
|
Config param end iterator.
Reimplemented from CConfigurableObject. Definition at line 432 of file include/CDigitizerModule.h. References m_Configuration, and ParameterIterator. Referenced by CCAENModule::CCAENModule(), CCAENV775::CCAENV775(), CCAENV792::CCAENV792(), CCAENV830Module::CCAENV830Module(), CCAENV775::Initialize(), and CCAENModule::Initialize(). |
|
Definition at line 436 of file include/CDigitizerModule.h. References Find(), and ParameterIterator. |
|
Locate a parameter matching the configuration parameter test string.
Reimplemented from CConfigurableObject. Definition at line 660 of file src/CDigitizerModule.cpp. References m_Configuration, CConfigurationParameter::Match(), and ParameterIterator. Referenced by CCAENModule::CCAENModule(), CCAENV775::CCAENV775(), CCAENV792::CCAENV792(), CCAENV830Module::CCAENV830Module(), Configure(), Find(), CCAENV830Module::Initialize(), CCAENV792::Initialize(), CCAENV775::Initialize(), and CCAENModule::Initialize(). |
|
Definition at line 380 of file include/CDigitizerModule.h. References ConfigArray, and m_Configuration. |
|
Retrieve a copy of the name:.
Reimplemented from CConfigurableObject. Definition at line 376 of file include/CDigitizerModule.h. References m_sName. Referenced by CDigitizerDictionary::DigitizerAdd(), CReadOrder::Lister::operator()(), and CReadOrder::CompareName::operator()(). |
|
Return module type string (pure virt).
Implements CReadableObject. Implemented in CCAENV775, CCAENV785, CCAENV792, CCAENV830Module, CCAENV775, CCAENV785, CCAENV792, and CCAENV830Module. Referenced by CReadOrder::Lister::operator()(). |
|
Initialize the readable (pure virt.).
Implements CReadableObject. Implemented in CCAENModule, CCAENV775, CCAENV785, CCAENV792, CCAENV830Module, CCAENModule, CCAENV775, CCAENV785, CCAENV792, and CCAENV830Module. Referenced by CReadOrder::ModuleInitialize::operator()(). |
|
Lists the current module configuration. The default implementation iterates through the set of m_IntParameters, m_ArrayParameters and m_BoolParameters producing pairs of {parametername values} such as:
Reimplemented from CConfigurableObject. Definition at line 518 of file src/CDigitizerModule.cpp. References ListParameters(), and Usage(). Referenced by operator()(). |
|
List the allowed configuration keywords. The words are returned as a string of pairs. The pairs are not a bracketed list, but just a pair of words. the first word of each pair is the command keyword. the second word is the parameter format as returned from CConfigurationParameter::GetParameterFormat()
Reimplemented from CConfigurableObject. Definition at line 710 of file src/CDigitizerModule.cpp. References m_Configuration, and ParameterIterator. Referenced by Usage(). |
|
Produces a list of the configuration parameters that match the input pattern.
Reimplemented from CConfigurableObject. Definition at line 682 of file src/CDigitizerModule.cpp. References m_Configuration, and ParameterIterator. Referenced by ListConfiguration(). |
|
|
|
|
|
Function: Processes the module's command. The default implementation is to look for matches of the pArgs[1] with:
Reimplemented from CConfigurableObject. Definition at line 374 of file src/CDigitizerModule.cpp. References Configure(), ListConfiguration(), m_sName, and Usage(). |
|
|
|
|
|
|
|
|
|
Prepare module for readout (pure virt.).
Implements CReadableObject. Implemented in CCAENModule, CCAENV775, CCAENV785, CCAENV792, CCAENV830Module, CCAENModule, CCAENV775, CCAENV785, CCAENV792, and CCAENV830Module. Referenced by CReadOrder::ModulePrepare::operator()(). |
|
Read to ordinary buf.
Implements CReadableObject. Implemented in CCAENModule, CCAENV830Module, CCAENModule, and CCAENV830Module. |
|
Read to DAQ buf.
Implements CReadableObject. Implemented in CCAENModule, CCAENV775, CCAENV785, CCAENV792, CCAENV830Module, CCAENModule, CCAENV775, CCAENV785, CCAENV792, and CCAENV830Module. Referenced by CReadOrder::ModuleRead::operator()(). |
|
Definition at line 390 of file include/CDigitizerModule.h. References m_sName. |
|
Returns a string describing the command usage. The defafult implementation produces a string of the form: m_sName config Paramdescription m_sName cget m_sName help Paramdescription is produced by iterating through the set of configuration parameter descriptions and for each of them listing the name and the type expected e.g.:
Reimplemented from CConfigurableObject. Definition at line 561 of file src/CDigitizerModule.cpp. References ListKeywords(), and m_sName. Referenced by ListConfiguration(), and operator()(). |
|
Boolean flags.
Reimplemented from CConfigurableObject. Definition at line 353 of file include/CDigitizerModule.h. Referenced by AddBoolParam(), AddIntArrayParam(), AddIntParam(), AddStringArrayParam(), AddStringParam(), begin(), Configure(), DeleteParameters(), end(), Find(), getConfiguration(), ListKeywords(), and ListParameters(). |
|
name of module.
Reimplemented from CConfigurableObject. Definition at line 352 of file include/CDigitizerModule.h. Referenced by getName(), operator()(), setName(), and Usage(). |