Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
art::DataViewImpl Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Framework/Principal/DataViewImpl.h"

Inheritance diagram for art::DataViewImpl:
art::Event art::Results art::Run art::SubRun

Classes

struct  PMValue
 

Public Types

using RetrievedProductIDs = std::vector< ProductID >
 
using RetrievedProductSet = std::set< ProductID >
 
using TypeLabelMap = std::map< TypeLabel, PMValue >
 

Public Member Functions

 DataViewImpl (DataViewImpl const &)=delete
 
DataViewImploperator= (DataViewImpl const &)=delete
 
 DataViewImpl (Principal const &p, ModuleDescription const &md, BranchType bt, bool recordParents, cet::exempt_ptr< Consumer > consumer)
 
size_t size () const
 
template<typename PROD >
bool get (SelectorBase const &, Handle< PROD > &result) const
 
template<typename PROD >
bool get (ProductID const pid, Handle< PROD > &result) const
 
template<typename PROD >
bool getByLabel (std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
 
template<typename PROD >
bool getByLabel (std::string const &label, std::string const &productInstanceName, std::string const &processName, Handle< PROD > &result) const
 
template<typename PROD >
PROD const & getByLabel (InputTag const &tag) const
 same as above, but using the InputTag class More...
 
template<typename PROD >
bool getByLabel (InputTag const &tag, Handle< PROD > &result) const
 
template<typename PROD >
PROD const * getPointerByLabel (InputTag const &tag) const
 
template<typename PROD >
bool getByToken (ProductToken< PROD > const &token, Handle< PROD > &result) const
 
template<typename PROD >
ValidHandle< PROD > getValidHandle (InputTag const &tag) const
 
template<typename PROD >
ValidHandle< PROD > getValidHandle (ProductToken< PROD > const &token) const
 
template<typename PROD >
void getMany (SelectorBase const &, std::vector< Handle< PROD >> &results) const
 
template<typename PROD >
void getManyByType (std::vector< Handle< PROD >> &results) const
 
template<typename ELEMENT >
std::size_t getView (std::string const &moduleLabel, std::string const &productInstanceName, std::vector< ELEMENT const * > &result) const
 
template<typename ELEMENT >
std::size_t getView (InputTag const &tag, std::vector< ELEMENT const * > &result) const
 
template<typename ELEMENT >
std::size_t getView (ViewToken< ELEMENT > const &token, std::vector< ELEMENT const * > &result) const
 
template<typename ELEMENT >
bool getView (std::string const &moduleLabel, std::string const &instanceName, View< ELEMENT > &result) const
 
template<typename ELEMENT >
bool getView (InputTag const &tag, View< ELEMENT > &result) const
 
template<typename ELEMENT >
bool getView (ViewToken< ELEMENT > const &tag, View< ELEMENT > &result) const
 
template<typename PROD >
bool removeCachedProduct (Handle< PROD > &h) const
 
ProcessHistory const & processHistory () const
 
template<typename PROD >
art::ValidHandle< PROD > getValidHandle (InputTag const &tag) const
 
template<typename PROD >
art::ValidHandle< PROD > getValidHandle (ProductToken< PROD > const &token) const
 
template<typename ELEMENT >
art::DataViewImpl::GroupQueryResultVec getView_ (std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName) const
 

Protected Types

using GroupQueryResultVec = std::vector< GroupQueryResult >
 

Protected Member Functions

void recordAsParent (Provenance const &prov) const
 
TypeLabelMapputProducts ()
 
TypeLabelMap const & putProducts () const
 
RetrievedProductSet const & retrievedProducts () const
 
RetrievedProductIDs retrievedProductIDs () const
 
void checkPutProducts (bool checkProducts, std::set< TypeLabel > const &expectedProducts, TypeLabelMap const &putProducts)
 
BranchDescription const & getProductDescription (TypeID const &type, std::string const &productInstanceName) const
 

Private Member Functions

void removeNonViewableMatches_ (TypeID const &requestedElementType, GroupQueryResultVec &results) const
 
void ensureUniqueProduct_ (std::size_t nFound, TypeID const &typeID, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName) const
 
GroupQueryResult get_ (WrappedTypeID const &wrapped, SelectorBase const &) const
 
GroupQueryResult getByProductID_ (ProductID const pid) const
 
GroupQueryResult getByLabel_ (WrappedTypeID const &wrapped, std::string const &label, std::string const &productInstanceName, std::string const &processName) const
 
GroupQueryResultVec getMany_ (WrappedTypeID const &wrapped, SelectorBase const &sel) const
 
GroupQueryResultVec getMatchingSequenceByLabel_ (std::string const &label, std::string const &productInstanceName, std::string const &processName) const
 
template<typename ELEMENT >
GroupQueryResultVec getView_ (std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName) const
 
template<typename ELEMENT >
void fillView_ (GroupQueryResult &bh, std::vector< ELEMENT const * > &result) const
 
void removeCachedProduct_ (ProductID const pid) const
 

Private Attributes

TypeLabelMap putProducts_ {}
 
RetrievedProductSet retrievedProducts_ {}
 
Principal const & principal_
 
ModuleDescription const & md_
 
BranchType const branchType_
 
bool const recordParents_
 
cet::exempt_ptr< Consumerconsumer_
 

Detailed Description

Definition at line 76 of file DataViewImpl.h.

Member Typedef Documentation

Definition at line 214 of file DataViewImpl.h.

Definition at line 175 of file DataViewImpl.h.

Definition at line 176 of file DataViewImpl.h.

Definition at line 177 of file DataViewImpl.h.

Constructor & Destructor Documentation

art::DataViewImpl::DataViewImpl ( DataViewImpl const &  )
delete
art::DataViewImpl::DataViewImpl ( Principal const &  p,
ModuleDescription const &  md,
BranchType  bt,
bool  recordParents,
cet::exempt_ptr< Consumer consumer 
)
explicit

Member Function Documentation

void art::DataViewImpl::checkPutProducts ( bool  checkProducts,
std::set< TypeLabel > const &  expectedProducts,
TypeLabelMap const &  putProducts 
)
protected
void art::DataViewImpl::ensureUniqueProduct_ ( std::size_t  nFound,
TypeID const &  typeID,
std::string const &  moduleLabel,
std::string const &  productInstanceName,
std::string const &  processName 
) const
private

Referenced by getView_().

template<typename ELEMENT >
void art::DataViewImpl::fillView_ ( GroupQueryResult bh,
std::vector< ELEMENT const * > &  result 
) const
private

Definition at line 531 of file DataViewImpl.h.

References submit_syst::const, stan::io::product(), recordAsParent(), recordParents_, art::GroupQueryResult::result(), and cet::transform_all().

Referenced by getView().

533 {
534  std::vector<void const*> erased_ptrs;
535  auto product = bh.result()->uniqueProduct();
536  // The lookups and the checking done in getView_ ensure that the
537  // retrieved product supports the requested view.
538  product->fillView(erased_ptrs);
539  if (recordParents_) {
540  recordAsParent(Provenance{bh.result()});
541  }
542  std::vector<ELEMENT const*> vals;
543  cet::transform_all(erased_ptrs, std::back_inserter(vals), [](auto p) {
544  return static_cast<ELEMENT const*>(p);
545  });
546  result.swap(vals);
547 }
void recordAsParent(Provenance const &prov) const
const char * p
Definition: xmltok.h:285
auto transform_all(Container &, OutputIt, UnaryOp)
T product(std::vector< T > dims)
bool const recordParents_
Definition: DataViewImpl.h:286
template<typename PROD >
bool art::DataViewImpl::get ( SelectorBase const &  sel,
Handle< PROD > &  result 
) const
inline

Definition at line 307 of file DataViewImpl.h.

References art::Handle< T >::clear(), art::convert_handle(), art::Handle< T >::failedToGet(), get_(), art::Handle< T >::provenance(), recordAsParent(), recordParents_, and art::GroupQueryResult::succeeded().

Referenced by art::Run::endTime(), art::SubRun::endTime(), art::detail::ProcessAndEventSelector::loadTriggerResults(), and art::Event::put().

308 {
309  result.clear(); // Is this the correct thing to do if an exception is thrown?
310  // We do *not* track whether consumes was called for a SelectorBase.
311  GroupQueryResult bh = get_(WrappedTypeID::make<PROD>(), sel);
312  convert_handle(bh, result);
313  bool const ok{bh.succeeded() && !result.failedToGet()};
314  if (recordParents_ && ok) {
315  recordAsParent(*result.provenance());
316  }
317  return ok;
318 }
void recordAsParent(Provenance const &prov) const
GroupQueryResult get_(WrappedTypeID const &wrapped, SelectorBase const &) const
void convert_handle(GroupQueryResult const &, Handle< T > &)
Definition: Handle.h:248
bool const recordParents_
Definition: DataViewImpl.h:286
template<typename PROD >
bool art::DataViewImpl::get ( ProductID const  pid,
Handle< PROD > &  result 
) const

Definition at line 322 of file DataViewImpl.h.

References art::Handle< T >::clear(), art::convert_handle(), art::Handle< T >::failedToGet(), getByProductID_(), art::Handle< T >::provenance(), recordAsParent(), recordParents_, and art::GroupQueryResult::succeeded().

323 {
324  result.clear(); // Is this the correct thing to do if an exception is thrown?
325  // We do *not* track whether consumes was called for a ProductID.
326  GroupQueryResult bh = getByProductID_(pid);
327  convert_handle(bh, result);
328  bool const ok{bh.succeeded() && !result.failedToGet()};
329  if (recordParents_ && ok) {
330  recordAsParent(*result.provenance());
331  }
332  return ok;
333 }
void recordAsParent(Provenance const &prov) const
void convert_handle(GroupQueryResult const &, Handle< T > &)
Definition: Handle.h:248
GroupQueryResult getByProductID_(ProductID const pid) const
bool const recordParents_
Definition: DataViewImpl.h:286
GroupQueryResult art::DataViewImpl::get_ ( WrappedTypeID const &  wrapped,
SelectorBase const &   
) const
private

Referenced by get().

template<typename PROD >
bool art::DataViewImpl::getByLabel ( std::string const &  label,
std::string const &  productInstanceName,
Handle< PROD > &  result 
) const
inline

Definition at line 344 of file DataViewImpl.h.

References label, and fillBadChanDBTables::result.

Referenced by om::TestTMapFile::analyze(), novaddt::NovaDDTTrigger::analyze(), highe::HighEnergyAna::analyze(), tut::TutAnalyzer::analyze(), calib::ADCShapeFitAna::analyze(), spilltime::analyze(), novaddt::MilliBlockChecking::analyze(), comi::ChanOcc::analyze(), qeef::QeFinderVal::analyze(), tbana::RawFileDumper::analyze(), novaddt::Evaluation::analyze(), validation::ValidateChannelInfo::analyze(), cheat::TestTrackIds::analyze(), ddt::DDTEva::analyze(), rsim::RecordNoiseSpectrumFile::analyze(), novaddt::SingletonRejectionAna::analyze(), calhit::CalHitAna::analyze(), validation::ValidateDAQ2RawDigit::analyze(), ve::VertexEva::analyze(), novaddt::TriCellTriggerAna::analyze(), calib::ThresholdAna::analyze(), cheat::CheckBackTracking::analyze(), chaninfo::CosmicEff::analyze(), remid::ReMIdValidate::analyze(), cheat::RecoCheckAna::analyze(), air::AirTree::analyze(), jmshower::RecoJMShowerAna::analyze(), mcdatadaq::MockDataDAQAna::analyze(), novaddt::ClusterAna::analyze(), calib::ParticleCorrections::analyze(), comi::CosmicMetrics::analyze(), febstat::FEBShutoff::analyze(), air::AirShower::analyze(), ddt::SMMADC::analyze(), align::AlignInspect::analyze(), dq::DAQHeaderSummaryAna::analyze(), mcchk::CloseInTime::analyze(), mmc::Validation::analyze(), tut::RecoValidationTutorial::analyze(), novaddt::DAQHeaderAna::analyze(), calib::TestParticleCorrections::analyze(), mcchk::DetAna::analyze(), G4MismatchAna::analyze(), dprf::ChannelPlots::analyze(), remid::ReMIdTrain::analyze(), zcl::SMMTriggerAna::analyze(), tut::reco2016::RecoObjectsTutorial::analyze(), tut::yn2017::AnalysisModule::analyze(), mcchk::ShowerAnaCheck::analyze(), beamlinereco::BeamlineRecoDump::analyze(), slicer::S4DParamCalc::analyze(), beamlinereco::ToFSingleCounterAnalysis::analyze(), BeamlineAna::analyze(), air::CosmicTrackRate::analyze(), tut::yn2017::DebugThis::analyze(), mcchk::MonopoleAna::analyze(), dprf::TrackPlots::analyze(), numue::NumuEAna::analyze(), align::Alignment::analyze(), testbeam::BeamlineRecoValidation::analyze(), febstat::EventFEBStatus::analyze(), tbana::DSToFAna::analyze(), mcchk::RockAna::analyze(), murem::MuonRemoveAna::analyze(), novaddt::SNAna::analyze(), align::SplitTracks::analyze(), sn::SNSlicerAna::analyze(), sn::SupernovaAna::analyze(), beamlinereco::ToFRecoAnalysis::analyze(), novatb::TOFTimingResolution::analyze(), mcchk::NeutrinoAna::analyze(), mono::DataCheckMonopole::analyze(), pa::ClusterEva::analyze(), pa::HitEva::analyze(), calib::AssessCalib::analyze(), slicer::IdenticalSlicerAna::analyze(), testbeam::TestBeamCommissioning::analyze(), beamlinerecoana::WCTrackRecoAnalysis::analyze(), vf::TrackEva::analyze(), comi::DataCheck::analyze(), calib::EnergyStandardCandles::analyze(), calib::HitEfficiency::analyze(), tbana::BeamStructureAna::analyze(), validation::NoiseClusterAnalysis::analyze(), meta::Metadata::analyze(), zcl::MMCheater::analyze(), novaddt::HorizontalMuonAna::analyze(), remid::ReMIdDedx::analyze(), nnbar::SigVsBkgSimCompare::analyze(), chaninfo::BadChanValidate::analyze(), comi::NumiFilteringAna::analyze(), zcl::FmmTriggerAna::analyze(), mcchk::LeptonAna::analyze(), novaddt::Calibration::analyze(), comi::Leana::analyze(), tbana::BeamlineTriggerAna::analyze(), ddt::DataSliceEva::analyze(), tbem::TBRecoAna::analyze(), ddt::SlicerEva::analyze(), calib::PEResponse::analyze(), novatb::TOFTriggerAna::analyze(), novatb::TriggerRateAna::analyze(), zcl::FmmTrackerValidation::analyze(), zcl::FmmTrackerAna::analyze(), trk::KalmanTrackAna::analyze(), showere::ShowerEnergyAna::analyze(), beamlinereco::EventWaveformDump::analyze(), trigmon::LongReadoutAnalyzer::analyze(), novaddt::SendTriggerSignal::analyze(), cvn::CVNEventDump::analyze(), hough::HoughValidate::analyze(), cvn::CVNCosmicEventDump::analyze(), earms::ElasticArmsValidate::analyze(), bpfit::BreakPointAna::analyze(), cvn::CVNEventProngDump::analyze(), calib::StopperThreshold::analyze(), Mono::Mono::analyze(), novaddt::UpMuAna::analyze(), mono::SlowMonopoleAna::analyze(), mcchk::DetSimAna::analyze(), slicer::SlicerAna::analyze(), rockmuon::NDRockMuon::analyze(), ncid::NCNNKerasVal::analyze(), remid::ReMIdDedxRock::analyze(), comi::NearlineAna::analyze(), ncpi0::TwoProngBDTAna::analyze(), mono::Monopole::analyze(), fuzz::FuzzyKValidate::analyze(), remid::ReMIdDedxFD::analyze(), remid::ReMIdDedxStudies::analyze(), zcl::FastMMStudy::analyze(), nnbar::ShowerMuonCoincidence::analyze(), testbeam::BeamlineEventDisplay::analyze(), tbana::DetectorRateShutOff::analyze(), beamlinereco::ToFAnalysisMini::analyze(), LightLevels::analyze(), calib::CosmicTrends::analyze(), CerenkovResponse::analyze(), air::AirKalmanAna::analyze(), ncs::Xbeam::analyze(), ncs::GenieTruth::analyze(), ncs::Xeff::analyze(), calib::CalibAna::analyze(), moonshadowana::MoonShadowAna::analyze(), ncs::ROCKMRE::analyze(), ddt::SuperDDTEva::analyze(), slid::LIDTraining::analyze(), beamlinesim::CombinedBeamlineDetectorAna::analyze(), moonshadowana::MoonShadowAnaHough::analyze(), ncs::NCAna::analyze(), upmuana::UpMuRecoAna::analyze(), upmuana::UpMuAnalysis::analyze(), nnbar::RecoAnalysis::analyze(), beamlinereco::ToFPositionRecoAnalysis::analyze(), sn::SNMichelAnalyzer::analyze(), htk::HoughTrack::analyze(), novatb::BeamTuning::analyze(), trk::CosmicTrackAna::analyze(), red::EWCosmics::analyze(), comi::FEBFlash::analyze(), murem::MRCCAna::analyze(), lem::UnTranspose::beginRun(), lem::MakeMatches::beginRun(), lem::MakePID::beginRun(), calib::DriftCorrection::beginRun(), caf::CAFMaker::beginRun(), mcchk::POTAna::beginSubRun(), jmshower::RecoJMShowerAna::beginSubRun(), skim::RandomEventFilter::beginSubRun(), validation::NoiseClusterAnalysis::beginSubRun(), comi::NumiFilteringAna::beginSubRun(), air::AirKalmanAna::beginSubRun(), caf::CAFMaker::beginSubRun(), trk::CosmicTrackAna::beginSubRun(), sn::SNMichelAnalyzer::ClusterAroundTrackEnds(), evd::PlotView::Draw(), calib::SumRunsCalib::endRun(), calib::AbsCalib::endRun(), calib::BetheBlochFit::endRun(), calib::AttenFit::endRun(), calib::SumSubrunsCalib::endSubRun(), rsim::RecordNoiseSpectrumFile::endSubRun(), MergeGenCollections::MergeGenCollections::endSubRun(), comi::Cana::endSubRun(), lem::MakeLibrary::endSubRun(), ifdb::IFDBSpillInfo::endSubRun(), calib::PEResponse::endSubRun(), calib::AttenFit::endSubRun(), slicer::SlicerAna::endSubRun(), calib::DCMTimingOffset::endSubRun(), ifdb::MIN::endSubRun(), bpfit::BreakPointProtonAna::endSubRun(), ncs::Xbeam::endSubRun(), ncs::Xeff::endSubRun(), ncs::ROCKMRE::endSubRun(), ncs::NCAna::endSubRun(), caf::CAFMaker::endSubRun(), art::Run::endTime(), art::SubRun::endTime(), filter::Filter::FillDigitVariables(), LSTME::FillLSTME::fillEnergies(), filter::Filter::FillG4GenVariables(), caf::FillMRCCParentInfo(), skim::CosmicBeamComparison::FillNueHistograms(), SliceLID::FillSliceLID::fillSliceLIDPreds(), filter::Filter::FillSliceVariables(), filter::Filter::FillTrackVariables(), murem::MuonRemove::FillTruthInfo(), filter::Filter::FillTruthVariables(), evgen::CRVFilter::filter(), lem::ApplyFilter::filter(), lem::BackgroundEnricher::filter(), novaddt::HighSortByTDC::filter(), novaddt::SortByTDC::filter(), novaddt::SortByPlane::filter(), novaddt::SortByDCM::filter(), novaddt::Clusterer::filter(), comi::CanaFilter::filter(), novaddt::TDSlice::filter(), novaddt::RemoveNoise::filter(), highe::HighEnergyFilt::filter(), novaddt::SpaceSlice::filter(), calib::ThroughgoingSelection::filter(), evgen::OccupiedSpillFilter::filter(), novaddt::DCMSlice::filter(), novaddt::HighADCFilter::filter(), novaddt::TimeDCMSlice::filter(), calib::RockMuonStopperSelection::filter(), calib::StopperSelection::filter(), air::AirFilter::filter(), novaddt::TimeSlice::filter(), novaddt::HighETrigger::filter(), beamlinereco::GoodBeamlineEventFilter::filter(), util::RemoveTBSpills::filter(), novaddt::DDTStreamer::filter(), util::RemoveBeamSpills::filter(), novaddt::TriCellTrigger::filter(), novaddt::DBSlicer::filter(), novaddt::DDTDemo::filter(), mono::HighEnergySliceRemoval::filter(), novaddt::ActivityTrigger::filter(), novaddt::NuESelect::filter(), jmshower::RecoJMShowerFilter::filter(), filter::FLSFilter::filter(), snutil::DDSNEWSfilter::filter(), util::RemoveBeamSpillsPrecise::filter(), beamlinereco::DigitizerSaturationFilter::filter(), novaddt::FEBOverflowTrigger::filter(), beamlinereco::ToFFilter::filter(), DataCheck::HardwareStatusCheck::filter(), novaddt::MoonShadow::filter(), calib::StopperFilter::filter(), EliminateBeamSpills::filter(), novaddt::ActivityTriggerAna::filter(), novaddt::SlowMonopoleTrigger::filter(), mono::EventSelector::filter(), comi::NumiFiltering::filter(), novaddt::FastMMTrigger::filter(), mono::MonopoleCluster::filter(), novaddt::NNFastMMTrigger::filter(), calib::TimingCalFilter::filter(), novaddt::HoughTracker::filter(), filter::TruthContain::filter(), novaddt::SlowMMTrigger::filter(), mono::SlowMonopoleFilt::filter(), novaddt::HorizontalMuonTrigger::filter(), chaninfo::FindSwappedChannels::filter(), util::RunEventFilter::filter(), calib::MuondEdx::filter(), calib::DetRespDrift::filter(), showere::ShowerEnergyFilterMC::filter(), util::TimeFilter::filter(), mono::MonopoleTrack::filter(), novaddt::UpMuTrigger::filter(), calib::MuonTrackHits::filter(), novaddt::MichelETrigger::filter(), calib::MuondEdxAna::filter(), calib::EnergyStandardCandles::FindStoppingMuons(), evd::SliceNavigator::GetBounds(), evd::SliceNavigator::GetBox(), getByLabel(), caf::CAFMaker::GetByLabelIfExists(), caf::CAFMaker::GetByLabelStrict(), getByToken(), evd::SimulationDrawer::GetFLSHits(), SliceLID::FillSliceLID::getIsRHC(), LSTME::FillLSTME::getIsRHC(), getPointerByLabel(), evd::SliceNavigator::GetProducts(), evd::SliceNavigator::GetProductsImplFull(), evd::SliceNavigator::GetProductsImplPart(), evd::RawDataDrawer::GetRawDigits(), getrawtrigger(), novaddt::SupernovaTrigger::GetTime(), novaddt::MoonShadow::GetTime(), getValidHandle(), remid::RecoMuon::Init(), skim::EvaluatorNumu::Initialize(), skim::EvaluatorNue::Initialize(), rb::IsFiltered(), regcvntf::RegCVNTF::IsRHC(), nuonecvntf::NuonECVNTF::IsRHC(), cvneventtf::CVNEventTF::IsRHC(), cvnprongtf::CVNProngTF::IsRHC(), cosrej::MakeNueCosRej::IsRHC(), comi::Cana::LoadMCInfo(), evtsum::EventSummary::MakeOutput(), evg::MCTruthToDk2NuHackItr::MCTruthToDk2NuHackItr(), earms::ElasticArmsHS::MCVertex(), novaddt::UpMuAna::populateFLSmap(), evd::SliceNavigator::postProcessEvent(), photrans::FiberBrightness::preBeginRun(), nova::dbi::RunHistoryService::preBeginRun(), nova::dbi::RunHistoryService::preBeginSubrun(), jmshower::RecoJMShower::PreSel(), util::RewriteSpillData::produce(), cvntf::CVNTF::produce(), novaddt::SortByView::produce(), presel::LEMPresel::produce(), lem::LEMAssociator::produce(), slicer::MMSlicer::produce(), trk::TrkAssn::produce(), vf::VertexFinder::produce(), util::TruthExpand::produce(), slicer::Slicer::produce(), qeef::QeFinder::produce(), photrans::PhotonSystRewriter::produce(), noe::noe::produce(), hough::HoughT::produce(), cheat::ClusterCheater::produce(), tf::TimingFit::produce(), MergeCalCollections::MergeCalCollections::produce(), filter::TruthFilter::produce(), hv::HoughVertex::produce(), cheat::ProngCheater::produce(), tut::TutProducer::produce(), cheat::ShowerCheater::produce(), cheat::TrueEnergy::produce(), recodemo::RecoDemo::produce(), MergeTBDaqCollections::MergeTBDaqCollections::produce(), slicer::Slicer4D::produce(), cheat::TrackCheater::produce(), trk::KalmanTrack::produce(), demo::DemoModule::produce(), nuesand::FillNueSandbox::produce(), lem::UnTranspose::produce(), NovaDDTHitProducer::produce(), nnbar::ShowerProducer::produce(), numue::TrackOverlapECalc::produce(), beamlinereco::TimeOfFlightReco::produce(), slicer::TruthSlicer::produce(), wsnumu::WSNumu::produce(), calib::ResizeDetector::produce(), regcvntf::RegCVNTF::produce(), MergeDaqCollections::MergeDaqCollections::produce(), MergeG4Collections::MergeG4Collections::produce(), presel::RockPresel::produce(), lem::LEMSummarizer::produce(), trk::KalmanTrackMerge::produce(), MergeCollections::MergeCollections::produce(), novaddt::TrackFit::produce(), presel::CosmicVeto::produce(), slid::Recluster::produce(), nussand::FillNusSandbox::produce(), trackinfo::TrackInfo::produce(), lem::Preselection::produce(), presel::NuePresel::produce(), nuonecvntf::NuonECVNTF::produce(), numusand::FillSandbox::produce(), jmshower::JMTrackMerge::produce(), hough::MultiHoughT::produce(), presel::CosmicCVNVeto::produce(), calib::FiberCalibration::produce(), slid::SliceLIDBuilder::produce(), lem::AlignLibToVtx::produce(), tut::yn2020::FancyScience::produce(), cosrej::CosRej::produce(), zcl::SPCluster::produce(), cvnneutronprongtf::CVNNeutronProngTF::produce(), daq2raw::DAQHit2Raw::produce(), cvnprongtf::CVNProngTF::produce(), beamlinereco::CkovCounterReco::produce(), cvneventtf::CVNEventTF::produce(), calib::PCHitTransposer::produce(), MergeGenCollections::MergeGenCollections::produce(), lem::MakeMatches::produce(), g4n::TruthSlim::produce(), trk::CosmicTrack::produce(), beamlinereco::ToFCalibration::produce(), numue::NumuEnergy::produce(), dq::DAQHeaderSummary::produce(), lem::FindMatchesTranspose::produce(), muonid::MuonIDProd::produce(), airshower::AirSlicer::produce(), lem::MakeLibrary::produce(), dt::ViewMerger::produce(), calib::TimingCalibration::produce(), wcvtx::WCVertex::produce(), beamlinereco::LEHitReco::produce(), comi::Cana::produce(), dt::DiscreteTracker::produce(), calib::PCHitsList::produce(), photrans::PhotonTransport::produce(), beamlinereco::WCTrackReco::produce(), zcl::SMMCluster::produce(), beamlinereco::CFDHitReco::produce(), ifdb::IFDBSpillInfo::produce(), jmshower::JMClusterMerge::produce(), lem::FindLEMMatches::produce(), sn::SNSlicer::produce(), zcl::FMMTracker::produce(), sn::SupernovaMCCluster::produce(), vdt::VertexDT::produce(), ifdb::TBSpillInfo::produce(), ncpi0::MakeNCPi0BkgRej::produce(), cvn::CVNMapper::produce(), zcl::FmmTriggerEvd::produce(), calib::DriftResponseCalc::produce(), lem::MakePID::produce(), slid::LIDBuilder::produce(), lem::LEM::produce(), murem::MRE::produce(), jmshower::NueSel::produce(), rvp::RecVarPID::produce(), crvtx::CosmicRayVertex::produce(), dif::DiFShowerFinder::produce(), lem::LEMWorkerOutput::produce(), dqsf::DQSpillFlags::produce(), xnue::XnuePID::produce(), slid::SPIDBuilder::produce(), jmshower::NueSelLID::produce(), cheat::MCCheater::produce(), g4n::G4Gen::produce(), ncid::MakeNCCosRej::produce(), xsrec::MakeXSecCCPi0Inc::produce(), remid::RecoMuon::produce(), sn::SNBackgroundRejection::produce(), g4rwgt::MakeG4WeightTable::produce(), lem::LEMClient::produce(), cvn::CVNAddTrainingData::produce(), murem::MergeDigits::produce(), upmuana::UpMuProb::produce(), ifdb::MIN::produce(), rsim::ReadoutSim::produce(), ncid::NCNNKeras::produce(), photrans::ImprovedTransport::produce(), murem::MuonRemove::produce(), murem::FindMREParent::produce(), beamlinesim::BeamlineSimInput::produce(), murem::FindParent::produce(), murem::MergeTruth::produce(), jmshower::RecoJMShower::produce(), slicemergeviews::SliceMergeViews::produce(), gibuu::GiBUURegen::produce(), tdslicer::TDSlicer::produce(), me::MEFinder::produce(), art::Event::put(), calib::SumAttenuationProfiles::readResults(), cmf::ContourFromLibrary::readResults(), calib::AttenuationFit::readResults(), fnex::ContourMaker::readSingleResults(), fnex::StarPlot::readSingleResults(), fnex::ReadFitResults::readSingleResults(), fnex::ContourMaker::readVectorResults(), fnex::ReadFitResults::readVectorResults(), cheat::BackTracker::Rebuild(), jmshower::RecoJMShower::RecoShowers(), skim::NumuCCpiSkimmer::Skim(), skim::NumuSkimmer::Skim(), skim::NueSkimmer::Skim(), evd::SliceNavigator::SlicesToNavigate(), dq::DAQHeaderSummary::UnpackRawDaqData(), and om::OnMonProd::UnpackRawDaqData().

347 {
348  return getByLabel<PROD>(label, productInstanceName, {}, result);
349 }
const char * label
template<typename PROD >
bool art::DataViewImpl::getByLabel ( std::string const &  label,
std::string const &  productInstanceName,
std::string const &  processName,
Handle< PROD > &  result 
) const
inline

Definition at line 353 of file DataViewImpl.h.

References branchType_, art::Handle< T >::clear(), consumer_, art::convert_handle(), art::Handle< T >::failedToGet(), getByLabel_(), label, art::ProductInfo::Product, art::Handle< T >::provenance(), recordAsParent(), recordParents_, and art::GroupQueryResult::succeeded().

357 {
358  result.clear(); // Is this the correct thing to do if an exception is thrown?
359  auto const wrapped = WrappedTypeID::make<PROD>();
360  ProductInfo const pinfo{ProductInfo::ConsumableType::Product,
361  wrapped.product_type,
362  label,
363  productInstanceName,
364  processName};
365  consumer_->validateConsumedProduct(branchType_, pinfo);
366  GroupQueryResult bh =
367  getByLabel_(wrapped, label, productInstanceName, processName);
368  convert_handle(bh, result);
369  bool const ok{bh.succeeded() && !result.failedToGet()};
370  if (recordParents_ && ok) {
371  recordAsParent(*result.provenance());
372  }
373  return ok;
374 }
void recordAsParent(Provenance const &prov) const
BranchType const branchType_
Definition: DataViewImpl.h:283
const char * label
cet::exempt_ptr< Consumer > consumer_
Definition: DataViewImpl.h:291
void convert_handle(GroupQueryResult const &, Handle< T > &)
Definition: Handle.h:248
GroupQueryResult getByLabel_(WrappedTypeID const &wrapped, std::string const &label, std::string const &productInstanceName, std::string const &processName) const
bool const recordParents_
Definition: DataViewImpl.h:286
template<typename PROD >
PROD const & art::DataViewImpl::getByLabel ( InputTag const &  tag) const
inline

same as above, but using the InputTag class

Definition at line 378 of file DataViewImpl.h.

References getByLabel(), and make_syst_table_plots::h.

379 {
380  Handle<PROD> h;
381  getByLabel(tag, h);
382  return *h;
383 }
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
template<typename PROD >
bool art::DataViewImpl::getByLabel ( InputTag const &  tag,
Handle< PROD > &  result 
) const
inline

Definition at line 337 of file DataViewImpl.h.

References art::InputTag::instance(), art::InputTag::label(), art::InputTag::process(), and fillBadChanDBTables::result.

338 {
339  return getByLabel<PROD>(tag.label(), tag.instance(), tag.process(), result);
340 }
GroupQueryResult art::DataViewImpl::getByLabel_ ( WrappedTypeID const &  wrapped,
std::string const &  label,
std::string const &  productInstanceName,
std::string const &  processName 
) const
private

Referenced by getByLabel().

GroupQueryResult art::DataViewImpl::getByProductID_ ( ProductID const  pid) const
private

Referenced by get().

template<typename PROD >
bool art::DataViewImpl::getByToken ( ProductToken< PROD > const &  token,
Handle< PROD > &  result 
) const
inline

Definition at line 387 of file DataViewImpl.h.

References getByLabel(), art::ProductToken< T >::inputTag_, fillBadChanDBTables::result, and getGoodRuns4SAM::tag.

Referenced by bpfit::BPFdEdxHistoMaker::analyze(), bpfit::BPFEnergyAna::analyze(), bpfit::BPFTmvaTrainer::analyze(), bpf::BPFCVNAna::analyze(), bpfit::BreakPointProtonAna::analyze(), bpfit::BPFTmvaTrainer::endSubRun(), gibuu::GiBUURegen::endSubRun(), art::Run::endTime(), art::SubRun::endTime(), util::CopyCellHits::filter(), util::NonEmptyCluster::filter(), evgen::OccupiedSpillFilter::filter(), evgen::GENIEFilter::filter(), util::HasStandardRecord::filter(), calhit::HasCellHits::filter(), bsf::BremShowerFilter::filter(), bpfit::DimuonFitter::FindSlices(), bpfit::BreakPoint::FindSlices(), cosmic::CosmicExposureInfo::produce(), cvntf::CVNCosmicTFFilt::produce(), cvntf::CVNCosmicTF::produce(), cvn::CVNCosmicMapper::produce(), cosrej::CosRej::produce(), earms::ElasticArmsHS::produce(), ndreco::NDReco::produce(), cvn::CVNMapper::produce(), rwgt::MakeGENIEReweightTable::produce(), cvntf::CVNProngEvaluatorTF::produce(), calhit::RemoveBadChannels::produce(), cvn::RegCVNMapper::produce(), calhit::CalHit::produce(), bpfit::BPFEnergyEstimator::produce(), bpfit::BPFEnergyEstimatorOnly::produce(), bpfit::BPFPIdMaker::produce(), cosrej::MakeNueCosRej::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), gibuu::GiBUURegen::produce(), and art::Event::put().

389 {
390  auto const& tag = token.inputTag_;
391  return getByLabel(tag.label(), tag.instance(), tag.process(), result);
392 }
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
::xsd::cxx::tree::token< char, normalized_string > token
Definition: Database.h:156
template<typename PROD >
void art::DataViewImpl::getMany ( SelectorBase const &  sel,
std::vector< Handle< PROD >> &  results 
) const
inline

Definition at line 421 of file DataViewImpl.h.

References branchType_, consumer_, art::convert_handle(), getMany_(), make_syst_table_plots::h, art::ProductInfo::Many, datagram_client::products, recordAsParent(), recordParents_, fillBadChanDBTables::result, and makeDatasetsPage::results.

Referenced by art::Run::endTime(), art::SubRun::endTime(), getManyByType(), and art::Event::put().

423 {
424  auto const wrapped = WrappedTypeID::make<PROD>();
425  consumer_->validateConsumedProduct(
426  branchType_,
427  ProductInfo{ProductInfo::ConsumableType::Many, wrapped.product_type});
428 
429  std::vector<Handle<PROD>> products;
430  for (auto const& qr : getMany_(wrapped, sel)) {
431  Handle<PROD> result;
432  convert_handle(qr, result);
433  products.push_back(result);
434  }
435  results.swap(products);
436  if (!recordParents_) {
437  return;
438  }
439  for (auto const& h : results) {
440  recordAsParent(*h.provenance());
441  }
442 }
void recordAsParent(Provenance const &prov) const
BranchType const branchType_
Definition: DataViewImpl.h:283
cet::exempt_ptr< Consumer > consumer_
Definition: DataViewImpl.h:291
void convert_handle(GroupQueryResult const &, Handle< T > &)
Definition: Handle.h:248
GroupQueryResultVec getMany_(WrappedTypeID const &wrapped, SelectorBase const &sel) const
bool const recordParents_
Definition: DataViewImpl.h:286
GroupQueryResultVec art::DataViewImpl::getMany_ ( WrappedTypeID const &  wrapped,
SelectorBase const &  sel 
) const
private

Referenced by getMany().

template<typename PROD >
void art::DataViewImpl::getManyByType ( std::vector< Handle< PROD >> &  results) const
inline
GroupQueryResultVec art::DataViewImpl::getMatchingSequenceByLabel_ ( std::string const &  label,
std::string const &  productInstanceName,
std::string const &  processName 
) const
private

Referenced by getView_().

template<typename PROD >
PROD const * art::DataViewImpl::getPointerByLabel ( InputTag const &  tag) const
inline

Definition at line 396 of file DataViewImpl.h.

References getByLabel(), and make_syst_table_plots::h.

Referenced by art::Run::endTime(), art::SubRun::endTime(), and art::Event::put().

397 {
398  Handle<PROD> h;
399  getByLabel(tag, h);
400  return &(*h);
401 }
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
BranchDescription const& art::DataViewImpl::getProductDescription ( TypeID const &  type,
std::string const &  productInstanceName 
) const
protected
template<typename PROD >
ValidHandle<PROD> art::DataViewImpl::getValidHandle ( InputTag const &  tag) const
template<typename PROD >
ValidHandle<PROD> art::DataViewImpl::getValidHandle ( ProductToken< PROD > const &  token) const
template<typename PROD >
art::ValidHandle<PROD> art::DataViewImpl::getValidHandle ( InputTag const &  tag) const
inline

Definition at line 405 of file DataViewImpl.h.

References getByLabel(), make_syst_table_plots::h, and art::ValidHandle< T >::provenance().

406 {
407  Handle<PROD> h;
408  getByLabel(tag, h);
409  return ValidHandle<PROD>(&(*h), *h.provenance());
410 }
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
template<typename PROD >
art::ValidHandle<PROD> art::DataViewImpl::getValidHandle ( ProductToken< PROD > const &  token) const
inline

Definition at line 414 of file DataViewImpl.h.

References art::ProductToken< T >::inputTag_.

415 {
416  return getValidHandle<PROD>(token.inputTag_);
417 }
::xsd::cxx::tree::token< char, normalized_string > token
Definition: Database.h:156
template<typename ELEMENT >
std::size_t art::DataViewImpl::getView ( std::string const &  moduleLabel,
std::string const &  productInstanceName,
std::vector< ELEMENT const * > &  result 
) const

Definition at line 474 of file DataViewImpl.h.

References fillView_().

Referenced by art::Run::endTime(), art::SubRun::endTime(), evd::SliceNavigator::GetProductsImplFull(), getView(), and art::Event::put().

477 {
478  auto bhv = getView_<ELEMENT>(moduleLabel, productInstanceName, {});
479  std::size_t const orig_size = result.size();
480  fillView_(bhv[0], result);
481  return result.size() - orig_size;
482 } // getView<>()
void fillView_(GroupQueryResult &bh, std::vector< ELEMENT const * > &result) const
Definition: DataViewImpl.h:531
template<typename ELEMENT >
std::size_t art::DataViewImpl::getView ( InputTag const &  tag,
std::vector< ELEMENT const * > &  result 
) const

Definition at line 486 of file DataViewImpl.h.

References fillView_(), art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

488 {
489  auto bhv = getView_<ELEMENT>(tag.label(), tag.instance(), tag.process());
490  std::size_t const orig_size = result.size();
491  fillView_(bhv[0], result);
492  return result.size() - orig_size;
493 } // getView<>()
void fillView_(GroupQueryResult &bh, std::vector< ELEMENT const * > &result) const
Definition: DataViewImpl.h:531
template<typename ELEMENT >
std::size_t art::DataViewImpl::getView ( ViewToken< ELEMENT > const &  token,
std::vector< ELEMENT const * > &  result 
) const
template<typename ELEMENT >
bool art::DataViewImpl::getView ( std::string const &  moduleLabel,
std::string const &  instanceName,
View< ELEMENT > &  result 
) const

Definition at line 497 of file DataViewImpl.h.

References fillView_(), fillBadChanDBTables::result, art::View< T >::set_innards(), and art::View< T >::vals().

500 {
501  auto bhv = getView_<ELEMENT>(moduleLabel, productInstanceName, {});
502  fillView_(bhv[0], result.vals());
503  result.set_innards(bhv[0].result()->productID(),
504  bhv[0].result()->uniqueProduct());
505  return true;
506 }
void fillView_(GroupQueryResult &bh, std::vector< ELEMENT const * > &result) const
Definition: DataViewImpl.h:531
template<typename ELEMENT >
bool art::DataViewImpl::getView ( InputTag const &  tag,
View< ELEMENT > &  result 
) const

Definition at line 510 of file DataViewImpl.h.

References fillView_(), art::InputTag::instance(), art::InputTag::label(), art::InputTag::process(), fillBadChanDBTables::result, art::View< T >::set_innards(), and art::View< T >::vals().

511 {
512  auto bhv = getView_<ELEMENT>(tag.label(), tag.instance(), tag.process());
513  fillView_(bhv[0], result.vals());
514  result.set_innards(bhv[0].result()->productID(),
515  bhv[0].result()->uniqueProduct());
516  return true;
517 }
void fillView_(GroupQueryResult &bh, std::vector< ELEMENT const * > &result) const
Definition: DataViewImpl.h:531
template<typename ELEMENT >
bool art::DataViewImpl::getView ( ViewToken< ELEMENT > const &  tag,
View< ELEMENT > &  result 
) const

Definition at line 521 of file DataViewImpl.h.

References getView(), and art::ViewToken< Element >::inputTag_.

523 {
524  return getView(token.inputTag_, result);
525 }
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::vector< ELEMENT const * > &result) const
Definition: DataViewImpl.h:474
::xsd::cxx::tree::token< char, normalized_string > token
Definition: Database.h:156
template<typename ELEMENT >
GroupQueryResultVec art::DataViewImpl::getView_ ( std::string const &  moduleLabel,
std::string const &  productInstanceName,
std::string const &  processName 
) const
private
template<typename ELEMENT >
art::DataViewImpl::GroupQueryResultVec art::DataViewImpl::getView_ ( std::string const &  moduleLabel,
std::string const &  productInstanceName,
std::string const &  processName 
) const

Definition at line 453 of file DataViewImpl.h.

References branchType_, consumer_, ensureUniqueProduct_(), getMatchingSequenceByLabel_(), removeNonViewableMatches_(), and art::ProductInfo::ViewElement.

456 {
457  TypeID const typeID{typeid(ELEMENT)};
458  ProductInfo const pinfo{ProductInfo::ConsumableType::ViewElement,
459  typeID,
460  moduleLabel,
461  productInstanceName,
462  processName};
463  consumer_->validateConsumedProduct(branchType_, pinfo);
464  auto bhv =
465  getMatchingSequenceByLabel_(moduleLabel, productInstanceName, processName);
466  removeNonViewableMatches_(typeID, bhv);
468  bhv.size(), typeID, moduleLabel, productInstanceName, processName);
469  return bhv;
470 } // getView_<>()
GroupQueryResultVec getMatchingSequenceByLabel_(std::string const &label, std::string const &productInstanceName, std::string const &processName) const
void ensureUniqueProduct_(std::size_t nFound, TypeID const &typeID, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName) const
BranchType const branchType_
Definition: DataViewImpl.h:283
cet::exempt_ptr< Consumer > consumer_
Definition: DataViewImpl.h:291
void removeNonViewableMatches_(TypeID const &requestedElementType, GroupQueryResultVec &results) const
DataViewImpl& art::DataViewImpl::operator= ( DataViewImpl const &  )
delete
ProcessHistory const& art::DataViewImpl::processHistory ( ) const
TypeLabelMap& art::DataViewImpl::putProducts ( )
inlineprotected

Definition at line 183 of file DataViewImpl.h.

References putProducts_.

Referenced by art::Results::put(), art::Event::put(), art::Run::put_(), art::SubRun::put_(), and retrievedProducts().

184  {
185  return putProducts_;
186  }
TypeLabelMap putProducts_
Definition: DataViewImpl.h:266
TypeLabelMap const& art::DataViewImpl::putProducts ( ) const
inlineprotected

Definition at line 188 of file DataViewImpl.h.

References putProducts_.

189  {
190  return putProducts_;
191  }
TypeLabelMap putProducts_
Definition: DataViewImpl.h:266
void art::DataViewImpl::recordAsParent ( Provenance const &  prov) const
protected

Referenced by fillView_(), get(), getByLabel(), and getMany().

template<typename PROD >
bool art::DataViewImpl::removeCachedProduct ( Handle< PROD > &  h) const
void art::DataViewImpl::removeCachedProduct_ ( ProductID const  pid) const
private

Referenced by removeCachedProduct().

void art::DataViewImpl::removeNonViewableMatches_ ( TypeID const &  requestedElementType,
GroupQueryResultVec results 
) const
private

Referenced by getView_().

RetrievedProductIDs art::DataViewImpl::retrievedProductIDs ( ) const
protected

Referenced by retrievedProducts().

RetrievedProductSet const& art::DataViewImpl::retrievedProducts ( ) const
inlineprotected

Definition at line 197 of file DataViewImpl.h.

References checkPutProducts(), getProductDescription(), putProducts(), retrievedProductIDs(), retrievedProducts_, and string.

198  {
199  return retrievedProducts_;
200  }
RetrievedProductSet retrievedProducts_
Definition: DataViewImpl.h:272
size_t art::DataViewImpl::size ( ) const

Member Data Documentation

BranchType const art::DataViewImpl::branchType_
private

Definition at line 283 of file DataViewImpl.h.

Referenced by getByLabel(), getMany(), and getView_().

cet::exempt_ptr<Consumer> art::DataViewImpl::consumer_
private

Definition at line 291 of file DataViewImpl.h.

Referenced by getByLabel(), getMany(), and getView_().

ModuleDescription const& art::DataViewImpl::md_
private

Definition at line 280 of file DataViewImpl.h.

Principal const& art::DataViewImpl::principal_
private

Definition at line 276 of file DataViewImpl.h.

TypeLabelMap art::DataViewImpl::putProducts_ {}
private

Definition at line 266 of file DataViewImpl.h.

Referenced by putProducts().

bool const art::DataViewImpl::recordParents_
private

Definition at line 286 of file DataViewImpl.h.

Referenced by fillView_(), get(), getByLabel(), and getMany().

RetrievedProductSet art::DataViewImpl::retrievedProducts_ {}
mutableprivate

Definition at line 272 of file DataViewImpl.h.

Referenced by retrievedProducts().


The documentation for this class was generated from the following file: