All nodes that process data implement the MPxNode::compute() method:
MPxNode::compute( const MPlug& plug, MDataBlock& dataBlock )
compute() is called when one or more of a node's output plugs is marked as dirty and needs to be recomputed.
The value of the attribute associated with the output plug will be recomputed using the updated value of the attributes that affect it. The output attribute's value in the node's data block is then updated with the recomputed value.
The compute() method should not use any data that is not available to it through its attributes, and it should only modify its output attributes.