Add Handler to XPTemplate

Writing handler has been tedious in the CMSSW code developing.
Now setup a XPTemplate snippet for this