10 #include "nuevdb/EventDisplayBase/EventHolder.h"
11 #include "nuevdb/EventDisplayBase/View2D.h"
13 #include "art/Framework/Services/Registry/ServiceHandle.h"
14 #include "art/Framework/Principal/Handle.h"
16 #include "art/Utilities/ToolMacros.h"
18 #include "TPolyLine.h"
30 void configure(
const fhicl::ParameterSet& pset)
override;
32 void Draw(
const std::string&,
float,
float)
override;
72 art::ServiceHandle<evd::RecoDrawingOptions const> recoOpt;
75 const art::Event*
event = evdb::EventHolder::Instance()->GetEvent();
78 for (
size_t imod = 0; imod < recoOpt->fWireLabels.size(); ++imod)
81 art::InputTag
const which = recoOpt->fWireLabels[imod];
83 art::Handle< std::vector<recob::Wire> > wireVecHandle;
84 event->getByLabel(which, wireVecHandle);
86 for(
size_t wireIdx = 0; wireIdx < wireVecHandle->size(); wireIdx++)
88 art::Ptr<recob::Wire> wire(wireVecHandle, wireIdx);
90 if (wire->Channel() != channel)
continue;
94 std::vector<float> signal = wire->Signal();
96 TPolyLine& wireWaveform = view2D.AddPolyLine(signal.size(),
fColorMap[imod %
fColorMap.size()], 2, 1);
98 for(
size_t idx = 0; idx < signal.size(); idx++)
100 float bin = float(idx) + 0.5;
102 if (bin >= lowBin && bin <= hiBin) wireWaveform.SetPoint(idx,bin,signal[idx]);
105 wireWaveform.Draw(
"same");
constexpr details::BinObj< T > bin(T value)
Returns a wrapper to print the specified data in binary format.
Declaration of basic channel signal object.
unsigned int ChannelID_t
Type representing the ID of a readout channel.