CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Attributes
edm::BaseRandomtXiGunProducer Class Reference

#include <BaseRandomtXiGunProducer.h>

Inheritance diagram for edm::BaseRandomtXiGunProducer:
edm::one::EDProducer< one::WatchRuns, EndRunProducer > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper edm::RandomtXiGunProducer

Public Member Functions

 BaseRandomtXiGunProducer (const ParameterSet &)
 
void beginRun (const edm::Run &r, const edm::EventSetup &) override
 
void endRun (const edm::Run &r, const edm::EventSetup &) override
 
void endRunProduce (edm::Run &r, const edm::EventSetup &) override
 
 ~BaseRandomtXiGunProducer () override
 
- Public Member Functions inherited from edm::one::EDProducer< one::WatchRuns, EndRunProducer >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector
< edm::ProductResolverIndex >
const & 
indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector
< edm::ProductResolverIndex >
const & 
putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
bool registeredToConsumeMany (TypeID const &, 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::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Attributes

double fECMS
 
HepMC::GenEventfEvt
 
bool fFireBackward
 
bool fFireForward
 
bool fLog_t
 
double fMaxPhi
 
double fMinPhi
 
std::vector< int > fPartIDs
 
ESHandle
< HepPDT::ParticleDataTable
fPDGTable
 
double fpEnergy
 
int fVerbosity
 
const HepPDT::ParticleDataPData
 

Private Attributes

const ESGetToken
< HepPDT::ParticleDataTable,
edm::DefaultRecord
fPDGTableToken
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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< B > consumes (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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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 () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
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)
 

Detailed Description

Definition at line 26 of file BaseRandomtXiGunProducer.h.

Constructor & Destructor Documentation

BaseRandomtXiGunProducer::BaseRandomtXiGunProducer ( const ParameterSet pset)

Definition at line 31 of file BaseRandomtXiGunProducer.cc.

References Exception, fECMS, fFireBackward, fFireForward, fMaxPhi, fMinPhi, fPartIDs, fpEnergy, fVerbosity, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and edm::Service< T >::isAvailable().

32  : fPDGTableToken(esConsumes<Transition::BeginRun>()), fEvt(nullptr) {
34  if (!rng.isAvailable()) {
35  throw cms::Exception("Configuration")
36  << "The RandomNumberProducer module requires the RandomNumberGeneratorService\n"
37  "which appears to be absent. Please add that service to your configuration\n"
38  "or remove the modules that require it.";
39  }
40 
41  ParameterSet pgun_params = pset.getParameter<ParameterSet>("PGunParameters");
42 
43  // although there's the method ParameterSet::empty(),
44  // it looks like it's NOT even necessary to check if it is,
45  // before trying to extract parameters - if it is empty,
46  // the default values seem to be taken
47  fPartIDs = pgun_params.getParameter<vector<int> >("PartID");
48  fMinPhi = pgun_params.getParameter<double>("MinPhi");
49  fMaxPhi = pgun_params.getParameter<double>("MaxPhi");
50  fECMS = pgun_params.getParameter<double>("ECMS");
51  fpEnergy = fECMS / 2.0;
52 
53  fVerbosity = pset.getUntrackedParameter<int>("Verbosity", 0);
54 
55  fFireBackward = pset.getParameter<bool>("FireBackward");
56  fFireForward = pset.getParameter<bool>("FireForward");
57 
58  produces<GenRunInfoProduct, Transition::EndRun>();
59 }
T getUntrackedParameter(std::string const &, T const &) const
bool isAvailable() const
Definition: Service.h:40
const ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > fPDGTableToken
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BaseRandomtXiGunProducer::~BaseRandomtXiGunProducer ( )
override

Definition at line 61 of file BaseRandomtXiGunProducer.cc.

61 {}

Member Function Documentation

void BaseRandomtXiGunProducer::beginRun ( const edm::Run r,
const edm::EventSetup es 
)
override

Definition at line 63 of file BaseRandomtXiGunProducer.cc.

References fPDGTable, fPDGTableToken, and edm::EventSetup::getHandle().

63  {
65  return;
66 }
const ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > fPDGTableToken
ESHandle< HepPDT::ParticleDataTable > fPDGTable
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
void BaseRandomtXiGunProducer::endRun ( const edm::Run r,
const edm::EventSetup es 
)
override

Definition at line 68 of file BaseRandomtXiGunProducer.cc.

68 {}
void BaseRandomtXiGunProducer::endRunProduce ( edm::Run r,
const edm::EventSetup es 
)
override

Definition at line 69 of file BaseRandomtXiGunProducer.cc.

References edm::Run::put().

69  {
70  // just create an empty product
71  // to keep the EventContent definitions happy
72  // later on we might put the info into the run info that this is a PGun
73  run.put(std::make_unique<GenRunInfoProduct>());
74 }

Member Data Documentation

double edm::BaseRandomtXiGunProducer::fECMS
protected

Definition at line 47 of file BaseRandomtXiGunProducer.h.

Referenced by BaseRandomtXiGunProducer().

HepMC::GenEvent* edm::BaseRandomtXiGunProducer::fEvt
protected

Definition at line 50 of file BaseRandomtXiGunProducer.h.

Referenced by edm::RandomtXiGunProducer::produce().

bool edm::BaseRandomtXiGunProducer::fFireBackward
protected
bool edm::BaseRandomtXiGunProducer::fFireForward
protected
bool edm::BaseRandomtXiGunProducer::fLog_t
protected
double edm::BaseRandomtXiGunProducer::fMaxPhi
protected
double edm::BaseRandomtXiGunProducer::fMinPhi
protected
std::vector<int> edm::BaseRandomtXiGunProducer::fPartIDs
protected
ESHandle<HepPDT::ParticleDataTable> edm::BaseRandomtXiGunProducer::fPDGTable
protected

Definition at line 52 of file BaseRandomtXiGunProducer.h.

Referenced by beginRun(), and edm::RandomtXiGunProducer::produce().

const ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> edm::BaseRandomtXiGunProducer::fPDGTableToken
private

Definition at line 35 of file BaseRandomtXiGunProducer.h.

Referenced by beginRun().

double edm::BaseRandomtXiGunProducer::fpEnergy
protected
int edm::BaseRandomtXiGunProducer::fVerbosity
protected
const HepPDT::ParticleData* edm::BaseRandomtXiGunProducer::PData
protected