Skip to content

Commit d7970b8

Browse files
authored
[PWGCF] filter2prong: Fix check with GetNpar (#12007)
1 parent 7845496 commit d7970b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PWGCF/TableProducer/filter2Prong.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ struct Filter2Prong {
128128
void init(InitContext&)
129129
{
130130
if (doprocessDataInvMass) {
131+
sigmaFormula = std::make_unique<TFormula>("sigmaFormula", cfgImSigmaFormula.value.c_str());
131132
if (static_cast<std::size_t>(sigmaFormula->GetNpar()) > std::size(sigmaFormulaParamIndex))
132133
LOGF(fatal, "Number of parameters in cfgImSigmaFormula can not be larger than %d.", std::size(sigmaFormulaParamIndex));
133-
sigmaFormula = std::make_unique<TFormula>("sigmaFormula", cfgImSigmaFormula.value.c_str());
134134
// could do SetParameter(name,value) directly, but pre-lookup of the names will result in faster process
135135
std::array<std::string, 4> pars = {"p", "sTPC", "sTOF", "hasTOF"};
136136
std::fill_n(sigmaFormulaParamIndex.begin(), std::size(sigmaFormulaParamIndex), ~0u);

0 commit comments

Comments
 (0)