CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
PHGCalParametersDBBuilder Class Reference
Inheritance diagram for PHGCalParametersDBBuilder:
edm::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &) override
 
void beginRun (edm::Run const &iEvent, edm::EventSetup const &) override
 
void endRun (edm::Run const &iEvent, edm::EventSetup const &) override
 
 PHGCalParametersDBBuilder (const edm::ParameterSet &iConfig)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () 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
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void swapParameters (HGCalParameters *, PHGCalParameters *)
 

Private Attributes

std::string m_name
 
std::string m_namec
 
std::string m_namet
 
std::string m_namew
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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<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)
 

Detailed Description

Definition at line 13 of file PHGCalParametersDBBuilder.cc.

Constructor & Destructor Documentation

PHGCalParametersDBBuilder::PHGCalParametersDBBuilder ( const edm::ParameterSet iConfig)
inline

Member Function Documentation

void PHGCalParametersDBBuilder::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &   
)
inlineoverridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 26 of file PHGCalParametersDBBuilder.cc.

26 {}
void PHGCalParametersDBBuilder::beginRun ( edm::Run const &  iEvent,
edm::EventSetup const &   
)
override

Definition at line 39 of file PHGCalParametersDBBuilder.cc.

References cond::service::PoolDBOutputService::beginOfTime(), HGCalParametersFromDD::build(), cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::endOfTime(), edm::EventSetup::get(), edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), m_name, m_namec, m_namet, m_namew, and swapParameters().

Referenced by PHGCalParametersDBBuilder().

40 {
43  if( !mydbservice.isAvailable())
44  {
45  edm::LogError( "PHGCalParametersDBBuilder" ) << "PoolDBOutputService unavailable";
46  return;
47  }
49  es.get<IdealGeometryRecord>().get( cpv );
50 
52  HGCalParametersFromDD builder;
53  builder.build( &(*cpv), *ptp, m_name, m_namew, m_namec, m_namet );
54  swapParameters( ptp, phgp );
55 
56  delete ptp;
57 
58  if( mydbservice->isNewTagRequest( "PHGCalParametersRcd" ))
59  {
60  mydbservice->createNewIOV<PHGCalParameters>( phgp, mydbservice->beginOfTime(), mydbservice->endOfTime(), "PHGCalParametersRcd" );
61  } else
62  {
63  edm::LogError( "PHGCalParametersDBBuilder" ) << "PHGCalParameters and PHGCalParametersRcd Tag already present";
64  }
65 }
bool build(const DDCompactView *, HGCalParameters &, const std::string &, const std::string &, const std::string &, const std::string &)
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:40
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
void swapParameters(HGCalParameters *, PHGCalParameters *)
void PHGCalParametersDBBuilder::endRun ( edm::Run const &  iEvent,
edm::EventSetup const &   
)
inlineoverride

Definition at line 27 of file PHGCalParametersDBBuilder.cc.

References swapParameters().

27 {}
void PHGCalParametersDBBuilder::swapParameters ( HGCalParameters ptp,
PHGCalParameters phgp 
)
private

Definition at line 68 of file PHGCalParametersDBBuilder.cc.

References PHGCalParameters::boundR_, HGCalParameters::boundR_, PHGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseX_, PHGCalParameters::cellCoarseY_, HGCalParameters::cellCoarseY_, PHGCalParameters::cellFactor_, HGCalParameters::cellFactor_, PHGCalParameters::cellFineX_, HGCalParameters::cellFineX_, PHGCalParameters::cellFineY_, HGCalParameters::cellFineY_, PHGCalParameters::cellSize_, HGCalParameters::cellSize_, DEFINE_FWK_MODULE, PHGCalParameters::depth_, HGCalParameters::depth_, PHGCalParameters::depthIndex_, HGCalParameters::depthIndex_, PHGCalParameters::depthLayerF_, HGCalParameters::depthLayerF_, PHGCalParameters::layer_, HGCalParameters::layer_, PHGCalParameters::layerGroup_, HGCalParameters::layerGroup_, PHGCalParameters::layerGroupM_, HGCalParameters::layerGroupM_, PHGCalParameters::layerGroupO_, HGCalParameters::layerGroupO_, PHGCalParameters::layerIndex_, HGCalParameters::layerIndex_, PHGCalParameters::mode_, HGCalParameters::mode_, PHGCalParameters::moduleAlphaR_, HGCalParameters::moduleAlphaR_, PHGCalParameters::moduleAlphaS_, HGCalParameters::moduleAlphaS_, PHGCalParameters::moduleBlR_, HGCalParameters::moduleBlR_, PHGCalParameters::moduleBlS_, HGCalParameters::moduleBlS_, PHGCalParameters::moduleCellR_, HGCalParameters::moduleCellR_, PHGCalParameters::moduleCellS_, HGCalParameters::moduleCellS_, PHGCalParameters::moduleDzR_, HGCalParameters::moduleDzR_, PHGCalParameters::moduleDzS_, HGCalParameters::moduleDzS_, PHGCalParameters::moduleHR_, HGCalParameters::moduleHR_, PHGCalParameters::moduleHS_, HGCalParameters::moduleHS_, PHGCalParameters::moduleLayR_, HGCalParameters::moduleLayR_, PHGCalParameters::moduleLayS_, HGCalParameters::moduleLayS_, PHGCalParameters::moduleTlR_, HGCalParameters::moduleTlR_, PHGCalParameters::moduleTlS_, HGCalParameters::moduleTlS_, PHGCalParameters::name_, HGCalParameters::name_, HGCalParameters::nCells_, PHGCalParameters::nCells_, HGCalParameters::nSectors_, PHGCalParameters::nSectors_, PHGCalParameters::rMaxLayHex_, HGCalParameters::rMaxLayHex_, PHGCalParameters::rMinLayHex_, HGCalParameters::rMinLayHex_, PHGCalParameters::slopeMin_, HGCalParameters::slopeMin_, PHGCalParameters::trformIndex_, HGCalParameters::trformIndex_, PHGCalParameters::trformRotXX_, HGCalParameters::trformRotXX_, PHGCalParameters::trformRotXY_, HGCalParameters::trformRotXY_, PHGCalParameters::trformRotXZ_, HGCalParameters::trformRotXZ_, PHGCalParameters::trformRotYX_, HGCalParameters::trformRotYX_, PHGCalParameters::trformRotYY_, HGCalParameters::trformRotYY_, PHGCalParameters::trformRotYZ_, HGCalParameters::trformRotYZ_, PHGCalParameters::trformRotZX_, HGCalParameters::trformRotZX_, PHGCalParameters::trformRotZY_, HGCalParameters::trformRotZY_, PHGCalParameters::trformRotZZ_, HGCalParameters::trformRotZZ_, PHGCalParameters::trformTranX_, HGCalParameters::trformTranX_, PHGCalParameters::trformTranY_, HGCalParameters::trformTranY_, PHGCalParameters::trformTranZ_, HGCalParameters::trformTranZ_, PHGCalParameters::waferCopy_, HGCalParameters::waferCopy_, PHGCalParameters::waferPosX_, HGCalParameters::waferPosX_, PHGCalParameters::waferPosY_, HGCalParameters::waferPosY_, PHGCalParameters::waferR_, HGCalParameters::waferR_, PHGCalParameters::waferTypeL_, HGCalParameters::waferTypeL_, PHGCalParameters::waferTypeT_, HGCalParameters::waferTypeT_, PHGCalParameters::zLayerHex_, and HGCalParameters::zLayerHex_.

Referenced by beginRun(), and endRun().

69 {
70  phgp->name_ = ptp->name_;
71  phgp->cellSize_.swap( ptp->cellSize_ );
72  phgp->moduleBlS_.swap( ptp->moduleBlS_ );
73  phgp->moduleTlS_.swap( ptp->moduleTlS_ );
74  phgp->moduleHS_.swap( ptp->moduleHS_ );
75  phgp->moduleDzS_.swap( ptp->moduleDzS_ );
76  phgp->moduleAlphaS_.swap( ptp->moduleAlphaS_ );
77  phgp->moduleCellS_.swap( ptp->moduleCellS_ );
78  phgp->moduleBlR_.swap( ptp->moduleBlR_ );
79  phgp->moduleTlR_.swap( ptp->moduleTlR_ );
80  phgp->moduleHR_.swap( ptp->moduleHR_ );
81  phgp->moduleDzR_.swap( ptp->moduleDzR_ );
82  phgp->moduleAlphaR_.swap( ptp->moduleAlphaR_ );
83  phgp->moduleCellR_.swap( ptp->moduleCellR_ );
84  phgp->trformTranX_.swap( ptp->trformTranX_ );
85  phgp->trformTranY_.swap( ptp->trformTranY_ );
86  phgp->trformTranZ_.swap( ptp->trformTranZ_ );
87  phgp->trformRotXX_.swap( ptp->trformRotXX_ );
88  phgp->trformRotYX_.swap( ptp->trformRotYX_ );
89  phgp->trformRotZX_.swap( ptp->trformRotZX_ );
90  phgp->trformRotXY_.swap( ptp->trformRotXY_ );
91  phgp->trformRotYY_.swap( ptp->trformRotYY_ );
92  phgp->trformRotZY_.swap( ptp->trformRotZY_ );
93  phgp->trformRotXZ_.swap( ptp->trformRotXZ_ );
94  phgp->trformRotYZ_.swap( ptp->trformRotYZ_ );
95  phgp->trformRotZZ_.swap( ptp->trformRotZZ_ );
96  phgp->zLayerHex_.swap( ptp->zLayerHex_ );
97  phgp->rMinLayHex_.swap( ptp->rMinLayHex_ );
98  phgp->rMaxLayHex_.swap( ptp->rMaxLayHex_ );
99  phgp->waferPosX_.swap( ptp->waferPosX_ );
100  phgp->waferPosY_.swap( ptp->waferPosY_ );
101  phgp->cellFineX_.swap( ptp->cellFineX_ );
102  phgp->cellFineY_.swap( ptp->cellFineY_ );
103  phgp->cellCoarseX_.swap( ptp->cellCoarseX_ );
104  phgp->cellCoarseY_.swap( ptp->cellCoarseY_ );
105  phgp->boundR_.swap( ptp->boundR_ );
106  phgp->moduleLayS_.swap( ptp->moduleLayS_ );
107  phgp->moduleLayR_.swap( ptp->moduleLayR_ );
108  phgp->layer_.swap( ptp->layer_ );
109  phgp->layerIndex_.swap( ptp->layerIndex_ );
110  phgp->layerGroup_.swap( ptp->layerGroup_ );
111  phgp->cellFactor_.swap( ptp->cellFactor_ );
112  phgp->depth_.swap( ptp->depth_ );
113  phgp->depthIndex_.swap( ptp->depthIndex_ );
114  phgp->depthLayerF_.swap( ptp->depthLayerF_ );
115  phgp->waferCopy_.swap( ptp->waferCopy_ );
116  phgp->waferTypeL_.swap( ptp->waferTypeL_ );
117  phgp->waferTypeT_.swap( ptp->waferTypeT_ );
118  phgp->layerGroupM_.swap( ptp->layerGroupM_ );
119  phgp->layerGroupO_.swap( ptp->layerGroupO_ );
120  phgp->trformIndex_.swap( ptp->trformIndex_ );
121  phgp->slopeMin_.swap( ptp->slopeMin_ );
122  phgp->waferR_ = ptp->waferR_;
123  phgp->nCells_ = ptp->nCells_;
124  phgp->nSectors_ = ptp->nSectors_;
125  phgp->mode_ = ptp->mode_;
126 }
std::vector< double > waferPosY_
std::vector< int > layer_
std::vector< double > moduleDzR_
std::vector< int > depthLayerF_
std::vector< uint32_t > trformIndex_
std::vector< int > depthLayerF_
std::vector< int > depth_
std::vector< double > moduleCellR_
std::vector< double > moduleHR_
std::vector< int > waferTypeT_
std::vector< double > trformRotXX_
std::vector< double > trformRotYY_
std::vector< double > trformRotXY_
std::vector< int > layerGroupO_
std::vector< double > cellCoarseY_
std::vector< int > moduleLayS_
std::vector< int > moduleLayR_
std::vector< double > trformRotZZ_
std::vector< int > depth_
std::vector< double > trformRotYZ_
std::vector< double > moduleHS_
std::vector< double > moduleTlR_
std::vector< double > trformTranY_
std::vector< int > waferTypeL_
std::vector< double > slopeMin_
std::vector< double > cellFineY_
std::vector< double > cellFineX_
std::vector< double > trformRotZY_
std::vector< double > moduleAlphaS_
std::vector< uint32_t > trformIndex_
std::vector< int > layerGroupM_
HGCalGeometryMode::GeometryMode mode_
std::vector< double > waferPosY_
std::vector< int > cellFactor_
std::vector< double > trformRotXX_
std::vector< double > trformRotZX_
std::vector< double > trformRotYX_
std::vector< double > cellCoarseX_
std::vector< double > trformTranY_
std::vector< double > trformRotYZ_
std::vector< double > trformRotZY_
std::vector< double > rMaxLayHex_
std::vector< double > boundR_
std::vector< int > layerGroup_
std::vector< double > cellSize_
std::vector< double > moduleAlphaR_
std::vector< double > moduleDzS_
std::vector< int > layerIndex_
std::vector< double > moduleAlphaR_
std::vector< double > trformRotZX_
std::vector< double > waferPosX_
std::vector< int > layer_
std::vector< double > trformRotXY_
std::vector< double > trformRotYX_
std::vector< int > waferCopy_
std::vector< double > moduleDzS_
std::vector< int > moduleLayR_
std::vector< int > depthIndex_
std::vector< double > moduleBlR_
std::vector< int > layerIndex_
std::vector< double > rMinLayHex_
std::vector< double > moduleHS_
std::vector< double > moduleTlS_
std::vector< double > zLayerHex_
std::vector< double > rMaxLayHex_
std::vector< double > trformTranX_
std::vector< double > slopeMin_
std::vector< double > boundR_
std::vector< double > cellFineY_
std::vector< double > trformRotXZ_
std::vector< int > layerGroup_
std::vector< double > moduleCellR_
std::vector< double > moduleCellS_
std::vector< double > moduleHR_
std::vector< double > trformRotYY_
std::vector< double > cellFineX_
std::vector< int > layerGroupM_
std::vector< double > trformRotZZ_
std::vector< double > moduleTlS_
std::vector< double > moduleBlS_
std::vector< double > moduleAlphaS_
std::vector< int > layerGroupO_
std::vector< double > rMinLayHex_
std::vector< double > trformTranX_
std::vector< double > moduleBlS_
std::vector< int > cellFactor_
std::vector< int > waferCopy_
std::vector< double > moduleCellS_
std::vector< int > depthIndex_
std::vector< int > waferTypeT_
std::vector< double > cellCoarseY_
std::vector< int > moduleLayS_
std::vector< double > trformTranZ_
std::vector< double > moduleBlR_
std::vector< double > cellCoarseX_
std::vector< double > trformTranZ_
std::vector< double > waferPosX_
std::vector< double > trformRotXZ_
std::vector< double > moduleTlR_
std::vector< double > cellSize_
std::vector< int > waferTypeL_
std::vector< double > zLayerHex_
std::string name_
std::vector< double > moduleDzR_

Member Data Documentation

std::string PHGCalParametersDBBuilder::m_name
private

Definition at line 32 of file PHGCalParametersDBBuilder.cc.

Referenced by beginRun(), and PHGCalParametersDBBuilder().

std::string PHGCalParametersDBBuilder::m_namec
private

Definition at line 34 of file PHGCalParametersDBBuilder.cc.

Referenced by beginRun(), and PHGCalParametersDBBuilder().

std::string PHGCalParametersDBBuilder::m_namet
private

Definition at line 35 of file PHGCalParametersDBBuilder.cc.

Referenced by beginRun(), and PHGCalParametersDBBuilder().

std::string PHGCalParametersDBBuilder::m_namew
private

Definition at line 33 of file PHGCalParametersDBBuilder.cc.

Referenced by beginRun(), and PHGCalParametersDBBuilder().