Sorry, this is not working currently in PROOF.
We are working to an implementation to have exactly the same functionality for TChain and PROOF,
but is not the case.
This morning I encountered a scenario where I wanted to do exactly this, and initially was dismayed to find this thread (which I started) when I googled this problem.
But clearly I must have gotten smarter in the interim 2 years. I’ve discovered if I put the method in a file and then do:
gProof->Exec(".L myMethod.C");
The method appears to be understood by my proof jobs from that point