#include <CReadOrder.h>
Inheritance diagram for CReadOrder:
Public Types | |
typedef list< CReadableObject * > | ModuleList |
Ordered list of modules. | |
typedef ModuleList::iterator | ModuleIterator |
Iterator for list of modules. | |
typedef list< CDigitizerModule * > | ModuleList |
typedef ModuleList::iterator | ModuleIterator |
Public Member Functions | |
CReadOrder (CTCLInterpreter *pInterp, CDigitizerDictionary *pDictionary, const string &rCommand=string("readout")) | |
virtual | ~CReadOrder () |
ModuleList | getReadoutList () const |
int | operator() (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgc, char **pArgv) |
Command processing operator. | |
int | AddCommand (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgc, char **pArgv) |
Add a module to our readout list. | |
int | RemoveCommand (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgc, char **pArgv) |
Remove a module from our readout list. | |
int | ListCommand (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgc, char **pArgv) |
List modules in our list. | |
virtual void | Initialize () |
1-time Initialize our modules. | |
virtual void | Prepare () |
Prepare modules for readout. | |
virtual void | Read (DAQWordBufferPtr &p) |
Read -> spectrodaq. | |
virtual int | Read (void *pBuffer) |
Read to ordinary buffer. | |
virtual void | Clear () |
Clear after read & @ Run start. | |
virtual string | getType () const |
Return module type information. | |
int | readersize () |
# modules in the list. | |
ModuleIterator | readerbegin () |
Start iterator. | |
ModuleIterator | readerend () |
End iterator. | |
ModuleIterator | readerfind (const string &rName) |
Find module by name. | |
string | Usage () |
Command usage. | |
void | Add (CReadableObject *pModule) |
Add a module. | |
void | Remove (ModuleIterator p) |
Remove module. | |
void | Remove (CReadableObject *pModule) |
Remove module. | |
virtual void | OnDelete () |
Just prior to deletion. | |
CReadOrder (CTCLInterpreter *pInterp, CDigitizerDictionary *pDictionary, const string &rCommand=string("readout")) | |
virtual | ~CReadOrder () |
ModuleList | getReadoutList () const |
int | operator() (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgc, char **pArgv) |
Process commands. | |
int | AddCommand (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgc, char **pArgv) |
int | RemoveCommand (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgc, char **pArgv) |
int | ListCommand (CTCLInterpreter &rInterp, CTCLResult &rResult, int nArgc, char **pArgv) |
void | Add (CDigitizerModule *pModule) |
void | Remove (ModuleIterator p) |
virtual void | Initialize () |
Initialize the readable (pure virt.). | |
virtual void | Prepare () |
Prepare module for readout (pure virt.). | |
virtual DAQWordBufferPtr | Read (DAQWordBufferPtr &p) |
Read to buffer. | |
virtual int | Read (void *pBuffer) |
Read to memory. (pure virt). | |
virtual void | Clear () |
Clear (after read e.g.).(Pure virt). | |
int | size () |
ModuleIterator | begin () |
ModuleIterator | end () |
ModuleIterator | find (const string &rName) |
string | Usage () |
Protected Member Functions | |
void | setReadoutList (const ModuleList &rReadoutlist) |
void | setReadoutList (const ModuleList &rReadoutlist) |
Private Member Functions | |
CReadOrder (const CReadOrder &aCReadOrder) | |
CReadOrder & | operator= (const CReadOrder &aCReadOrder) |
int | operator== (const CReadOrder &aCReadOrder) const |
int | operator!= (const CReadOrder &rhs) const |
CReadOrder (const CReadOrder &aCReadOrder) | |
CReadOrder & | operator= (const CReadOrder &aCReadOrder) |
int | operator== (const CReadOrder &aCReadOrder) const |
int | operator!= (const CReadOrder &rhs) const |
Private Attributes | |
ModuleList | m_ReadoutList |
What we read. | |
CDigitizerDictionary * | m_pModules |
Known modules we could read. | |
int | m_nPacketId |
Our id if packetizing. | |
bool | m_fPacketize |
true if packetizing. | |
CIntConfigParam * | m_pPacketIdParam |
Ptr to packet parameter. | |
CBoolConfigParam * | m_pPacketizeParam |
Ptr to packetizer parameter. | |
CDigitizerDictionary * | m_pModules |
Definition at line 339 of file CReadOrder.h.
|
Definition at line 336 of file include/CReadOrder.h. |
|
Iterator for list of modules.
Definition at line 343 of file CReadOrder.h. Referenced by OnDelete(), CScalerBank::Read(), Read(), Remove(), and RemoveCommand(). |
|
Definition at line 335 of file include/CReadOrder.h. |
|
Ordered list of modules.
Definition at line 342 of file CReadOrder.h. Referenced by getReadoutList(), and setReadoutList(). |
|
Constructor: Creates an instance of a CReadOrder class. The constructor is a no-op as we are not descended from a base class and STL takes care of intiailizing oure single attribute. Definition at line 304 of file CReadOrder.cpp. References CConfigurableObject::AddBoolParam(), CConfigurableObject::AddIntParam(), m_pPacketIdParam, m_pPacketizeParam, CConfigurableObject::ParameterIterator, pInterp(), and CIntConfigParam::setRange(). |
|
If we are destroyed, then all the modules we are reading get unlinked from us. Definition at line 328 of file CReadOrder.cpp. References OnDelete(). |
|
|
|
|
|
|
|
|
|
Adds a module to the end of the readout list.
Definition at line 326 of file src/CReadOrder.cpp. References m_ReadoutList. |
|
Add a module. Adds a module to the end of the readout list.
Definition at line 343 of file CReadOrder.cpp. References CReadableObject::Link(), and m_ReadoutList. Referenced by AddCommand(). |
|
|
|
Add a module to our readout list. processes subcommand to add a set of modules to the readout list. The modules to add are specified by name on the command line. Adding the module list is an all or nothing proposotion. Either all are aded or none.
Definition at line 658 of file CReadOrder.cpp. References Add(), CDigitizerDictionary::DigitizerEnd(), CDigitizerDictionary::DigitizerFind(), m_pModules, and CDigitizerDictionary::ModuleIterator. Referenced by operator()(). |
|
Returns a begin iterator for the module list. Reimplemented from CConfigurableObject. Definition at line 440 of file src/CReadOrder.cpp. References m_ReadoutList. Referenced by find(). |
|
Clear (after read e.g.).(Pure virt).
Implements CReadableObject. |
|
Clear after read & @ Run start. Clears the modules in the readout list. Implements CReadableObject. Definition at line 516 of file CReadOrder.cpp. References readerbegin(), and readerend(). |
|
Returns an end of iteration iterator for the digitizers in the digitizer list. Reimplemented from CConfigurableObject. Definition at line 452 of file src/CReadOrder.cpp. References m_ReadoutList. Referenced by find(). |
|
Locates a module by name.
Definition at line 462 of file src/CReadOrder.cpp. References begin(), and end(). Referenced by Remove(). |
|
Definition at line 430 of file include/CReadOrder.h. References m_ReadoutList, and ModuleList. |
|
Definition at line 441 of file CReadOrder.h. References m_ReadoutList, and ModuleList. |
|
Return module type information. Return the type of the module this is (packetizer). Implements CReadableObject. Definition at line 858 of file CReadOrder.cpp. |
|
Initialize the readable (pure virt.).
Implements CReadableObject. |
|
1-time Initialize our modules. Function:
Implements CReadableObject. Definition at line 393 of file CReadOrder.cpp. References CIntConfigParam::getOptionValue(), CBoolConfigParam::getOptionValue(), m_fPacketize, m_nPacketId, m_pPacketIdParam, m_pPacketizeParam, readerbegin(), and readerend(). |
|
|
|
List modules in our list. List the modules that are in the readout list that match an optional pattern. If the pattern is omitted, then it is assumed to be *.
Definition at line 784 of file CReadOrder.cpp. References readerbegin(), readerend(), and Usage(). Referenced by operator()(). |
|
Just prior to deletion. Called prior to delete: unlink everyone from us. It's harmless to call this multiple times. Reimplemented from CReadableObject. Definition at line 842 of file CReadOrder.cpp. References m_ReadoutList, ModuleIterator, readerbegin(), and readerend(). Referenced by ~CReadOrder(). |
|
|
|
|
|
Process commands. Processes the module's command. The default implementation is to look for matches of the pArgs[1] with:
Reimplemented from CConfigurableObject. |
|
Command processing operator. Executes the readout command. This entry point just figures out if the subcommand is:
Reimplemented from CConfigurableObject. Definition at line 591 of file CReadOrder.cpp. References AddCommand(), ListCommand(), CConfigurableObject::operator()(), RemoveCommand(), and Usage(). |
|
|
|
|
|
|
|
|
|
Prepare module for readout (pure virt.).
Implements CReadableObject. |
|
Prepare modules for readout. Function: Prepares the modules in the readout chain. Implements CReadableObject. Definition at line 411 of file CReadOrder.cpp. References readerbegin(), and readerend(). Referenced by clearevt(), and clrscl(). |
|
Read to memory. (pure virt).
Implements CReadableObject. |
|
Read to buffer.
Implements CReadableObject. |
|
Read to ordinary buffer. Reads an event into an ordinary buffer.
Implements CReadableObject. Definition at line 467 of file CReadOrder.cpp. References CReadException::Add(), CReadException::GetCount(), m_fPacketize, m_nPacketId, ModuleIterator, CReadableObject::Read(), readerbegin(), and readerend(). |
|
Read -> spectrodaq. Reads out the event.
Implements CReadableObject. Definition at line 426 of file CReadOrder.cpp. References CReadException::Add(), CReadException::GetCount(), m_fPacketize, m_nPacketId, ModuleIterator, CReadableObject::Read(), readerbegin(), readerend(), and size(). |
|
Start iterator. Returns a begin iterator for the module list. Definition at line 541 of file CReadOrder.cpp. References m_ReadoutList. Referenced by Clear(), Initialize(), ListCommand(), OnDelete(), Prepare(), CScalerBank::Read(), Read(), readerfind(), and Remove(). |
|
End iterator. Returns an end of iteration iterator for the digitizers in the digitizer list. Definition at line 553 of file CReadOrder.cpp. References m_ReadoutList. Referenced by Clear(), Initialize(), ListCommand(), OnDelete(), Prepare(), CScalerBank::Read(), Read(), readerfind(), Remove(), and RemoveCommand(). |
|
Find module by name. Locates a module by name.
Definition at line 563 of file CReadOrder.cpp. References readerbegin(), and readerend(). Referenced by RemoveCommand(). |
|
# modules in the list. Returns the number of modules in the readout chain. Definition at line 529 of file CReadOrder.cpp. References m_ReadoutList. |
|
|
|
Remove module.
Definition at line 374 of file CReadOrder.cpp. References find(), ModuleIterator, readerbegin(), readerend(), and Remove(). |
|
Remove module. Removes a module from the readout list. The module is selected by an iterator:
Definition at line 363 of file CReadOrder.cpp. References m_ReadoutList, ModuleIterator, and readerend(). Referenced by CReadableObject::OnDelete(), Remove(), and RemoveCommand(). |
|
|
|
Remove a module from our readout list. Removes a module from the readout list. The module still exists and can be added back to the list at any time in the future.
Definition at line 723 of file CReadOrder.cpp. References ModuleIterator, readerend(), readerfind(), Remove(), and Usage(). Referenced by operator()(). |
|
Definition at line 438 of file include/CReadOrder.h. References m_ReadoutList, and ModuleList. |
|
Definition at line 449 of file CReadOrder.h. References m_ReadoutList, and ModuleList. |
|
Returns the number of modules in the readout chain. Reimplemented from CConfigurableObject. Definition at line 428 of file src/CReadOrder.cpp. References m_ReadoutList. Referenced by Read(). |
|
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. |
|
Command usage. Return a string that provides helpful usage information. Reimplemented from CConfigurableObject. Definition at line 819 of file CReadOrder.cpp. References CConfigurableObject::Usage(). Referenced by ListCommand(), operator()(), and RemoveCommand(). |
|
true if packetizing.
Definition at line 351 of file CReadOrder.h. Referenced by Initialize(), and Read(). |
|
Our id if packetizing.
Definition at line 350 of file CReadOrder.h. Referenced by Initialize(), and Read(). |
|
Definition at line 342 of file include/CReadOrder.h. |
|
Known modules we could read.
Definition at line 349 of file CReadOrder.h. Referenced by AddCommand(). |
|
Ptr to packet parameter.
Definition at line 352 of file CReadOrder.h. Referenced by CReadOrder(), and Initialize(). |
|
Ptr to packetizer parameter.
Definition at line 353 of file CReadOrder.h. Referenced by CReadOrder(), and Initialize(). |
|
What we read.
Definition at line 341 of file include/CReadOrder.h. Referenced by Add(), begin(), end(), getReadoutList(), OnDelete(), readerbegin(), readerend(), readersize(), Remove(), setReadoutList(), and size(). |