@@ -116,9 +116,52 @@ std::vector<std::vector<unsigned>> GenerateCombinations(
116116
117117std::vector<std::string> ParseFileLines (std::string const & file_name);
118118
119+ /* *
120+ * Generate a vector of mass values using ranges and intervals specified in a
121+ * string
122+ *
123+ * The input string should be of the format:
124+ *
125+ * m1-m2:r1,m3,m4,m5-m6:r2,...
126+ *
127+ * where mi and ri must both be positive. A term like mi-mj:r (where mi must
128+ * be < mj) genrates masses starting at mi and increasing by an interval r up
129+ * to mj.
130+ *
131+ * This function returns a vector of ordered mass values converted to strings.
132+ *
133+ * \note Use the function ch::ValsFromRange if you need to include negative
134+ * numbers - this uses a different syntax for the ranges so doesn't suffer
135+ * from the amiguity of the `-` sign
136+ *
137+ * @param input The input string to decode
138+ * @param fmt The format specifier for converting floating-point mass values
139+ * to strings
140+ */
119141std::vector<std::string> MassesFromRange (std::string const & input,
120142 std::string const & fmt = " %.0f" );
121143
144+ /* *
145+ * Generate a vector of values using ranges and intervals specified in a
146+ * string
147+ *
148+ * The input string should be of the format:
149+ *
150+ * m1:m2|r1,m3,m4,m5:m6|r2,...
151+ *
152+ * where mi and ri can be positive or negative. A term like mi-mj:r (where mi
153+ * must be < mj) genrates values starting at mi and increasing by an interval
154+ * r up to mj.
155+ *
156+ * This function returns a vector of ordered values converted to strings.
157+ *
158+ * @param input The input string to decode
159+ * @param fmt The format specifier for converting floating-point values to
160+ * strings
161+ */
162+ std::vector<std::string> ValsFromRange (std::string const & input,
163+ std::string const & fmt = " %.0f" );
164+
122165bool HasNegativeBins (TH1 const * h);
123166
124167void ZeroNegativeBins (TH1 *h);
0 commit comments