110 std::unique_ptr<std::vector<recob::Wire>> wireCol = std::make_unique<std::vector<recob::Wire>>();
112 mf::LogInfo(
"ROIConvert") <<
"ROIConvert, looking for ChannelROI data at " << channelLabel.encode();
115 const std::vector<recob::ChannelROI>& channelVec =
evt.getProduct<std::vector<recob::ChannelROI>>(channelLabel);
117 mf::LogInfo(
"ROIConvert") <<
"--> Recovered ChannelROI data, size: " << channelVec.size();
119 if (!channelVec.empty())
122 wireCol->reserve(channelVec.size());
125 for(
const auto& channelROI : channelVec)
137 for(
const auto& range : channelROIs.
get_ranges())
139 size_t startTick = range.begin_index();
141 std::vector<float> dataVec(range.data().size());
143 for(
size_t binIdx = 0; binIdx < range.data().size(); binIdx++) dataVec[binIdx] = range.data()[binIdx];
145 ROIVec.
add_range(startTick, std::move(dataVec));
152 if(wireCol->empty()) mf::LogWarning(
"ROIConvert") <<
"No wires made for this event.";
155 evt.put(std::move(wireCol), instanceName);
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
const geo::GeometryCore * fGeometry
const datarange_t & add_range(size_type offset, ITER first, ITER last)
Adds a sequence of elements as a range with specified offset.
const range_list_t & get_ranges() const
Returns the internal list of non-void ranges.
Class managing the creation of a new recob::Wire object.
std::vector< std::string > fOutInstanceLabelVec
The output instance labels to apply.
std::vector< art::InputTag > fWireModuleLabelVec
vector of modules that made digits
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
size_t fEventCount
count of event processed
auto zip(Iterables &&...iterables)
Range-for loop helper iterating across many collections at the same time.
unsigned int ChannelID_t
Type representing the ID of a readout channel.