CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edmtest::ProducerHelperUsingCollector Class Reference

Public Member Functions

 ProducerHelperUsingCollector (edm::ProducesCollector &&)
 
void putBeginLumiProducts (edm::LuminosityBlock &) const
 
void putBeginRunProducts (edm::Run &) const
 
void putEndLumiProducts (edm::LuminosityBlock &) const
 
void putEndRunProducts (edm::Run &) const
 
void putEventProducts (edm::Event &) const
 

Private Attributes

edm::EDPutToken blToken_
 
edm::EDPutTokenT< IntProduct > brToken_
 
edm::EDPutToken elToken_
 
edm::EDPutTokenT< IntProduct > erToken_
 
edm::EDPutTokenT< IntProduct > eventToken_
 
edm::EDPutToken eventUsingTypeIDToken_
 
edm::EDPutTokenT< IntProduct > eventWithInstanceToken_
 
edm::EDPutTokenT< UInt64Product > eventWithTransitionToken_
 

Detailed Description

Definition at line 31 of file ProducerUsingCollector.cc.

Constructor & Destructor Documentation

◆ ProducerHelperUsingCollector()

edmtest::ProducerHelperUsingCollector::ProducerHelperUsingCollector ( edm::ProducesCollector &&  producesCollector)

Definition at line 51 of file ProducerUsingCollector.cc.

References filterCSVwithJSON::copy, elToken_, edm::EndLuminosityBlock, edm::EndRun, erToken_, and eostools::move().

52  : eventToken_(producesCollector.produces<IntProduct>()),
53  eventWithInstanceToken_(producesCollector.produces<IntProduct>("event")),
54  eventWithTransitionToken_(producesCollector.produces<UInt64Product, edm::Transition::Event>()),
55  eventUsingTypeIDToken_(producesCollector.produces(edm::TypeID(typeid(IntProduct)), "eventOther")),
56  brToken_(producesCollector.produces<IntProduct, edm::Transition::BeginRun>("beginRun")),
57  blToken_(producesCollector.produces<edm::Transition::BeginLuminosityBlock>(edm::TypeID(typeid(IntProduct)),
58  "beginLumi")) {
59  edm::ProducesCollector copy(producesCollector);
60  erToken_ = copy.produces<IntProduct, edm::Transition::EndRun>("endRun");
61 
62  copy = producesCollector;
63  edm::ProducesCollector copy2(producesCollector);
64  copy2 = std::move(copy);
65  elToken_ = copy.produces<edm::Transition::EndLuminosityBlock>(edm::TypeID(typeid(IntProduct)), "endLumi");
66  }
edm::EDPutTokenT< UInt64Product > eventWithTransitionToken_
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
edm::EDPutTokenT< IntProduct > erToken_
edm::EDPutTokenT< IntProduct > eventToken_
edm::EDPutTokenT< IntProduct > brToken_
edm::EDPutTokenT< IntProduct > eventWithInstanceToken_
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ putBeginLumiProducts()

void edmtest::ProducerHelperUsingCollector::putBeginLumiProducts ( edm::LuminosityBlock luminosityBlock) const

Definition at line 79 of file ProducerUsingCollector.cc.

References blToken_, and edm::LuminosityBlock::put().

Referenced by edmtest::ProducerUsingCollector::globalBeginLuminosityBlockProduce().

79  {
80  luminosityBlock.put(blToken_, std::make_unique<IntProduct>(7));
81  }
void put(std::unique_ptr< PROD > product)
Put a new product.

◆ putBeginRunProducts()

void edmtest::ProducerHelperUsingCollector::putBeginRunProducts ( edm::Run run) const

◆ putEndLumiProducts()

void edmtest::ProducerHelperUsingCollector::putEndLumiProducts ( edm::LuminosityBlock luminosityBlock) const

Definition at line 83 of file ProducerUsingCollector.cc.

References elToken_, and edm::LuminosityBlock::put().

Referenced by edmtest::ProducerUsingCollector::globalEndLuminosityBlockProduce().

83  {
84  luminosityBlock.put(elToken_, std::make_unique<IntProduct>(8));
85  }
void put(std::unique_ptr< PROD > product)
Put a new product.

◆ putEndRunProducts()

void edmtest::ProducerHelperUsingCollector::putEndRunProducts ( edm::Run run) const

◆ putEventProducts()

void edmtest::ProducerHelperUsingCollector::putEventProducts ( edm::Event event) const

Definition at line 68 of file ProducerUsingCollector.cc.

References eventToken_, eventUsingTypeIDToken_, eventWithInstanceToken_, and eventWithTransitionToken_.

Referenced by edmtest::ProducerUsingCollector::produce().

68  {
69  event.emplace(eventToken_, 1);
70  event.emplace(eventWithInstanceToken_, 2);
71  event.emplace(eventWithTransitionToken_, 3);
72  event.put(eventUsingTypeIDToken_, std::make_unique<IntProduct>(4));
73  }
edm::EDPutTokenT< UInt64Product > eventWithTransitionToken_
edm::EDPutTokenT< IntProduct > eventToken_
edm::EDPutTokenT< IntProduct > eventWithInstanceToken_

Member Data Documentation

◆ blToken_

edm::EDPutToken edmtest::ProducerHelperUsingCollector::blToken_
private

Definition at line 47 of file ProducerUsingCollector.cc.

Referenced by putBeginLumiProducts().

◆ brToken_

edm::EDPutTokenT<IntProduct> edmtest::ProducerHelperUsingCollector::brToken_
private

Definition at line 45 of file ProducerUsingCollector.cc.

Referenced by putBeginRunProducts().

◆ elToken_

edm::EDPutToken edmtest::ProducerHelperUsingCollector::elToken_
private

Definition at line 48 of file ProducerUsingCollector.cc.

Referenced by ProducerHelperUsingCollector(), and putEndLumiProducts().

◆ erToken_

edm::EDPutTokenT<IntProduct> edmtest::ProducerHelperUsingCollector::erToken_
private

Definition at line 46 of file ProducerUsingCollector.cc.

Referenced by ProducerHelperUsingCollector(), and putEndRunProducts().

◆ eventToken_

edm::EDPutTokenT<IntProduct> edmtest::ProducerHelperUsingCollector::eventToken_
private

Definition at line 41 of file ProducerUsingCollector.cc.

Referenced by putEventProducts().

◆ eventUsingTypeIDToken_

edm::EDPutToken edmtest::ProducerHelperUsingCollector::eventUsingTypeIDToken_
private

Definition at line 44 of file ProducerUsingCollector.cc.

Referenced by putEventProducts().

◆ eventWithInstanceToken_

edm::EDPutTokenT<IntProduct> edmtest::ProducerHelperUsingCollector::eventWithInstanceToken_
private

Definition at line 42 of file ProducerUsingCollector.cc.

Referenced by putEventProducts().

◆ eventWithTransitionToken_

edm::EDPutTokenT<UInt64Product> edmtest::ProducerHelperUsingCollector::eventWithTransitionToken_
private

Definition at line 43 of file ProducerUsingCollector.cc.

Referenced by putEventProducts().