32 Comment(
"Neural net model to apply.")};
34 Comment(
"Labels of the network outputs.")};
36 Name(
"NNetOutputPattern"),
37 Comment(
"Pattern to use when searching for network outputs.")};
40 Comment(
"How many downsampled ADC entries in patch")};
42 Comment(
"PointID algorithm tool type")};
44 Name(
"TritonModelName"),
45 Comment(
"Model directory name in repository of Nvidia Triton inference server"),
48 Comment(
"URL of Nvidia Triton inference server"),
51 Name(
"TritonModelVersion"),
52 Comment(
"Version number of Nvidia Triton inference server model"),
55 Name(
"TritonVerbose"),
56 Comment(
"Verbosity switch for Nvidia Triton inference server client"),
59 Name(
"TritonAllowedTries"),
60 Comment(
"Number of allowed attempts for Nvidia Triton inference server client"),
68 virtual std::vector<float>
Run(
std::vector<std::vector<float>>
const& inp2d)
const = 0;
69 virtual std::vector<std::vector<float>>
Run(
71 int samples = -1)
const = 0;
85 if (!out.empty()) { result = out[outIdx]; }
87 mf::LogError(
"PointIdAlg") <<
"Problem with applying model to input.";
100 mf::LogError(
"PointIdAlg") <<
"Patch buffering failed.";
105 if (result.empty()) {
mf::LogError(
"PointIdAlg") <<
"Problem with applying model to input."; }
111 std::vector<std::vector<float>>
114 if (points.empty()) {
return std::vector<std::vector<float>>(); }
116 std::vector<std::vector<std::vector<float>>> inps(
119 for (
size_t i = 0; i < points.size(); ++i) {
120 unsigned int wire = points[i].first;
121 float drift = points[i].second;
130 std::vector<std::string>
const&
142 if ((wire >= marginW) && (wire <
fAlgView.
fNWires - marginW) && (scaledDrift >= marginD) &&
162 if ((fCurrentWireIdx == wire) && (fCurrentScaledDrift == sd))
165 fCurrentWireIdx = wire;
166 fCurrentScaledDrift = sd;
171 if ((fCurrentWireIdx == wire) && (fCurrentScaledDrift == drift))
174 fCurrentWireIdx = wire;
175 fCurrentScaledDrift = drift;
190 fWireDriftPatch.resize(fPatchSizeW);
191 for (
auto&
r : fWireDriftPatch)
192 r.resize(fPatchSizeD);
ChannelGroupService::Name Name
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
unsigned int fNScaledDrifts
DataProviderAlgView fAlgView
bool patchFromOriginalView(size_t wire, float drift, size_t size_w, size_t size_d, std::vector< std::vector< float >> &patch) const
bool patchFromDownsampledView(size_t wire, float drift, size_t size_w, size_t size_d, std::vector< std::vector< float >> &patch) const
cet::coded_exception< error, detail::translate > exception
QTextStream & endl(QTextStream &s)