How to implement a horizontal shift for RooHistPdf


I have a particular pdf shape in the form of a RooHistPdf which I get from a template histogram.
I would like to fit just for a horizontal shift of this fixed shape - left and right. How can I define a RooHistPdf that allows a free parameter defining this possible shift?

I tried to create a RooHistPdf using a RooFormulaVar as the independent variable ( defined by eg. x - xoffset, where xoffset would be my free parameter to be floated in the fit), but this results in a Seg Fault.

Is it possible to do what I describe in RooFit?