Set statistical error for counting experiment

The HistFactory Sample object has a method SetValue(Double_t Val); which can be used when there’s no need to load in a histogram. Does something similar exist to set the statistical error? Is there a workaround? Ideally I’d rather not create a histogram and set the error just to set two values.