Draw function curve and data points with error bars in a same graph

Dear all,

As the title, I want to draw function curve and data points with error bars in a same graph.
I am a beginner, thus, I am looking for an example.
Is there anyone know any example about it?

Regards,

root.cern.ch/doc/master/classTG … rrors.html
root.cern.ch/doc/master/classTGraphErrors.html
root.cern.ch/doc/master/group__ … raphs.html