checkQC.parsers.parser module¶
-
class
checkQC.parsers.parser.
Parser
[source]¶ Bases:
object
Parser is the base class for all parser implementations.
A Parser will parse data and send it to its subscribers. Exactly what an item of data is depends on the particular implementation. The subscribers are then responsible for deciding if they are interested in that particular datum or not.
Parsers should be connected to their subscribing handlers by a third class, an example of how this can be accomplished can be found in the QCEngine.
Classes inheriting the Parser class must implement their run method. For details on what is required by the method implementation see the run method documentation.
Furthermore in order for Parsers to be identifiable it is necessary to implement a custom version of __eq__ and __hash__, which provides a custom definition of equivalence, this can e.g. be based on which runfolder the parser is setup to get its data from.