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
 
- Public Member Functions inherited from edm::one::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
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void swapParameters (HGCalParameters *, PHGCalParameters *)
 

Private Attributes

std::string m_name
 
std::string m_namec
 
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 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 25 of file PHGCalParametersDBBuilder.cc.

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

Definition at line 37 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_namew, and swapParameters().

Referenced by PHGCalParametersDBBuilder().

38 {
41  if( !mydbservice.isAvailable())
42  {
43  edm::LogError( "PHGCalParametersDBBuilder" ) << "PoolDBOutputService unavailable";
44  return;
45  }
47  es.get<IdealGeometryRecord>().get( cpv );
48 
50  HGCalParametersFromDD builder;
51  builder.build( &(*cpv), *ptp, m_name, m_namew, m_namec );
52  swapParameters( ptp, phgp );
53 
54  delete ptp;
55 
56  if( mydbservice->isNewTagRequest( "PHGCalParametersRcd" ))
57  {
58  mydbservice->createNewIOV<PHGCalParameters>( phgp, mydbservice->beginOfTime(), mydbservice->endOfTime(), "PHGCalParametersRcd" );
59  } else
60  {
61  edm::LogError( "PHGCalParametersDBBuilder" ) << "PHGCalParameters and PHGCalParametersRcd Tag already present";
62  }
63 }
bool build(const DDCompactView *, HGCalParameters &, const std::string &, const std::string &, const std::string &)
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:46
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 26 of file PHGCalParametersDBBuilder.cc.

References swapParameters().

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

Definition at line 66 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::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().

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

Referenced by beginRun(), and PHGCalParametersDBBuilder().

std::string PHGCalParametersDBBuilder::m_namec
private

Definition at line 33 of file PHGCalParametersDBBuilder.cc.

Referenced by beginRun(), and PHGCalParametersDBBuilder().

std::string PHGCalParametersDBBuilder::m_namew
private

Definition at line 32 of file PHGCalParametersDBBuilder.cc.

Referenced by beginRun(), and PHGCalParametersDBBuilder().