Functions
CookedFrameSink.cxx File Reference
#include "CookedFrameSink.h"
#include "lardataobj/RecoBase/Wire.h"
#include "larcore/Geometry/Geometry.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Core/EDProducer.h"
#include "WireCellIface/IFrame.h"
#include "WireCellIface/ITrace.h"
#include "WireCellUtil/NamedFactory.h"

Go to the source code of this file.

Functions

static ITrace::vector tagged_traces (IFrame::pointer frame, IFrame::tag_t tag)
 

Function Documentation

static ITrace::vector tagged_traces ( IFrame::pointer  frame,
IFrame::tag_t  tag 
)
static

Definition at line 72 of file CookedFrameSink.cxx.

73 {
74  ITrace::vector ret;
75  auto const& all_traces = frame->traces();
76  for (size_t index : frame->tagged_traces(tag)) {
77  ret.push_back(all_traces->at(index));
78  }
79  if (!ret.empty()) {
80  return ret;
81  }
82  auto ftags = frame->frame_tags();
83  if (std::find(ftags.begin(), ftags.end(), tag) == ftags.end()) {
84  return ret;
85  }
86  return *all_traces; // must make copy of shared pointers
87 }
struct vector vector