CMS 3D CMS Logo

Public Member Functions

PGeometricDetExtraBuilder Class Reference

#include <PGeometricDetExtraBuilder.h>

Inheritance diagram for PGeometricDetExtraBuilder:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginRun (const edm::Run &, edm::EventSetup const &)
virtual void endJob ()
 PGeometricDetExtraBuilder (const edm::ParameterSet &iConfig)
void putOne (const GeometricDetExtra &gde, PGeometricDetExtra *pgde)
 ~PGeometricDetExtraBuilder ()

Detailed Description

Definition at line 14 of file PGeometricDetExtraBuilder.h.


Constructor & Destructor Documentation

PGeometricDetExtraBuilder::PGeometricDetExtraBuilder ( const edm::ParameterSet iConfig) [explicit]

Definition at line 28 of file PGeometricDetExtraBuilder.cc.

{
}
PGeometricDetExtraBuilder::~PGeometricDetExtraBuilder ( )

Definition at line 32 of file PGeometricDetExtraBuilder.cc.

{
}

Member Function Documentation

virtual void PGeometricDetExtraBuilder::analyze ( const edm::Event ,
const edm::EventSetup  
) [inline, virtual]

Implements edm::EDAnalyzer.

Definition at line 20 of file PGeometricDetExtraBuilder.h.

{}
void PGeometricDetExtraBuilder::beginRun ( const edm::Run ,
edm::EventSetup const &  es 
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 37 of file PGeometricDetExtraBuilder.cc.

References edm::EventSetup::get(), edm::Service< T >::isAvailable(), and putOne().

{
  PGeometricDetExtra* pgde = new PGeometricDetExtra;
  edm::Service<cond::service::PoolDBOutputService> mydbservice;
  if( !mydbservice.isAvailable() ){
    edm::LogError("PGeometricDetExtraBuilder")<<"PoolDBOutputService unavailable";
    return;
  }
  edm::ESTransientHandle<DDCompactView> cpvH;
  edm::ESHandle<std::vector<GeometricDetExtra> > gdeH;
  es.get<IdealGeometryRecord>().get( cpvH );
  es.get<IdealGeometryRecord>().get( gdeH );
  const std::vector<GeometricDetExtra>& gdes = (*gdeH);

  std::vector<GeometricDetExtra>::const_iterator git = gdes.begin();
  std::vector<GeometricDetExtra>::const_iterator egit = gdes.end();

  for (; git!= egit; ++git) {  // one level below "tracker"
    putOne(*git, pgde);
  }
  if ( mydbservice->isNewTagRequest("PGeometricDetExtraRcd") ) {
    mydbservice->createNewIOV<PGeometricDetExtra>( pgde,mydbservice->beginOfTime(),mydbservice->endOfTime(),"PGeometricDetExtraRcd");
  } else {
    edm::LogError("PGeometricDetExtraBuilder")<<"PGeometricDetExtra and PGeometricDetExtraRcd Tag already present";
  }
}
virtual void PGeometricDetExtraBuilder::endJob ( void  ) [inline, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 21 of file PGeometricDetExtraBuilder.h.

{};
void PGeometricDetExtraBuilder::putOne ( const GeometricDetExtra gde,
PGeometricDetExtra pgde 
)