93 std::map<readout::ROPID, TH2F*> ropImages;
97 if (detProp.NumberTimeSamples() != 6000) {
98 std::cerr <<
"MakeInfillTrainingData_module.cc: Training data should have 6000 time ticks\n";
107 ropImages[rop] =
tfs->make<TH2F>(
112 auto digs =
e.getHandle<std::vector<raw::RawDigit>>(
fInputLabel);
117 if(ropImages.count(rop)){
124 const int adc = adcs[
tick] ?
int(adcs[
tick]) - dig.GetPedestal() : 0;
126 ropImages[rop]->Fill(dig.Channel() - firstCh,
tick,
adc);
133 for(
auto it: ropImages)
delete it.second;
Collection of charge vs time digitized from a single readout channel.
std::set< readout::ROPID > fActiveRops
const geo::GeometryCore * fGeom
art::ServiceHandle< art::TFileService > tfs
std::vector< short > ADCvector_t
Type representing a (compressed) vector of ADC counts.
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
raw::ChannelID_t FirstChannelInROP(readout::ROPID const &ropid) const
Returns the ID of the first channel in the specified readout plane.
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Class identifying a set of planes sharing readout channels.
readout::ROPID ChannelToROP(raw::ChannelID_t channel) const
unsigned int ChannelID_t
Type representing the ID of a readout channel.
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
std::string to_string(ModuleType const mt)