Unfortunately I am currently in transit so I won’t have access to a system on which I can code an example until tomorrow evening. I will put a short working script up as soon as I can.
Here is a short running script that illustrates the problem - I would like to shorten or remove the tick marks on both the x-axis and the y-axis - but this is starting with the x-axis
void TickSizeIssue(){
TCanvas *TC;
TC = new TCanvas("Test", "Test",5,5,845,605);
TF1 *f1 = new TF1("f1","TMath::Abs(sin(x)/x)",0,30);
f1->Draw();
TGaxis *gaxis = new TGaxis(0,0,15,0,15,15,510,"+S");
gaxis->SetTickSize(0);
gaxis->SetTitleColor(1);
gaxis->SetTitleFont(22);
gaxis->SetName("energy");
gaxis->SetTitle("energy (keV)");
gaxis->CenterTitle();
gaxis->Draw();
}