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::setMeanX(), SimBeamSpotObjects::setMeanY(), SimBeamSpotObjects::setMeanZ(), SimBeamSpotObjects::setPhi(), SimBeamSpotObjects::setSigmaX(), SimBeamSpotObjects::setSigmaY(), 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_.setMeanX(iConfig.getParameter<double>("MeanX"));
64  beamSpot_.setMeanY(iConfig.getParameter<double>("MeanY"));
65  beamSpot_.setMeanZ(iConfig.getParameter<double>("MeanZ"));
66  beamSpot_.setSigmaX(iConfig.getParameter<double>("SigmaX"));
67  beamSpot_.setSigmaY(iConfig.getParameter<double>("SigmaY"));
68  beamSpot_.setSigmaZ(iConfig.getParameter<double>("SigmaZ"));
69  beamSpot_.setAlpha(iConfig.getParameter<double>("Alpha"));
70  beamSpot_.setPhi(iConfig.getParameter<double>("Phi"));
71  beamSpot_.setBetaStar(iConfig.getParameter<double>("BetaStar"));
72  beamSpot_.setEmittance(iConfig.getParameter<double>("Emittance"));
73  beamSpot_.setTimeOffset(iConfig.getParameter<double>("TimeOffset"));
74 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
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)
void setMeanZ(double val)
void setEmittance(double val)
SimBeamSpotObjects beamSpot_
const std::string recordName_
void setSigmaY(double val)
void setMeanX(double val)
set meanX, meanY, meanZ
void setTimeOffset(double val)
void setSigmaX(double val)
set sigmaX, sigmaY, sigmaZ
void setX(double val)
set X, Y, Z positions
void setMeanY(double val)

◆ ~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 81 of file BeamProfile2DBWriter.cc.

81 {}

◆ endJob()

void BeamProfile2DBWriter::endJob ( void  )
overrideprivatevirtual

◆ fillDescriptions()

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

Definition at line 90 of file BeamProfile2DBWriter.cc.

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

90  {
91  //The following says we do not know what parameters are allowed so do no validation
92  // Please change this to state exactly what you do use, even if it is no parameters
94  desc.add<std::string>("recordName", "SimBeamSpotObjectsRcd")
95  ->setComment("name of the record to use for the PoolDBOutputService");
96  desc.add<double>("X0", 0.0)->setComment("in cm");
97  desc.add<double>("Y0", 0.0)->setComment("in cm");
98  desc.add<double>("Z0", 0.0)->setComment("in cm");
99  desc.add<double>("MeanX", 0.0)->setComment("in cm");
100  desc.add<double>("MeanY", 0.0)->setComment("in cm");
101  desc.add<double>("MeanZ", 0.0)->setComment("in cm");
102  desc.add<double>("SigmaX", -1.0)->setComment("in cm");
103  desc.add<double>("SigmaY", -1.0)->setComment("in cm");
104  desc.add<double>("SigmaZ", 0.0)->setComment("in cm");
105  desc.add<double>("BetaStar", 0.0)->setComment("in cm");
106  desc.add<double>("Emittance", 0.0)->setComment("in cm");
107  desc.add<double>("Alpha", 0.0)->setComment("in radians");
108  desc.add<double>("Phi", 0.0)->setComment("in radians");
109  desc.add<double>("TimeOffset", 0.0)->setComment("in ns");
110  descriptions.addWithDefaultLabel(desc);
111 }
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().