```
template<T> 
void rawEnergySet(T& h, float v){};

rawEnergySet<HBHERecHit>(HBHERecHit& h, float v){h.setRawEnergy(v);}
```
takes a few less lines and achieves about the same .. maybe I missed somth more subtle