CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TGeoFromDddService Class Reference

#include <Fireworks/Geometry/interface/TGeoFromDddService.h>

Public Member Functions

TGeoManager * getGeoManager ()
 
void postBeginRun (const edm::Run &, const edm::EventSetup &)
 
void postEndRun (const edm::Run &, const edm::EventSetup &)
 
 TGeoFromDddService (const edm::ParameterSet &, edm::ActivityRegistry &)
 
virtual ~TGeoFromDddService ()
 

Private Member Functions

TGeoManager * createManager (int level)
 
TGeoMaterial * createMaterial (const DDMaterial &iMaterial)
 
TGeoShape * createShape (const std::string &iName, const DDSolid &iSolid)
 
TGeoVolume * createVolume (const std::string &iName, const DDSolid &iSolid, const DDMaterial &iMaterial)
 
const TGeoFromDddServiceoperator= (const TGeoFromDddService &)=delete
 
 TGeoFromDddService (const TGeoFromDddService &)=delete
 

Private Attributes

const edm::EventSetupm_eventSetup
 
TGeoManager * m_geoManager
 
int m_level
 
bool m_verbose
 
std::map< std::string, TGeoMaterial * > nameToMaterial_
 
std::map< std::string, TGeoMedium * > nameToMedium_
 
std::map< std::string, TGeoShape * > nameToShape_
 
std::map< std::string, TGeoVolume * > nameToVolume_
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 48 of file TGeoFromDddService.h.

Constructor & Destructor Documentation

TGeoFromDddService::TGeoFromDddService ( const edm::ParameterSet pset,
edm::ActivityRegistry ar 
)

Definition at line 59 of file TGeoFromDddService.cc.

References postBeginRun(), postEndRun(), edm::ActivityRegistry::watchPostBeginRun(), and edm::ActivityRegistry::watchPostEndRun().

59  :
60  m_level (pset.getUntrackedParameter<int> ("level", 10)),
61  m_verbose (pset.getUntrackedParameter<bool>("verbose",false)),
62  m_eventSetup (nullptr),
63  m_geoManager (nullptr)
64 {
67 }
void watchPostBeginRun(PostBeginRun::slot_type const &iSlot)
T getUntrackedParameter(std::string const &, T const &) const
TGeoManager * m_geoManager
const edm::EventSetup * m_eventSetup
void postBeginRun(const edm::Run &, const edm::EventSetup &)
void watchPostEndRun(PostEndRun::slot_type const &iSlot)
void postEndRun(const edm::Run &, const edm::EventSetup &)
TGeoFromDddService::~TGeoFromDddService ( )
virtual

Definition at line 69 of file TGeoFromDddService.cc.

References m_geoManager.

70 {
71  if (m_geoManager)
72  {
73  delete m_geoManager;
74  }
75 }
TGeoManager * m_geoManager
TGeoFromDddService::TGeoFromDddService ( const TGeoFromDddService )
privatedelete

Member Function Documentation

TGeoManager * TGeoFromDddService::createManager ( int  level)
private

Definition at line 152 of file TGeoFromDddService.cc.

References gather_cfg::cout, createVolume(), math::GraphWalker< N, E >::current(), edm::EventSetup::get(), DDCompactView::graph(), mps_fire::i, info(), edm::ESHandleBase::isValid(), m_eventSetup, m_verbose, DDSolidShapesName::name(), nameToMaterial_, nameToMedium_, nameToShape_, nameToVolume_, and DDCompactView::root().

Referenced by getGeoManager().

153 {
154  using namespace edm;
155 
157  m_eventSetup->get<IdealGeometryRecord>().get(viewH);
158 
159  if ( ! viewH.isValid() )
160  {
161  return nullptr;
162  }
163 
164  TGeoManager *geo_mgr = new TGeoManager("cmsGeo","CMS Detector");
165  // NOTE: the default constructor does not create the identity matrix
166  if (gGeoIdentity == nullptr)
167  {
168  gGeoIdentity = new TGeoIdentity("Identity");
169  }
170 
171  std::cout << "about to initialize the DDCompactView walker" << std::endl;
172  auto walker = math::GraphWalker<DDLogicalPart, DDPosData*>( viewH->graph(), viewH->root());
173  auto info = walker.current();
174 
175  // The top most item is actually the volume holding both the
176  // geometry AND the magnetic field volumes!
177  walker.firstChild();
178 
179  TGeoVolume *top = createVolume(info.first.name().fullname(),
180  info.first.solid(),
181  info.first.material());
182  if (top == nullptr)
183  {
184 
185  return nullptr;
186  }
187 
188  geo_mgr->SetTopVolume(top);
189  // ROOT chokes unless colors are assigned
190  top->SetVisibility(kFALSE);
191  top->SetLineColor(kBlue);
192 
193  std::vector<TGeoVolume*> parentStack;
194  parentStack.push_back(top);
195 
196  if( ! walker.firstChild() ) {
197  return nullptr;
198  }
199 
200  do
201  {
202  auto info = walker.current();
203 
204  if (m_verbose)
205  {
206  for(unsigned int i=0; i<parentStack.size();++i) {
207  std::cout <<" ";
208  }
209  std::cout << info.first.name()<<" "<<info.second->copyno()<<" "
210  << DDSolidShapesName::name(info.first.solid().shape())<<std::endl;
211  }
212 
213  bool childAlreadyExists = (nullptr != nameToVolume_[info.first.name().fullname()]);
214  TGeoVolume *child = createVolume(info.first.name().fullname(),
215  info.first.solid(),
216  info.first.material());
217  if (nullptr!=child && info.second != nullptr)
218  {
219  parentStack.back()->AddNode(child,
220  info.second->copyno(),
221  createPlacement(info.second->rotation(),
222  info.second->translation()));
223  child->SetLineColor(kBlue);
224  }
225  else
226  {
227  if ( info.second == nullptr ) {
228  break;
229  }
230  }
231  if (nullptr == child || childAlreadyExists || level == int(parentStack.size()))
232  {
233  if (nullptr!=child)
234  {
235  child->SetLineColor(kRed);
236  }
237  //stop descending
238  if ( ! walker.nextSibling())
239  {
240  while (walker.parent())
241  {
242  parentStack.pop_back();
243  if (walker.nextSibling()) {
244  break;
245  }
246  }
247  }
248  }
249  else
250  {
251  if (walker.firstChild())
252  {
253  parentStack.push_back(child);
254  }
255  else
256  {
257  if ( ! walker.nextSibling())
258  {
259  while (walker.parent())
260  {
261  parentStack.pop_back();
262  if (walker.nextSibling()) {
263  break;
264  }
265  }
266  }
267  }
268  }
269  } while ( ! parentStack.empty());
270 
271  geo_mgr->CloseGeometry();
272 
273  geo_mgr->DefaultColors();
274 
275  nameToShape_.clear();
276  nameToVolume_.clear();
277  nameToMaterial_.clear();
278  nameToMedium_.clear();
279 
280  return geo_mgr;
281 }
std::map< std::string, TGeoMaterial * > nameToMaterial_
static const TGPicture * info(bool iBackgroundIsBlack)
const edm::EventSetup * m_eventSetup
TGeoVolume * createVolume(const std::string &iName, const DDSolid &iSolid, const DDMaterial &iMaterial)
std::map< std::string, TGeoVolume * > nameToVolume_
static const char *const name(DDSolidShape s)
Definition: DDSolidShapes.h:23
std::map< std::string, TGeoMedium * > nameToMedium_
const Graph & graph() const
Provides read-only access to the data structure of the compact-view.
std::map< std::string, TGeoShape * > nameToShape_
HLT enums.
T get() const
Definition: EventSetup.h:71
const DDLogicalPart & root() const
returns the DDLogicalPart representing the root of the geometrical hierarchy
bool isValid() const
Definition: ESHandle.h:44
value_type current() const
Definition: GraphWalker.h:93
TGeoMaterial * TGeoFromDddService::createMaterial ( const DDMaterial iMaterial)
private

Definition at line 579 of file TGeoFromDddService.cc.

References DDMaterial::a(), DDMaterial::constituent(), DDMaterial::density(), DDName::fullname(), g, mps_fire::i, ecalTB2006H4_GenSimDigiReco_cfg::mix, DDBase< N, C >::name(), nameToMaterial_, DDMaterial::noOfConstituents(), AlCaHLTBitMon_QueryRunRegistry::string, and DDMaterial::z().

Referenced by createVolume().

580 {
581  std::string mat_name = iMaterial.name().fullname();
582  TGeoMaterial *mat = nameToMaterial_[mat_name];
583 
584  if (mat == nullptr)
585  {
586  if (iMaterial.noOfConstituents() > 0)
587  {
588  TGeoMixture *mix = new TGeoMixture(mat_name.c_str(),
589  iMaterial.noOfConstituents(),
590  iMaterial.density()*cm3/g);
591  for (int i = 0; i < iMaterial.noOfConstituents(); ++i)
592  {
593  mix->AddElement(createMaterial(iMaterial.constituent(i).first),
594  iMaterial.constituent(i).second);
595  }
596  mat = mix;
597  }
598  else
599  {
600  mat = new TGeoMaterial(mat_name.c_str(),
601  iMaterial.a()*mole/g, iMaterial.z(),
602  iMaterial.density()*cm3/g);
603  }
604  nameToMaterial_[mat_name] = mat;
605  }
606 
607  return mat;
608 }
std::map< std::string, TGeoMaterial * > nameToMaterial_
double a() const
returns the atomic mass
Definition: DDMaterial.cc:93
const N & name() const
Definition: DDBase.h:74
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
double z() const
retruns the atomic number
Definition: DDMaterial.cc:99
const std::string fullname() const
Definition: DDName.h:43
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
Definition: DDMaterial.cc:87
double density() const
returns the density
Definition: DDMaterial.cc:104
TGeoMaterial * createMaterial(const DDMaterial &iMaterial)
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
Definition: DDMaterial.cc:82
TGeoShape * TGeoFromDddService::createShape ( const std::string &  iName,
const DDSolid iSolid 
)
private

Definition at line 284 of file TGeoFromDddService.cc.

References DDPseudoTrap::atMinusZ(), MessageLogger_cfi::cerr, popcon2dropbox::copy(), edmIntegrityCheck::d, ddbox, ddcons, ddcuttubs, ddextrudedpolygon, ddintersection, ddpolycone_rrz, ddpolyhedra_rrz, ddpseudotrap, ddsubtraction, ddtrap, ddtubs, ddunion, delta, Exception, DDName::fullname(), h, DDPseudoTrap::halfZ(), mps_fire::i, DDRotation::matrix(), DDName::name(), DDBase< N, C >::name(), nameToShape_, DDSolid::parameters(), EnergyCorrector::pt, alignCSCRings::r, DDPseudoTrap::radius(), DDBooleanSolid::rotation(), DDSolid::shape(), DDBooleanSolid::solidA(), DDBooleanSolid::solidB(), mathSSE::sqrt(), groupFilesInBlocks::temp, create_public_lumi_plots::transform, DDBooleanSolid::translation(), x, DDPseudoTrap::x1(), DDPseudoTrap::x2(), DDExtrudedPolygon::xVec(), y, DDPseudoTrap::y1(), DDPseudoTrap::y2(), DDExtrudedPolygon::yVec(), z, DDExtrudedPolygon::zscaleVec(), DDExtrudedPolygon::zVec(), DDExtrudedPolygon::zxVec(), and DDExtrudedPolygon::zyVec().

Referenced by createVolume().

286 {
287  TGeoShape* rSolid= nameToShape_[iName];
288  if (rSolid == nullptr)
289  {
290  const std::vector<double>& params = iSolid.parameters();
291  // std::cout <<" shape "<<iSolid<<std::endl;
292  switch(iSolid.shape())
293  {
294  case DDSolidShape::ddbox:
295  rSolid = new TGeoBBox(
296  iName.c_str(),
297  params[0]/cm,
298  params[1]/cm,
299  params[2]/cm);
300  break;
302  rSolid = new TGeoConeSeg(
303  iName.c_str(),
304  params[0]/cm,
305  params[1]/cm,
306  params[2]/cm,
307  params[3]/cm,
308  params[4]/cm,
309  params[5]/deg,
310  params[6]/deg+params[5]/deg
311  );
312  break;
314  //Order in params is zhalf,rIn,rOut,startPhi,deltaPhi
315  rSolid= new TGeoTubeSeg(
316  iName.c_str(),
317  params[1]/cm,
318  params[2]/cm,
319  params[0]/cm,
320  params[3]/deg,
321  params[3]/deg + params[4]/deg);
322  break;
324  //Order in params is zhalf,rIn,rOut,startPhi,deltaPhi
325  rSolid= new TGeoCtub(
326  iName.c_str(),
327  params[1]/cm,
328  params[2]/cm,
329  params[0]/cm,
330  params[3]/deg,
331  params[3]/deg + params[4]/deg,
332  params[5],params[6],params[7],
333  params[8],params[9],params[10]);
334  break;
336  rSolid =new TGeoTrap(
337  iName.c_str(),
338  params[0]/cm, //dz
339  params[1]/deg, //theta
340  params[2]/deg, //phi
341  params[3]/cm, //dy1
342  params[4]/cm, //dx1
343  params[5]/cm, //dx2
344  params[6]/deg, //alpha1
345  params[7]/cm, //dy2
346  params[8]/cm, //dx3
347  params[9]/cm, //dx4
348  params[10]/deg);//alpha2
349  break;
351  rSolid = new TGeoPcon(
352  iName.c_str(),
353  params[0]/deg,
354  params[1]/deg,
355  (params.size()-2)/3) ;
356  {
357  std::vector<double> temp(params.size()+1);
358  temp.reserve(params.size()+1);
359  temp[0]=params[0]/deg;
360  temp[1]=params[1]/deg;
361  temp[2]=(params.size()-2)/3;
362  std::copy(params.begin()+2,params.end(),temp.begin()+3);
363  for(std::vector<double>::iterator it=temp.begin()+3;
364  it != temp.end();
365  ++it) {
366  *it /=cm;
367  }
368  rSolid->SetDimensions(&(*(temp.begin())));
369  }
370  break;
372  rSolid = new TGeoPgon(
373  iName.c_str(),
374  params[1]/deg,
375  params[2]/deg,
376  static_cast<int>(params[0]),
377  (params.size()-3)/3);
378  {
379  std::vector<double> temp(params.size()+1);
380  temp[0]=params[1]/deg;
381  temp[1]=params[2]/deg;
382  temp[2]=params[0];
383  temp[3]=(params.size()-3)/3;
384  std::copy(params.begin()+3,params.end(),temp.begin()+4);
385  for(std::vector<double>::iterator it=temp.begin()+4;
386  it != temp.end();
387  ++it) {
388  *it /=cm;
389  }
390  rSolid->SetDimensions(&(*(temp.begin())));
391  }
392  break;
394  {
395  DDExtrudedPolygon extrPgon(iSolid);
396  std::vector<double> x = extrPgon.xVec();
397  std::transform(x.begin(), x.end(), x.begin(),[](double d) { return d/cm; });
398  std::vector<double> y = extrPgon.yVec();
399  std::transform(y.begin(), y.end(), y.begin(),[](double d) { return d/cm; });
400  std::vector<double> z = extrPgon.zVec();
401  std::vector<double> zx = extrPgon.zxVec();
402  std::vector<double> zy = extrPgon.zyVec();
403  std::vector<double> zscale = extrPgon.zscaleVec();
404 
405  TGeoXtru* mySolid = new TGeoXtru(z.size());
406  mySolid->DefinePolygon(x.size(), &(*x.begin()), &(*y.begin()));
407  for( size_t i = 0; i < params[0]; ++i )
408  {
409  mySolid->DefineSection( i, z[i]/cm, zx[i]/cm, zy[i]/cm, zscale[i]);
410  }
411 
412  rSolid = mySolid;
413  }
414  break;
416  {
417  //implementation taken from SimG4Core/Geometry/src/DDG4SolidConverter.cc
418  const static DDRotationMatrix s_rot(ROOT::Math::RotationX(90.*deg));
419  DDPseudoTrap pt(iSolid);
420  assert(pt.radius() < 0);
421  double x=0;
422  double r = fabs(pt.radius());
423  if( pt.atMinusZ()) {
424  x=pt.x1();
425  } else {
426  x=pt.x2();
427  }
428  double openingAngle = 2.0*asin(x/r);
429  double h=pt.y1()<pt.y2()? pt.y2() :pt.y1();
430  h+=h/20.;
431  double displacement=0;
432  double startPhi = 0;
433  double delta = sqrt((r+x)*(r-x));
434  if(pt.atMinusZ()) {
435  displacement=-pt.halfZ() - delta;
436  startPhi = 270.-openingAngle/deg/2.0;
437  }else {
438  displacement = pt.halfZ() + delta;
439  startPhi = 90. - openingAngle/deg/2.;
440  }
441  std::unique_ptr<TGeoShape> trap( new TGeoTrd2(pt.name().name().c_str(),
442  pt.x1()/cm,
443  pt.x2()/cm,
444  pt.y1()/cm,
445  pt.y2()/cm,
446  pt.halfZ()/cm) );
447  std::unique_ptr<TGeoShape> tubs( new TGeoTubeSeg(pt.name().name().c_str(),
448  0.,
449  r/cm,
450  h/cm,
451  startPhi,
452  openingAngle) );
453  TGeoSubtraction* sub = new TGeoSubtraction(trap.release(),
454  tubs.release(),
455  createPlacement(s_rot,
456  DDTranslation(0.,
457  0.,
458  displacement)));
459  rSolid = new TGeoCompositeShape(iName.c_str(),
460  sub);
461 
462 
463  break;
464  }
466  {
467  DDBooleanSolid boolSolid(iSolid);
468  if(!boolSolid) {
469  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
470  }
471 
472  std::unique_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
473  boolSolid.solidA()) );
474  std::unique_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
475  boolSolid.solidB()));
476  if( nullptr != left.get() &&
477  nullptr != right.get() ) {
478  TGeoSubtraction* sub = new TGeoSubtraction(left.release(),right.release(),
479  gGeoIdentity,
480  createPlacement(
481  boolSolid.rotation().matrix(),
482  boolSolid.translation()));
483  rSolid = new TGeoCompositeShape(iName.c_str(),
484  sub);
485  }
486  break;
487  }
489  {
490  DDBooleanSolid boolSolid(iSolid);
491  if(!boolSolid) {
492  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
493  }
494 
495  std::unique_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
496  boolSolid.solidA()) );
497  std::unique_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
498  boolSolid.solidB()));
499  //DEBUGGING
500  //break;
501  if( nullptr != left.get() &&
502  nullptr != right.get() ) {
503  TGeoUnion* boolS = new TGeoUnion(left.release(),right.release(),
504  gGeoIdentity,
505  createPlacement(
506  boolSolid.rotation().matrix(),
507  boolSolid.translation()));
508  rSolid = new TGeoCompositeShape(iName.c_str(),
509  boolS);
510  }
511  break;
512  }
514  {
515  DDBooleanSolid boolSolid(iSolid);
516  if(!boolSolid) {
517  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
518  }
519 
520  std::unique_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
521  boolSolid.solidA()) );
522  std::unique_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
523  boolSolid.solidB()));
524  if( nullptr != left.get() &&
525  nullptr != right.get() ) {
526  TGeoIntersection* boolS = new TGeoIntersection(left.release(),
527  right.release(),
528  gGeoIdentity,
529  createPlacement(
530  boolSolid.rotation().matrix(),
531  boolSolid.translation()));
532  rSolid = new TGeoCompositeShape(iName.c_str(),
533  boolS);
534  }
535  break;
536  }
537  default:
538  break;
539  }
540  nameToShape_[iName]=rSolid;
541  }
542  if (rSolid == nullptr)
543  {
544  std::cerr <<"COULD NOT MAKE "<<iName<<std::endl;
545  }
546  return rSolid;
547 }
dbl * delta
Definition: mlp_gen.cc:36
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:144
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
def copy(args, dbName)
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
T sqrt(T t)
Definition: SSEVec.h:18
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:138
std::map< std::string, TGeoShape * > nameToShape_
TGeoShape * createShape(const std::string &iName, const DDSolid &iSolid)
TGeoVolume * TGeoFromDddService::createVolume ( const std::string &  iName,
const DDSolid iSolid,
const DDMaterial iMaterial 
)
private

Definition at line 550 of file TGeoFromDddService.cc.

References createMaterial(), createShape(), DDName::fullname(), DDBase< N, C >::name(), nameToMedium_, nameToVolume_, AlCaHLTBitMon_QueryRunRegistry::string, and findQualityFiles::v.

Referenced by createManager().

553 {
554  TGeoVolume* v=nameToVolume_[iName];
555  if (v == nullptr)
556  {
557  TGeoShape* solid = createShape(iSolid.name().fullname(),
558  iSolid);
559  std::string mat_name = iMaterial.name().fullname();
560  TGeoMedium *geo_med = nameToMedium_[mat_name];
561  if (geo_med == nullptr)
562  {
563  TGeoMaterial *geo_mat = createMaterial(iMaterial);
564  geo_med = new TGeoMedium(mat_name.c_str(), 0, geo_mat);
565  nameToMedium_[mat_name] = geo_med;
566  }
567  if (solid)
568  {
569  v = new TGeoVolume(iName.c_str(),
570  solid,
571  geo_med);
572  }
573  nameToVolume_[iName] = v;
574  }
575  return v;
576 }
const N & name() const
Definition: DDBase.h:74
std::map< std::string, TGeoVolume * > nameToVolume_
const std::string fullname() const
Definition: DDName.h:43
std::map< std::string, TGeoMedium * > nameToMedium_
TGeoMaterial * createMaterial(const DDMaterial &iMaterial)
TGeoShape * createShape(const std::string &iName, const DDSolid &iSolid)
TGeoManager * TGeoFromDddService::getGeoManager ( )

Definition at line 104 of file TGeoFromDddService.cc.

References createManager(), allElectronIsolations_cfi::elements, m_eventSetup, m_geoManager, m_level, alignCSCRings::r, and lumiQTWidget::t.

105 {
106  if (m_geoManager == nullptr)
107  {
108  if (m_eventSetup == nullptr)
109  edm::LogError("TGeoFromDddService") << "getGeoManager() -- EventSetup not present.\n";
110  else
111  {
113  if (m_geoManager == nullptr)
114  edm::LogError("TGeoFromDddService") << "getGeoManager() -- creation failed.\n";
115  }
116  }
117  gGeoManager = m_geoManager;
118  return m_geoManager;
119 }
TGeoManager * m_geoManager
const edm::EventSetup * m_eventSetup
TGeoManager * createManager(int level)
const TGeoFromDddService& TGeoFromDddService::operator= ( const TGeoFromDddService )
privatedelete
void TGeoFromDddService::postBeginRun ( const edm::Run ,
const edm::EventSetup es 
)

Definition at line 82 of file TGeoFromDddService.cc.

References m_eventSetup.

Referenced by TGeoFromDddService().

83 {
84  printf("TGeoFromDddService::postBeginRun\n");
85 
86  m_eventSetup = &es;
87 }
const edm::EventSetup * m_eventSetup
void TGeoFromDddService::postEndRun ( const edm::Run ,
const edm::EventSetup  
)

Definition at line 89 of file TGeoFromDddService.cc.

References m_eventSetup.

Referenced by TGeoFromDddService().

90 {
91  printf("TGeoFromDddService::postEndRun\n");
92 
93  // Construction of geometry fails miserably on second attempt ...
94  /*
95  if (m_geoManager)
96  {
97  delete m_geoManager;
98  m_geoManager = 0;
99  }
100  */
101  m_eventSetup = nullptr;
102 }
const edm::EventSetup * m_eventSetup

Member Data Documentation

const edm::EventSetup* TGeoFromDddService::m_eventSetup
private

Definition at line 83 of file TGeoFromDddService.h.

Referenced by createManager(), getGeoManager(), postBeginRun(), and postEndRun().

TGeoManager* TGeoFromDddService::m_geoManager
private

Definition at line 84 of file TGeoFromDddService.h.

Referenced by getGeoManager(), and ~TGeoFromDddService().

int TGeoFromDddService::m_level
private

Definition at line 81 of file TGeoFromDddService.h.

Referenced by getGeoManager().

bool TGeoFromDddService::m_verbose
private

Definition at line 82 of file TGeoFromDddService.h.

Referenced by createManager().

std::map<std::string, TGeoMaterial*> TGeoFromDddService::nameToMaterial_
private

Definition at line 88 of file TGeoFromDddService.h.

Referenced by createManager(), and createMaterial().

std::map<std::string, TGeoMedium*> TGeoFromDddService::nameToMedium_
private

Definition at line 89 of file TGeoFromDddService.h.

Referenced by createManager(), and createVolume().

std::map<std::string, TGeoShape*> TGeoFromDddService::nameToShape_
private

Definition at line 86 of file TGeoFromDddService.h.

Referenced by createManager(), and createShape().

std::map<std::string, TGeoVolume*> TGeoFromDddService::nameToVolume_
private

Definition at line 87 of file TGeoFromDddService.h.

Referenced by createManager(), and createVolume().