#include "BinnedSplineHandler.h"
#include <memory>
#include "TROOT.h"
#include "TKey.h"
#include "TH3F.h"
Go to the source code of this file.
|
| int | GetSplineIndex (const std::vector< SplineIndex > &vec, const int sample, const int oscchan, const int syst, const int mode, const int var1bin, const int var2bin, const int var3bin) |
| |
◆ GetSplineIndex()
| int GetSplineIndex |
( |
const std::vector< SplineIndex > & |
vec, |
|
|
const int |
sample, |
|
|
const int |
oscchan, |
|
|
const int |
syst, |
|
|
const int |
mode, |
|
|
const int |
var1bin, |
|
|
const int |
var2bin, |
|
|
const int |
var3bin |
|
) |
| |
- Todo:
- KS: quoting Dan: I imagine all splines are loaded such that they are sequential in varbins etc. so we could optimise this finding function.
Definition at line 447 of file BinnedSplineHandler.cpp.
452 for (
size_t i = 0; i < vec.size(); i++)
454 const auto& entry = vec[i];
455 if (entry.iSample == sample &&
456 entry.iOscChan == oscchan &&
457 entry.iSyst == syst &&
458 entry.iMode == mode &&
459 entry.iVar1 == var1bin &&
460 entry.iVar2 == var2bin &&
461 entry.iVar3 == var3bin)
463 return static_cast<int>(i);
467 MACH3LOG_ERROR(
"Index not found! sample={} oscchan={} syst={} mode={} var1={} var2={} var3={}",
468 sample, oscchan, syst, mode, var1bin, var2bin, var3bin);
Custom exception class used throughout MaCh3.