35 #include "Utilities/AssociationUtil.h" 63 produces<std::vector<brb::BeamlineDigit> >();
64 produces<art::Assns<brb::BeamlineDigit, rawdata::RawBeamlineDigit> >();
94 std::unique_ptr<std::vector<brb::BeamlineDigit> > digit_reco(
new std::vector<brb::BeamlineDigit>);
99 std::vector<art::Ptr<rawdata::RawBeamlineDigit> > digits;
105 std::vector<uint16_t> waveform = (*digitIt)->ADCs();
106 uint32_t
timestamp = (*digitIt)->Timestamp();
112 for (std::map<
double,
hit_t<double> >::iterator digitHCIt = HitCollection.begin(); digitHCIt != HitCollection.end(); digitHCIt++) {
118 in_this_channel.
SetEndTimeInNanoSec((digitHCIt->second).TStartInNanoSec + (digitHCIt->second).RiseTimeInNanoSec + (digitHCIt->second).FallTimeInNanoSec);
119 in_this_channel.
SetPeakADC((digitHCIt->second).AmplitudeInADC);
121 digit_reco->push_back(in_this_channel);
124 util::CreateAssn(*
this, e, *(digit_reco.get()), *digitIt, *(digit_assn.get()), digit_reco->
size()-1);
128 e.
put(std::move(digit_reco));
129 e.
put(std::move(digit_assn));
static bool CreateAssn(art::EDProducer const &prod, art::Event &evt, std::vector< T > &a, art::Ptr< U > b, art::Assns< T, U > &assn, size_t indx=UINT_MAX, std::string const &instance=std::string())
Create a 1 to 1 association between a new product and one already in the event.
void SetEndTimeInNanoSec(double time_ns)
void SetPeakTimeInNanoSec(double time_ns)
void SetStartTimeInNanoSec(double time_ns)
art::InputTag fRawDataLabel
DEFINE_ART_MODULE(TestTMapFile)
void SetParams(const std::map< LEParams, double > ¶mSet)
unsigned int OnlineDigitChannel(ChannelID channel) const
Online digiziter channel number for this offline ChannelID.
ProductID put(std::unique_ptr< PROD > &&product)
LEHitFinder< double > * fLEHitFinderAlg
Encapsulation of reconstructed digitizer 'hits'. Used for ToF PMTs and SiPMs, and Cherenkov and Muon ...
T get(std::string const &key) const
std::map< LEParams, double > fLEParamSet
void produce(art::Event &e) override
LEHitReco(const fhicl::ParameterSet &p)
void SetWaveform(std::vector< uint16_t > &waveform, unsigned int channelNo, uint32_t timestamp)
void SetChannelID(beamlinegeo::ChannelID channel)
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
const std::map< T, hit_t< T > > & GetHitCollection() const
Raw data definitions for beamline data used in NOvA test beam experiment.
void reconfigure(const fhicl::ParameterSet &p)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
art::ServiceHandle< beamlineutil::BeamlineChannelMap > fChannelMap
Channel mapping service which may be used to interpret the channels which are read out by the various...