Just change pedPrecision and gainPrecision to be std::atomic<float> and use #if defined to hide the std::atomic from ROOT. The sizes of a float and std::atomic<float> are the same. I did the following test to check:
```
#include <atomic>
#include <iostream>

int main()
{
  std::cout <<"int "<<sizeof(std::atomic<int>)<<std::endl;
  std::cout <<"int* "<<sizeof(std::atomic<int*>)<<std::endl;
  std::cout<<"float "<<sizeof(std::atomic<float>)<<std::endl;
  std::cout<<"double "<<sizeof(std::atomic<double>)<<std::endl;
  return 0;
}
```
which returned
```
int 4
int* 8
float 4
double 8
```