CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PHcalParametersDBBuilder.cc
Go to the documentation of this file.
2 
10 
11 void
13 {
16  if( !mydbservice.isAvailable())
17  {
18  edm::LogError( "PHcalParametersDBBuilder" ) << "PoolDBOutputService unavailable";
19  return;
20  }
22  es.get<IdealGeometryRecord>().get( cpv );
23 
24  HcalParametersFromDD builder;
25  builder.build( &(*cpv), *php );
26 
27  if( mydbservice->isNewTagRequest( "PHcalParametersRcd" ))
28  {
29  mydbservice->createNewIOV<PHcalParameters>( php, mydbservice->beginOfTime(), mydbservice->endOfTime(), "PHcalParametersRcd" );
30  } else
31  {
32  edm::LogError( "PHcalParametersDBBuilder" ) << "PHcalParameters and PHcalParametersRcd Tag already present";
33  }
34 }
bool build(const DDCompactView *, PHcalParameters &)
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)
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
const T & get() const
Definition: EventSetup.h:55
Definition: Run.h:41