CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
BeamProfile2DBWriter Class Reference

#include <CondTools/BeamSpot/plugins/BeamProfile2DBWriter.cc>

Inheritance diagram for BeamProfile2DBWriter:
edm::global::EDAnalyzer<> edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 BeamProfile2DBWriter (const edm::ParameterSet &)
 
 ~BeamProfile2DBWriter () override=default
 
- Public Member Functions inherited from edm::global::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () 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::global::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (edm::StreamID, const edm::Event &, const edm::EventSetup &) const override
 
void endJob () override
 

Private Attributes

SimBeamSpotObjects beamSpot_
 
const std::string recordName_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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)
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 39 of file BeamProfile2DBWriter.cc.

Constructor & Destructor Documentation

◆ BeamProfile2DBWriter()

BeamProfile2DBWriter::BeamProfile2DBWriter ( const edm::ParameterSet iConfig)
explicit

Definition at line 58 of file BeamProfile2DBWriter.cc.

References beamSpot_, edm::ParameterSet::getParameter(), SimBeamSpotObjects::setAlpha(), SimBeamSpotObjects::setBetaStar(), SimBeamSpotObjects::setEmittance(), SimBeamSpotObjects::setPhi(), SimBeamSpotObjects::setSigmaZ(), SimBeamSpotObjects::setTimeOffset(), SimBeamSpotObjects::setX(), SimBeamSpotObjects::setY(), and SimBeamSpotObjects::setZ().

59  : recordName_(iConfig.getParameter<std::string>("recordName")) {
60  beamSpot_.setX(iConfig.getParameter<double>("X0"));
61  beamSpot_.setY(iConfig.getParameter<double>("Y0"));
62  beamSpot_.setZ(iConfig.getParameter<double>("Z0"));
63  beamSpot_.setSigmaZ(iConfig.getParameter<double>("SigmaZ"));
64  beamSpot_.setAlpha(iConfig.getParameter<double>("Alpha"));
65  beamSpot_.setPhi(iConfig.getParameter<double>("Phi"));
66  beamSpot_.setBetaStar(iConfig.getParameter<double>("BetaStar"));
67  beamSpot_.setEmittance(iConfig.getParameter<double>("Emittance"));
68  beamSpot_.setTimeOffset(iConfig.getParameter<double>("TimeOffset"));
69 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void setPhi(double val)
set Phi, Alpha and TimeOffset
void setZ(double val)
void setY(double val)
void setAlpha(double val)
void setBetaStar(double val)
set BetaStar and Emittance
void setSigmaZ(double val)
set sigmaZ
void setEmittance(double val)
SimBeamSpotObjects beamSpot_
const std::string recordName_
void setTimeOffset(double val)
void setX(double val)
set X, Y, Z positions

◆ ~BeamProfile2DBWriter()

BeamProfile2DBWriter::~BeamProfile2DBWriter ( )
overridedefault

Member Function Documentation

◆ analyze()

void BeamProfile2DBWriter::analyze ( edm::StreamID  ,
const edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overrideprivatevirtual

Implements edm::global::EDAnalyzerBase.

Definition at line 76 of file BeamProfile2DBWriter.cc.

76 {}

◆ endJob()

void BeamProfile2DBWriter::endJob ( void  )
overrideprivatevirtual

◆ fillDescriptions()

void BeamProfile2DBWriter::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 85 of file BeamProfile2DBWriter.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

85  {
86  //The following says we do not know what parameters are allowed so do no validation
87  // Please change this to state exactly what you do use, even if it is no parameters
89  desc.add<std::string>("recordName", "SimBeamSpotObjectsRcd")
90  ->setComment("name of the record to use for the PoolDBOutputService");
91  desc.add<double>("X0")->setComment("in cm");
92  desc.add<double>("Y0")->setComment("in cm");
93  desc.add<double>("Z0")->setComment("in cm");
94  desc.add<double>("SigmaZ")->setComment("in cm");
95  desc.add<double>("BetaStar")->setComment("in cm");
96  desc.add<double>("Emittance")->setComment("in cm");
97  desc.add<double>("Alpha", 0.0)->setComment("in radians");
98  desc.add<double>("Phi", 0.0)->setComment("in radians");
99  desc.add<double>("TimeOffset", 0.0)->setComment("in ns");
100  descriptions.addWithDefaultLabel(desc);
101 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ beamSpot_

SimBeamSpotObjects BeamProfile2DBWriter::beamSpot_
private

Definition at line 52 of file BeamProfile2DBWriter.cc.

Referenced by BeamProfile2DBWriter(), and endJob().

◆ recordName_

const std::string BeamProfile2DBWriter::recordName_
private

Definition at line 51 of file BeamProfile2DBWriter.cc.

Referenced by endJob().