36 if (!timeStamps)
return isBeam;
38 if (timeStamps->size() > 1)
return isBeam;
42 isBeam = (timeStamp.
GetFlags() == 0xc);
59 std::vector<art::Ptr<raw::RDTimeStamp> > digitTSlist;
63 std::vector<art::Ptr<raw::RawDigit> > digitlist;
66 if (RawdigitListHandle){
70 for(
auto const & dptr : digitlist) {
73 uint32_t chan = digit.
Channel();
76 if(iapa != apa)
continue;
81 int iFEMB = ((WIB*4)+(FEMB-1));
92 for(
auto const & dptr : digitTSlist) {
100 if(iapa != apa)
continue;
105 int iFEMB = ((WIB*4)+(FEMB-1));
107 apaset.insert(iFEMB);
110 return (apaset.size());
121 ULong64_t ×tamp, ULong64_t ×tamp2,
122 int &apainconsist)
const 125 std::vector<art::Ptr<raw::RDTimeStamp> > TSlist;
134 for(
auto const & tsptr : TSlist)
139 if (apas.find(iapa) != apas.end())
uint16_t GetFlags() const
Collection of charge vs time digitized from a single readout channel.
Handle< PROD > getHandle(SelectorBase const &) const
ChannelID_t Channel() const
DAQ channel this raw data was read from.
unsigned int APAFromOfflineChannel(unsigned int offlineChannel) const
Returns APA/crate.
art::InputTag fRawDigitTag
T get(std::string const &key) const
art::InputTag fRawDigitTimeStampTag
ProtoDUNEDataUtils(fhicl::ParameterSet const &pset)
ULong64_t GetTimeStamp() const
unsigned int WIBFromOfflineChannel(unsigned int offlineChannel) const
Returns WIB/slot.
int GetNActiveFembsForAPA(art::Event const &evt, int apa) const
Get number of active fembs in an APA.
unsigned int FEMBFromOfflineChannel(unsigned int offlineChannel) const
Returns FEMB/fiber.
bool CheckTimeStampConsistencyForAPAs(art::Event const &evt, std::set< int > apas, ULong64_t ×tamp, ULong64_t ×tamp2, int &apainconsist) const
Check for consistency of timestamp values for a set of APAs. True if consistent, false if there are m...
void reconfigure(fhicl::ParameterSet const &pset)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
bool IsBeamTrigger(art::Event const &evt) const