#include <MixHelper.h>
Classes | |
| struct | Config |
Public Types | |
| enum | Mode { Mode::SEQUENTIAL = 0, Mode::RANDOM_REPLACE, Mode::RANDOM_LIM_REPLACE, Mode::RANDOM_NO_REPLACE, Mode::UNKNOWN } |
Public Member Functions | |
| MixHelper (Config const &config, std::string const &moduleLabel, ProducesCollector &collector, std::unique_ptr< MixIOPolicy > ioHandle) | |
| MixHelper (fhicl::ParameterSet const &pset, std::string const &moduleLabel, ProducesCollector &collector, std::unique_ptr< MixIOPolicy > ioHandle) | |
| Mode | readMode () const |
| void | registerSecondaryFileNameProvider (ProviderFunc_ func) |
| template<class P > | |
| void | produces (std::string const &instanceName={}) |
| template<class P , BranchType B> | |
| void | produces (std::string const &instanceName={}) |
| template<art::BranchType B = art::InEvent, typename PROD , typename OPROD > | |
| void | declareMixOp (InputTag const &inputTag, MixFunc< PROD, OPROD > mixFunc, bool outputProduct=true) |
| template<art::BranchType B = art::InEvent, typename PROD , typename OPROD > | |
| void | declareMixOp (InputTag const &inputTag, std::string const &outputInstanceLabel, MixFunc< PROD, OPROD > mixFunc, bool outputProduct=true) |
| template<art::BranchType B = art::InEvent, typename PROD , typename OPROD , typename T > | |
| void | declareMixOp (InputTag const &inputTag, bool(T::*mixfunc)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &), T &t, bool outputProduct=true) |
| template<art::BranchType B = art::InEvent, typename PROD , typename OPROD , typename T > | |
| void | declareMixOp (InputTag const &inputTag, std::string const &outputInstanceLabel, bool(T::*mixfunc)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &), T &t, bool outputProduct=true) |
| template<art::BranchType B = art::InEvent, typename PROD , typename OPROD , typename T > | |
| void | declareMixOp (InputTag const &inputTag, bool(T::*mixfunc)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) const, T const &t, bool outputProduct=true) |
| template<art::BranchType B = art::InEvent, typename PROD , typename OPROD , typename T > | |
| void | declareMixOp (InputTag const &inputTag, std::string const &outputInstanceLabel, bool(T::*mixfunc)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) const, T const &t, bool outputProduct=true) |
| base_engine_t & | createEngine (seed_t seed) |
| base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make) |
| base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label) |
| bool | generateEventSequence (size_t nSecondaries, EntryNumberSequence &enSeq, EventIDSequence &eIDseq) |
| EventAuxiliarySequence | generateEventAuxiliarySequence (EntryNumberSequence const &) |
| void | mixAndPut (EntryNumberSequence const &enSeq, EventIDSequence const &eIDseq, Event &e) |
| void | setEventsToSkipFunction (std::function< size_t()> eventsToSkip) |
| template<art::BranchType B, typename PROD , typename OPROD , typename T > | |
| void | declareMixOp (InputTag const &inputTag, bool(T::*mixFunc)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &), T &t, bool outputProduct) |
| template<art::BranchType B, typename PROD , typename OPROD , typename T > | |
| void | declareMixOp (InputTag const &inputTag, std::string const &outputInstanceLabel, bool(T::*mixFunc)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &), T &t, bool outputProduct) |
| template<art::BranchType B, typename PROD , typename OPROD , typename T > | |
| void | declareMixOp (InputTag const &inputTag, bool(T::*mixFunc)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) const, T const &t, bool outputProduct) |
| template<art::BranchType B, typename PROD , typename OPROD , typename T > | |
| void | declareMixOp (InputTag const &inputTag, std::string const &outputInstanceLabel, bool(T::*mixFunc)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) const, T const &t, bool outputProduct) |
Private Types | |
| using | ProviderFunc_ = std::function< std::string()> |
| using | MixOpList = std::vector< std::unique_ptr< MixOpBase >> |
Private Types inherited from art::detail::EngineCreator | |
| using | base_engine_t = CLHEP::HepRandomEngine |
| using | label_t = RNGsnapshot::label_t |
| using | seed_t = long |
| using | engine_state_t = RNGsnapshot::engine_state_t |
Private Member Functions | |
| MixHelper (MixHelper const &)=delete | |
| MixHelper & | operator= (MixHelper const &)=delete |
| cet::exempt_ptr< base_engine_t > | initEngine_ (seed_t seed, Mode readMode) |
| std::unique_ptr< CLHEP::RandFlat > | initDist_ (cet::exempt_ptr< base_engine_t > engine) const |
| bool | consistentRequest_ (std::string const &kind_of_engine_to_make, label_t const &engine_label) const |
| Mode | initReadMode_ (std::string const &mode) const |
| bool | openNextFile_ () |
| ProdToProdMapBuilder::ProductIDTransMap | buildProductIDTransMap_ (MixOpList &mixOps) |
Private Member Functions inherited from art::detail::EngineCreator | |
| EngineCreator (std::string const &label, ScheduleID sid) | |
| base_engine_t & | createEngine (seed_t seed) |
| base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make) |
| base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label) |
Private Attributes | |
| ProducesCollector & | collector_ |
| std::string const | moduleLabel_ |
| std::vector< std::string > const | filenames_ |
| bool | compactMissingProducts_ |
| ProviderFunc_ | providerFunc_ {} |
| MixOpList | mixOps_ {} |
| PtrRemapper | ptrRemapper_ {} |
| std::vector< std::string >::const_iterator | fileIter_ |
| Mode const | readMode_ |
| double const | coverageFraction_ |
| std::size_t | nEventsReadThisFile_ {} |
| std::size_t | totalEventsRead_ {} |
| bool const | canWrapFiles_ |
| unsigned | nOpensOverThreshold_ {} |
| ProdToProdMapBuilder | ptpBuilder_ {} |
| cet::exempt_ptr< base_engine_t > | engine_ |
| std::unique_ptr< CLHEP::RandFlat > | dist_ |
| std::function< size_t()> | eventsToSkip_ {} |
| EntryNumberSequence | shuffledSequence_ {} |
| bool | haveSubRunMixOps_ {false} |
| bool | haveRunMixOps_ {false} |
| EventIDIndex | eventIDIndex_ {} |
| std::unique_ptr< MixIOPolicy > | ioHandle_ {nullptr} |
Definition at line 245 of file MixHelper.h.
|
private |
Definition at line 381 of file MixHelper.h.
|
private |
Definition at line 246 of file MixHelper.h.
|
strong |
| Enumerator | |
|---|---|
| SEQUENTIAL | |
| RANDOM_REPLACE | |
| RANDOM_LIM_REPLACE | |
| RANDOM_NO_REPLACE | |
| UNKNOWN | |
Definition at line 249 of file MixHelper.h.
|
explicit |
Definition at line 99 of file MixHelper.cc.
|
explicit |
Definition at line 80 of file MixHelper.cc.
|
privatedelete |
|
private |
|
private |
Definition at line 432 of file MixHelper.cc.
| art::MixHelper::base_engine_t & art::MixHelper::createEngine | ( | seed_t | seed | ) |
Definition at line 148 of file MixHelper.cc.
| art::MixHelper::base_engine_t & art::MixHelper::createEngine | ( | seed_t | seed, |
| std::string const & | kind_of_engine_to_make | ||
| ) |
Definition at line 160 of file MixHelper.cc.
| art::MixHelper::base_engine_t & art::MixHelper::createEngine | ( | seed_t | seed, |
| std::string const & | kind_of_engine_to_make, | ||
| label_t const & | engine_label | ||
| ) |
Definition at line 170 of file MixHelper.cc.
|
inline |
Definition at line 448 of file MixHelper.h.
| void art::MixHelper::declareMixOp | ( | InputTag const & | inputTag, |
| std::string const & | outputInstanceLabel, | ||
| MixFunc< PROD, OPROD > | mixFunc, | ||
| bool | outputProduct = true |
||
| ) |
Definition at line 458 of file MixHelper.h.
| void art::MixHelper::declareMixOp | ( | InputTag const & | inputTag, |
| bool(T::*)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) | mixfunc, | ||
| T & | t, | ||
| bool | outputProduct = true |
||
| ) |
| void art::MixHelper::declareMixOp | ( | InputTag const & | inputTag, |
| std::string const & | outputInstanceLabel, | ||
| bool(T::*)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) | mixfunc, | ||
| T & | t, | ||
| bool | outputProduct = true |
||
| ) |
| void art::MixHelper::declareMixOp | ( | InputTag const & | inputTag, |
| bool(T::*)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) const | mixfunc, | ||
| T const & | t, | ||
| bool | outputProduct = true |
||
| ) |
| void art::MixHelper::declareMixOp | ( | InputTag const & | inputTag, |
| std::string const & | outputInstanceLabel, | ||
| bool(T::*)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) const | mixfunc, | ||
| T const & | t, | ||
| bool | outputProduct = true |
||
| ) |
|
inline |
Definition at line 483 of file MixHelper.h.
| void art::MixHelper::declareMixOp | ( | InputTag const & | inputTag, |
| std::string const & | outputInstanceLabel, | ||
| bool(T::*)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) | mixFunc, | ||
| T & | t, | ||
| bool | outputProduct | ||
| ) |
Definition at line 500 of file MixHelper.h.
|
inline |
Definition at line 521 of file MixHelper.h.
| void art::MixHelper::declareMixOp | ( | InputTag const & | inputTag, |
| std::string const & | outputInstanceLabel, | ||
| bool(T::*)(std::vector< PROD const * > const &, OPROD &, PtrRemapper const &) const | mixFunc, | ||
| T const & | t, | ||
| bool | outputProduct | ||
| ) |
Definition at line 538 of file MixHelper.h.
| art::EventAuxiliarySequence art::MixHelper::generateEventAuxiliarySequence | ( | EntryNumberSequence const & | enSeq | ) |
Definition at line 268 of file MixHelper.cc.
| bool art::MixHelper::generateEventSequence | ( | size_t | nSecondaries, |
| EntryNumberSequence & | enSeq, | ||
| EventIDSequence & | eIDseq | ||
| ) |
Definition at line 182 of file MixHelper.cc.
|
private |
Definition at line 472 of file MixHelper.cc.
|
private |
Definition at line 454 of file MixHelper.cc.
|
private |
Definition at line 357 of file MixHelper.cc.
| void art::MixHelper::mixAndPut | ( | EntryNumberSequence const & | enSeq, |
| EventIDSequence const & | eIDseq, | ||
| Event & | e | ||
| ) |
Definition at line 278 of file MixHelper.cc.
|
private |
Definition at line 384 of file MixHelper.cc.
|
inline |
Definition at line 432 of file MixHelper.h.
|
inline |
Definition at line 440 of file MixHelper.h.
|
inline |
Definition at line 424 of file MixHelper.h.
| void art::MixHelper::registerSecondaryFileNameProvider | ( | ProviderFunc_ | func | ) |
Definition at line 137 of file MixHelper.cc.
| void art::MixHelper::setEventsToSkipFunction | ( | std::function< size_t()> | eventsToSkip | ) |
Definition at line 351 of file MixHelper.cc.
|
private |
Definition at line 406 of file MixHelper.h.
|
private |
Definition at line 394 of file MixHelper.h.
|
private |
Definition at line 397 of file MixHelper.h.
|
private |
Definition at line 403 of file MixHelper.h.
|
private |
Definition at line 410 of file MixHelper.h.
|
private |
Definition at line 409 of file MixHelper.h.
|
private |
Definition at line 415 of file MixHelper.h.
|
private |
Definition at line 411 of file MixHelper.h.
|
private |
Definition at line 401 of file MixHelper.h.
|
private |
Definition at line 396 of file MixHelper.h.
|
private |
Definition at line 414 of file MixHelper.h.
|
private |
Definition at line 413 of file MixHelper.h.
|
private |
Definition at line 417 of file MixHelper.h.
|
private |
Definition at line 399 of file MixHelper.h.
|
private |
Definition at line 395 of file MixHelper.h.
|
private |
Definition at line 404 of file MixHelper.h.
|
private |
Definition at line 407 of file MixHelper.h.
|
private |
Definition at line 398 of file MixHelper.h.
|
private |
Definition at line 408 of file MixHelper.h.
|
private |
Definition at line 400 of file MixHelper.h.
|
private |
Definition at line 402 of file MixHelper.h.
|
private |
Definition at line 412 of file MixHelper.h.
|
private |
Definition at line 405 of file MixHelper.h.
1.8.11