CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
edmtest::TableTestOutputModule Class Reference
Inheritance diagram for edmtest::TableTestOutputModule:
edm::global::OutputModule<> edm::global::OutputModuleBase edm::core::OutputModuleCore edm::EDConsumerBase

Public Member Functions

 TableTestOutputModule (edm::ParameterSet const &pset)
 
- Public Member Functions inherited from edm::global::OutputModule<>
const OutputModuleoperator= (const OutputModule &)=delete
 
 OutputModule (edm::ParameterSet const &iPSet)
 
 OutputModule (const OutputModule &)=delete
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
bool wantsStreamLuminosityBlocks () const noexcept final
 
bool wantsStreamRuns () const noexcept final
 
- Public Member Functions inherited from edm::global::OutputModuleBase
OutputModuleBaseoperator= (OutputModuleBase const &)=delete
 
 OutputModuleBase (ParameterSet const &pset)
 
 OutputModuleBase (OutputModuleBase const &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept
 
bool wantsGlobalRuns () const noexcept
 
- Public Member Functions inherited from edm::core::OutputModuleCore
BranchIDLists const * branchIDLists () const
 
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch () const
 
SelectedProductsForBranchType const & keptProducts () const
 
int maxEvents () const
 
const ModuleDescriptionmoduleDescription () const
 
OutputModuleCoreoperator= (OutputModuleCore const &)=delete
 
 OutputModuleCore (ParameterSet const &pset)
 
 OutputModuleCore (OutputModuleCore const &)=delete
 
OutputProcessBlockHelper const & outputProcessBlockHelper () const
 
std::string const & processName () const
 
int remainingEvents () const
 
bool selected (BranchDescription const &desc) const
 
void selectProducts (ProductRegistry const &preg, ThinnedAssociationsHelper const &, ProcessBlockHelperBase const &)
 
ThinnedAssociationsHelper const * thinnedAssociationsHelper () const
 
bool wantAllEvents () const
 
 ~OutputModuleCore () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::core::OutputModuleCore
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

void write (edm::EventForOutput const &e) override
 
void writeLuminosityBlock (edm::LuminosityBlockForOutput const &) override
 
void writeRun (edm::RunForOutput const &) override
 

Additional Inherited Members

- Public Types inherited from edm::global::OutputModuleBase
typedef OutputModuleBase ModuleType
 
- Public Types inherited from edm::core::OutputModuleCore
typedef OutputModuleCore ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::global::OutputModuleBase
void doAcquire (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *, WaitingTaskWithArenaHolder &)
 
void doBeginJob ()
 
void doBeginStream (StreamID id)
 
void doEndStream (StreamID id)
 
bool doEvent (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration const &)
 
void preActionBeforeRunEventAsync (WaitingTaskHolder iTask, ModuleCallingContext const &iModuleCallingContext, Principal const &iPrincipal) const noexcept
 
- Protected Member Functions inherited from edm::core::OutputModuleCore
void configure (OutputModuleDescription const &desc)
 
ModuleDescription const & description () const
 
void doAccessInputProcessBlock (ProcessBlockPrincipal const &, ModuleCallingContext const *)
 
void doBeginJob_ ()
 
bool doBeginLuminosityBlock (LumiTransitionInfo const &, ModuleCallingContext const *)
 
void doBeginProcessBlock (ProcessBlockPrincipal const &, ModuleCallingContext const *)
 
bool doBeginRun (RunTransitionInfo const &, ModuleCallingContext const *)
 
void doEndJob ()
 
bool doEndLuminosityBlock (LumiTransitionInfo const &, ModuleCallingContext const *)
 
void doEndProcessBlock (ProcessBlockPrincipal const &, ModuleCallingContext const *)
 
bool doEndRun (RunTransitionInfo const &, ModuleCallingContext const *)
 
bool doEvent_ (EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate_ (PreallocationConfiguration const &)
 
std::map< BranchID::value_type, BranchID::value_type > const & droppedBranchIDToKeptBranchID ()
 
virtual void preallocLumis (unsigned int)
 
ParameterSetID selectorConfig () const
 
void setEventSelectionInfo (std::map< std::string, std::vector< std::pair< std::string, int >>> const &outputModulePathPositions, bool anyProductProduced)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 
- Protected Attributes inherited from edm::core::OutputModuleCore
std::atomic< int > remainingEvents_
 

Detailed Description

Definition at line 91 of file TableTestModules.cc.

Constructor & Destructor Documentation

◆ TableTestOutputModule()

edmtest::TableTestOutputModule::TableTestOutputModule ( edm::ParameterSet const &  pset)
inline

Member Function Documentation

◆ fillDescriptions()

static void edmtest::TableTestOutputModule::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 96 of file TableTestModules.cc.

References edm::ConfigurationDescriptions::add(), and submitPVResolutionJobs::desc.

96  {
98  desc.setComment("Tests edm::soa::Table.");
99  OutputModule::fillDescription(desc);
100  descriptions.add("tabletestOutput", desc);
101  }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ write()

void edmtest::TableTestOutputModule::write ( edm::EventForOutput const &  e)
inlineoverrideprivatevirtual

Implements edm::core::OutputModuleCore.

Definition at line 104 of file TableTestModules.cc.

References cms::cuda::assert(), DummyCfis::c, MillePedeFileConverter_cfg::e, relativeConstraints::empty, Exception, edm::InEvent, edm::BasicHandle::isValid(), edm::core::OutputModuleCore::keptProducts(), label, edm::WrapperBase::tableExaminer(), unpackBuffers-CaloStage2::token, edm::BranchDescription::unwrappedTypeID(), and edm::BasicHandle::wrapper().

Referenced by pkg.AbstractPkg::generate().

104  {
105  using namespace edm;
107  for (auto product : keptProducts()[InEvent]) {
108  BranchDescription const* branchDescription = product.first;
109  TypeID const& tid = branchDescription->unwrappedTypeID();
110  EDGetToken const& token = product.second;
111  BasicHandle bh = e.getByToken(token, tid);
112  assert(bh.isValid());
113  auto examiner = bh.wrapper()->tableExaminer();
114  assert(examiner);
115  if (3 != examiner->columnDescriptions().size()) {
116  throw cms::Exception("RuntimeError")
117  << "wrong number of columns, expected 3 got " << examiner->columnDescriptions().size();
118  }
119  for (auto const& c : examiner->columnDescriptions()) {
120  if (0 == std::strcmp(c.first, edmtest::AnInt::label())) {
121  continue;
122  }
123  if (0 == std::strcmp(c.first, edmtest::AFloat::label())) {
124  continue;
125  }
126  if (0 == std::strcmp(c.first, edmtest::AString::label())) {
127  continue;
128  }
129  throw cms::Exception("RuntimeError") << "unknown column " << c.first;
130  }
131  }
132  }
TypeID unwrappedTypeID() const
assert(be >=bs)
char const * label
bool isValid() const noexcept(true)
Definition: BasicHandle.h:69
SelectedProductsForBranchType const & keptProducts() const
WrapperBase const * wrapper() const noexcept(true)
Definition: BasicHandle.h:73
HLT enums.
std::shared_ptr< soa::TableExaminerBase > tableExaminer() const
Definition: WrapperBase.h:55

◆ writeLuminosityBlock()

void edmtest::TableTestOutputModule::writeLuminosityBlock ( edm::LuminosityBlockForOutput const &  )
inlineoverrideprivatevirtual

Implements edm::core::OutputModuleCore.

Definition at line 133 of file TableTestModules.cc.

133 {}

◆ writeRun()

void edmtest::TableTestOutputModule::writeRun ( edm::RunForOutput const &  )
inlineoverrideprivatevirtual

Implements edm::core::OutputModuleCore.

Definition at line 134 of file TableTestModules.cc.

134 {}