Commit cc20899e authored by Chad Lantz's avatar Chad Lantz
Browse files

GetRMS now returns 0 if it is handed a histogram with a max value of 0

parent c1622763
......@@ -219,6 +219,8 @@ double WFAnalysis::GetRMS( TH1D *h , int diff_window, bool debug){
//Make a histogram with x-range to match the y-range of the input
Double_t xmin,xmax;
if(xmax == 0) return 0;
TH1D hRMS("RMS","RMS",5*(xmax-xmin)/diff_window,xmin,xmax);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment