71 const art::Event*
event = evdb::EventHolder::Instance()->GetEvent();
78 fMaximum = std::numeric_limits<float>::lowest();
83 event->getByLabel(rawDataLabel, rawDigitVecHandle);
85 if (!rawDigitVecHandle.
isValid())
continue;
87 for (
size_t rawDigitIdx = 0; rawDigitIdx < rawDigitVecHandle->size(); rawDigitIdx++) {
90 if (rawDigit->Channel() !=
channel)
continue;
101 pedestal = rawDigit->GetPedestal();
109 <<
". Pedestals not subtracted.";
112 std::vector<short> uncompressed(rawDigit->Samples());
113 raw::Uncompress(rawDigit->ADCs(), uncompressed, rawDigit->Compression());
117 for (
size_t idx = 0; idx < uncompressed.size(); idx++) {
118 float signalVal =
float(uncompressed[idx]) - pedestal;
120 histPtr->Fill(
float(idx) + 0.5, signalVal);
123 short minimumVal = *std::min_element(uncompressed.begin(), uncompressed.end());
124 short maximumVal = *std::max_element(uncompressed.begin(), uncompressed.end());
129 histPtr->SetLineColor(kBlack);
bool isValid() const noexcept
static int max(int a, int b)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::vector< art::InputTag > fRawDataLabels
module label that made the raw digits, default is daq
virtual float PedMean(raw::ChannelID_t ch) const =0
Retrieve pedestal information.
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
int fPedestalOption
0: use DetPedestalService; 1: Use pedestal in raw::RawDigt; 2: no ped subtraction ...
Event finding and building.