CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
PGeometricDetExtraBuilder Class Reference

#include <PGeometricDetExtraBuilder.h>

Inheritance diagram for PGeometricDetExtraBuilder:
edm::EDAnalyzer

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 ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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.

29 {
30 }
PGeometricDetExtraBuilder::~PGeometricDetExtraBuilder ( )

Definition at line 32 of file PGeometricDetExtraBuilder.cc.

33 {
34 }

Member Function Documentation

virtual void PGeometricDetExtraBuilder::analyze ( const edm::Event ,
const edm::EventSetup  
)
inlinevirtual

Implements edm::EDAnalyzer.

Definition at line 20 of file PGeometricDetExtraBuilder.h.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 37 of file PGeometricDetExtraBuilder.cc.

References cond::service::PoolDBOutputService::beginOfTime(), cond::service::PoolDBOutputService::createNewIOV(), cond::service::PoolDBOutputService::endOfTime(), edm::EventSetup::get(), edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), and putOne().

38 {
41  if( !mydbservice.isAvailable() ){
42  edm::LogError("PGeometricDetExtraBuilder")<<"PoolDBOutputService unavailable";
43  return;
44  }
47  es.get<IdealGeometryRecord>().get( cpvH );
48  es.get<IdealGeometryRecord>().get( gdeH );
49  const std::vector<GeometricDetExtra>& gdes = (*gdeH);
50 
51  std::vector<GeometricDetExtra>::const_iterator git = gdes.begin();
52  std::vector<GeometricDetExtra>::const_iterator egit = gdes.end();
53 
54  for (; git!= egit; ++git) { // one level below "tracker"
55  putOne(*git, pgde);
56  }
57  if ( mydbservice->isNewTagRequest("PGeometricDetExtraRcd") ) {
58  mydbservice->createNewIOV<PGeometricDetExtra>( pgde,mydbservice->beginOfTime(),mydbservice->endOfTime(),"PGeometricDetExtraRcd");
59  } else {
60  edm::LogError("PGeometricDetExtraBuilder")<<"PGeometricDetExtra and PGeometricDetExtraRcd Tag already present";
61  }
62 }
void putOne(const GeometricDetExtra &gde, PGeometricDetExtra *pgde)
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:47
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
virtual void PGeometricDetExtraBuilder::endJob ( void  )
inlinevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 21 of file PGeometricDetExtraBuilder.h.

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

Definition at line 64 of file PGeometricDetExtraBuilder.cc.

References PGeometricDetExtra::Item::_copy, PGeometricDetExtra::Item::_density, PGeometricDetExtra::Item::_geographicalId, PGeometricDetExtra::Item::_material, PGeometricDetExtra::Item::_volume, PGeometricDetExtra::Item::_weight, GeometricDetExtra::copyno(), GeometricDetExtra::density(), GeometricDetExtra::geographicalId(), GeometricDetExtra::material(), PGeometricDetExtra::pgdes_, GeometricDetExtra::volume(), and GeometricDetExtra::weight().

Referenced by beginRun().

64  {
66  item._geographicalId = gde.geographicalId();
67  item._volume = gde.volume();
68  item._density = gde.density();
69  item._weight = gde.weight();
70  item._copy = gde.copyno();
71  item._material = gde.material();
72  pgde->pgdes_.push_back ( item );
73 }
std::string const & material() const
std::vector< Item > pgdes_
double weight() const
double density() const
DetId geographicalId() const
double volume() const