CMS 3D CMS Logo

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

#include <PrintGeomInfoAction.h>

Inheritance diagram for PrintGeomInfoAction:
SimWatcher Observer< const BeginOfJob * > Observer< const BeginOfRun * >

Public Member Functions

 PrintGeomInfoAction (edm::ParameterSet const &p)
 
 ~PrintGeomInfoAction ()
 
- Public Member Functions inherited from SimWatcher
 SimWatcher ()
 
virtual ~SimWatcher ()
 
- Public Member Functions inherited from Observer< const BeginOfJob * >
 Observer ()
 
void slotForUpdate (const BeginOfJob *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfRun * >
 Observer ()
 
void slotForUpdate (const BeginOfRun *iT)
 
virtual ~Observer ()
 

Private Member Functions

void add1touchable (G4LogicalVolume *lv, int &nTouch)
 
int countNoTouchables ()
 
void dumpG4LVLeaf (G4LogicalVolume *lv, unsigned int leafDepth, unsigned int count, std::ostream &out=std::cout)
 
void dumpG4LVList (std::ostream &out=std::cout)
 
void dumpG4LVTree (std::ostream &out=std::cout)
 
void dumpHierarchyLeafPVLV (G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
 
void dumpHierarchyTreePVLV (std::ostream &out=std::cout)
 
void dumpLV (G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
 
void dumpMaterialList (std::ostream &out=std::cout)
 
void dumpPV (G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
 
void dumpSolid (G4VSolid *sol, unsigned int leafDepth, std::ostream &out=std::cout)
 
void dumpSummary (std::ostream &out=std::cout)
 
void dumpTouch (G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
 
G4LogicalVolume * getTopLV ()
 
G4VPhysicalVolume * getTopPV ()
 
std::string spacesFromLeafDepth (unsigned int leafDepth)
 
void update (const BeginOfJob *job)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfRun *run)
 This routine will be called when the appropriate signal arrives. More...
 

Private Attributes

bool _dumpAtts
 
bool _dumpLV
 
bool _dumpLVList
 
bool _dumpLVTree
 
bool _dumpMaterial
 
bool _dumpPV
 
bool _dumpReplica
 
bool _dumpRotation
 
bool _dumpSense
 
bool _dumpSolid
 
bool _dumpSummary
 
bool _dumpTouch
 
G4NavigationHistory fHistory
 
std::string name
 
std::vector< std::string > names
 
int nchar
 
mpvpv thePVTree
 
G4VPhysicalVolume * theTopPV
 

Additional Inherited Members

Detailed Description

Definition at line 24 of file PrintGeomInfoAction.h.

Constructor & Destructor Documentation

PrintGeomInfoAction::PrintGeomInfoAction ( edm::ParameterSet const &  p)

Definition at line 34 of file PrintGeomInfoAction.cc.

References gather_cfg::cout, edm::ParameterSet::getUntrackedParameter(), i, mergeVDriftHistosByStation::name, cscdqm::h::names, and AlCaHLTBitMon_QueryRunRegistry::string.

34  {
35 
36  _dumpSummary = p.getUntrackedParameter<bool>("DumpSummary", true);
37  _dumpLVTree = p.getUntrackedParameter<bool>("DumpLVTree", true);
38  _dumpMaterial= p.getUntrackedParameter<bool>("DumpMaterial",false);
39  _dumpLVList = p.getUntrackedParameter<bool>("DumpLVList", false);
40  _dumpLV = p.getUntrackedParameter<bool>("DumpLV", false);
41  _dumpSolid = p.getUntrackedParameter<bool>("DumpSolid", false);
42  _dumpAtts = p.getUntrackedParameter<bool>("DumpAttributes", false);
43  _dumpPV = p.getUntrackedParameter<bool>("DumpPV", false);
44  _dumpRotation= p.getUntrackedParameter<bool>("DumpRotation",false);
45  _dumpReplica = p.getUntrackedParameter<bool>("DumpReplica", false);
46  _dumpTouch = p.getUntrackedParameter<bool>("DumpTouch", false);
47  _dumpSense = p.getUntrackedParameter<bool>("DumpSense", false);
48  name = p.getUntrackedParameter<std::string>("Name","*");
49  nchar = name.find("*");
50  name.assign(name,0,nchar);
51  names = p.getUntrackedParameter<std::vector<std::string> >("Names");
52  std::cout << "PrintGeomInfoAction:: initialised with verbosity levels:"
53  << " Summary " << _dumpSummary << " LVTree " << _dumpLVTree
54  << " LVList " << _dumpLVList << " Material " << _dumpMaterial
55  << "\n "
56  << " LV " << _dumpLV << " Solid " << _dumpSolid
57  << " Attribs " << _dumpAtts
58  << "\n "
59  << " PV " << _dumpPV << " Rotation " << _dumpRotation
60  << " Replica " << _dumpReplica
61  << "\n "
62  << " Touchable " << _dumpTouch << " for names (0-" << nchar
63  << ") = " << name
64  << "\n "
65  << " Sensitive " << _dumpSense << " for " << names.size()
66  << " namess";
67  for (unsigned int i=0; i<names.size(); i++) std::cout << " " << names[i];
68  std::cout << std::endl;
69 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > names
tuple cout
Definition: gather_cfg.py:121
PrintGeomInfoAction::~PrintGeomInfoAction ( )

Definition at line 71 of file PrintGeomInfoAction.cc.

71 {}

Member Function Documentation

void PrintGeomInfoAction::add1touchable ( G4LogicalVolume *  lv,
int &  nTouch 
)
private

Definition at line 203 of file PrintGeomInfoAction.cc.

References cuy::ii.

203  {
204 
205  int siz = lv->GetNoDaughters();
206  for(int ii = 0; ii < siz; ii++)
207  add1touchable(lv->GetDaughter(ii)->GetLogicalVolume(), ++nTouch);
208 }
void add1touchable(G4LogicalVolume *lv, int &nTouch)
int ii
Definition: cuy.py:588
int PrintGeomInfoAction::countNoTouchables ( )
private

Definition at line 195 of file PrintGeomInfoAction.cc.

195  {
196 
197  int nTouch = 0;
198  G4LogicalVolume * lv = getTopLV();
199  add1touchable(lv, nTouch);
200  return nTouch;
201 }
void add1touchable(G4LogicalVolume *lv, int &nTouch)
G4LogicalVolume * getTopLV()
void PrintGeomInfoAction::dumpG4LVLeaf ( G4LogicalVolume *  lv,
unsigned int  leafDepth,
unsigned int  count,
std::ostream &  out = std::cout 
)
private

Definition at line 178 of file PrintGeomInfoAction.cc.

References cuy::ii.

178  {
179 
180  for (unsigned int ii=0; ii < leafDepth; ii++) out << " ";
181  out << " LV:(" << leafDepth << ") " << lv->GetName() << " (" << count
182  << ")" << std::endl;
183  //--- If a volume is placed n types as daughter of this LV, it should only be counted once
184  std::map<G4LogicalVolume*, unsigned int> lvCount;
185  std::map<G4LogicalVolume*, unsigned int>::const_iterator cite;
186  for (int ii = 0; ii < lv->GetNoDaughters(); ii++) {
187  cite = lvCount.find(lv->GetDaughter(ii)->GetLogicalVolume());
188  if (cite != lvCount.end()) lvCount[cite->first] = (cite->second) + 1;
189  else lvCount.insert(std::pair< G4LogicalVolume*,unsigned int>(lv->GetDaughter(ii)->GetLogicalVolume(),1));
190  }
191  for (cite = lvCount.begin(); cite != lvCount.end(); cite++)
192  dumpG4LVLeaf((cite->first), leafDepth+1, (cite->second), out);
193 }
int ii
Definition: cuy.py:588
tuple out
Definition: dbtoconf.py:99
void dumpG4LVLeaf(G4LogicalVolume *lv, unsigned int leafDepth, unsigned int count, std::ostream &out=std::cout)
void PrintGeomInfoAction::dumpG4LVList ( std::ostream &  out = std::cout)
private

Definition at line 152 of file PrintGeomInfoAction.cc.

152  {
153 
154  out << " @@@@@@@@@@@@@@@@ DUMPING G4LogicalVolume's List " << std::endl;
155  const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
156  std::vector<G4LogicalVolume*>::const_iterator lvcite;
157  for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
158  out << "LV:" << (*lvcite)->GetName() << "\tMaterial: " << (*lvcite)->GetMaterial()->GetName() << std::endl;
159 }
tuple out
Definition: dbtoconf.py:99
void PrintGeomInfoAction::dumpG4LVTree ( std::ostream &  out = std::cout)
private

Definition at line 161 of file PrintGeomInfoAction.cc.

161  {
162 
163  out << " @@@@@@@@@@@@@@@@ DUMPING G4LogicalVolume's Tree " << std::endl;
164  G4LogicalVolume * lv = getTopLV();
165  dumpG4LVLeaf(lv,0,1,out);
166 }
tuple out
Definition: dbtoconf.py:99
G4LogicalVolume * getTopLV()
void dumpG4LVLeaf(G4LogicalVolume *lv, unsigned int leafDepth, unsigned int count, std::ostream &out=std::cout)
void PrintGeomInfoAction::dumpHierarchyLeafPVLV ( G4LogicalVolume *  lv,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 228 of file PrintGeomInfoAction.cc.

228  {
229 
230  //----- Dump this LV
231  dumpLV(lv, leafDepth, out);
232 
233  //----- Get LV daughters from list of PV daughters
234  mmlvpv lvpvDaughters;
235  std::set< G4LogicalVolume * > lvDaughters;
236  int NoDaughters = lv->GetNoDaughters();
237  while ((NoDaughters--)>0) {
238  G4VPhysicalVolume * pvD = lv->GetDaughter(NoDaughters);
239  lvpvDaughters.insert(mmlvpv::value_type(pvD->GetLogicalVolume(), pvD));
240  lvDaughters.insert(pvD->GetLogicalVolume());
241  }
242 
243  std::set< G4LogicalVolume * >::const_iterator scite;
244  mmlvpv::const_iterator mmcite;
245 
246  //----- Dump daughters PV and LV
247  for (scite = lvDaughters.begin(); scite != lvDaughters.end(); scite++) {
248  std::pair< mmlvpv::iterator, mmlvpv::iterator > mmER = lvpvDaughters.equal_range(*scite);
249  //----- Dump daughters PV of this LV
250  for (mmcite = mmER.first ; mmcite != mmER.second; mmcite++)
251  dumpPV((*mmcite).second, leafDepth+1, out);
252  //----- Dump daughters LV
253  dumpHierarchyLeafPVLV(*scite, leafDepth+1, out );
254  }
255 }
void dumpPV(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
std::multimap< G4LogicalVolume *, G4VPhysicalVolume *, std::less< G4LogicalVolume * > > mmlvpv
void dumpLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
Container::value_type value_type
tuple out
Definition: dbtoconf.py:99
void dumpHierarchyLeafPVLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
void PrintGeomInfoAction::dumpHierarchyTreePVLV ( std::ostream &  out = std::cout)
private

Definition at line 210 of file PrintGeomInfoAction.cc.

210  {
211 
212  //dumps in the following order:
213  // 1) a LV with details
214  // 2) list of PVs daughters of this LV with details
215  // 3) list of LVs daughters of this LV and for each go to 1)
216 
217  //----- Get top PV
218  G4LogicalVolume* topLV = getTopLV();
219 
220  //----- Dump this leaf (it will recursively dump all the tree)
221  dumpHierarchyLeafPVLV(topLV, 0, out);
222  dumpPV(theTopPV, 0, out);
223 
224  //----- Dump the touchables (it will recursively dump all the tree)
225  if (_dumpTouch) dumpTouch(theTopPV, 0, out);
226 }
void dumpPV(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
G4VPhysicalVolume * theTopPV
tuple out
Definition: dbtoconf.py:99
void dumpHierarchyLeafPVLV(G4LogicalVolume *lv, unsigned int leafDepth, std::ostream &out=std::cout)
G4LogicalVolume * getTopLV()
void dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
void PrintGeomInfoAction::dumpLV ( G4LogicalVolume *  lv,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 257 of file PrintGeomInfoAction.cc.

References dbtoconf::out, and AlCaHLTBitMon_QueryRunRegistry::string.

257  {
258 
259  std::string spaces = spacesFromLeafDepth(leafDepth);
260 
261  //----- dump name
262  if (_dumpLV) {
263  out << leafDepth << spaces << "$$$ VOLUME = " << lv->GetName()
264  << " Solid: " << lv->GetSolid()->GetName() << " MATERIAL: "
265  << lv->GetMaterial()->GetName() << std::endl;
266  if (_dumpSolid)
267  dumpSolid(lv->GetSolid(), leafDepth, out); //----- dump solid
268 
269  //----- dump LV info
270  //--- material
271  if (_dumpAtts) {
272  //--- Visualisation attributes
273  const G4VisAttributes * fVA = lv->GetVisAttributes();
274  if (fVA!=0) {
275  out << spaces << " VISUALISATION ATTRIBUTES: " << std::endl;
276  out << spaces << " IsVisible " << fVA->IsVisible() << std::endl;
277  out << spaces << " IsDaughtersInvisible " << fVA->IsDaughtersInvisible() << std::endl;
278  out << spaces << " Colour " << fVA->GetColour() << std::endl;
279  out << spaces << " LineStyle " << fVA->GetLineStyle() << std::endl;
280  out << spaces << " LineWidth " << fVA->GetLineWidth() << std::endl;
281  out << spaces << " IsForceDrawingStyle " << fVA->IsForceDrawingStyle() << std::endl;
282  out << spaces << " ForcedDrawingStyle " << fVA->GetForcedDrawingStyle() << std::endl;
283  }
284 
285  //--- User Limits
286  G4UserLimits * fUL = lv->GetUserLimits();
287  G4Track dummy;
288  if (fUL!=0) {
289  out << spaces << " MaxAllowedStep " << fUL->GetMaxAllowedStep(dummy) << std::endl;
290  out << spaces << " UserMaxTrackLength " << fUL->GetUserMaxTrackLength(dummy) << std::endl;
291  out << spaces << " UserMaxTime " << fUL->GetUserMaxTime(dummy) << std::endl;
292  out << spaces << " UserMinEkine " << fUL->GetUserMinEkine(dummy) << std::endl;
293  out << spaces << " UserMinRange " << fUL->GetUserMinRange(dummy) << std::endl;
294  }
295 
296  //--- other LV info
297  if (lv->GetSensitiveDetector())
298  out << spaces << " IS SENSITIVE DETECTOR " << std::endl;
299  if (lv->GetFieldManager())
300  out << spaces << " FIELD ON " << std::endl;
301 
302  // Pointer (possibly NULL) to optimisation info objects.
303  out << spaces
304  << " Quality for optimisation, average number of voxels to be spent per content "
305  << lv->GetSmartless() << std::endl;
306 
307  // Pointer (possibly NULL) to G4FastSimulationManager object.
308  if (lv->GetFastSimulationManager())
309  out << spaces << " Logical Volume is an envelope for a FastSimulationManager "
310  << std::endl;
311  out << spaces << " Weight used in the event biasing technique = "
312  << lv->GetBiasWeight() << std::endl;
313  }
314  }
315 }
void dumpSolid(G4VSolid *sol, unsigned int leafDepth, std::ostream &out=std::cout)
std::string spacesFromLeafDepth(unsigned int leafDepth)
tuple out
Definition: dbtoconf.py:99
void PrintGeomInfoAction::dumpMaterialList ( std::ostream &  out = std::cout)
private

Definition at line 168 of file PrintGeomInfoAction.cc.

168  {
169 
170  out << " @@@@@@@@@@@@@@@@ DUMPING G4Material List ";
171  const G4MaterialTable * matTab = G4Material::GetMaterialTable();
172  out << " with " << matTab->size() << " materials " << std::endl;
173  std::vector<G4Material*>::const_iterator matite;
174  for (matite = matTab->begin(); matite != matTab->end(); matite++)
175  out << "Material: " << (*matite) << std::endl;
176 }
tuple out
Definition: dbtoconf.py:99
void PrintGeomInfoAction::dumpPV ( G4VPhysicalVolume *  pv,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 317 of file PrintGeomInfoAction.cc.

References HLT_25ns14e33_v1_cff::offset, AlCaHLTBitMon_QueryRunRegistry::string, and create_public_lumi_plots::width.

317  {
318 
319  std::string spaces = spacesFromLeafDepth(leafDepth);
320 
321  //----- PV info
322  if (_dumpPV) {
323  std::string mother = "World";
324  if (pv->GetMotherLogical()) mother = pv->GetMotherLogical()->GetName();
325  out << leafDepth << spaces << "### VOLUME = " << pv->GetName()
326  << " Copy No " << pv->GetCopyNo() << " in " << mother
327  << " at " << pv->GetTranslation();
328  }
329  if (!pv->IsReplicated()) {
330  if (_dumpPV) {
331  if(pv->GetRotation() == 0) out << " with no rotation" << std::endl;
332  else if(!_dumpRotation) out << " with rotation" << std::endl; //just rotation name
333  else out << " with rotation " << *(pv->GetRotation()) << std::endl;
334  }
335  } else {
336  if (_dumpReplica ) {
337  out << spaces << " It is replica: " << std::endl;
338  EAxis axis;
339  int nReplicas;
340  double width;
341  double offset;
342  bool consuming;
343  pv->GetReplicationData(axis, nReplicas, width, offset, consuming);
344  out << spaces << " axis " << axis << std::endl
345  << spaces << " nReplicas " << nReplicas << std::endl;
346  if (pv->GetParameterisation() != 0)
347  out << spaces << " It is parameterisation " << std::endl;
348  else
349  out << spaces << " width " << width << std::endl
350  << spaces << " offset " << offset << std::endl
351  << spaces << " consuming" << consuming << std::endl;
352  if (pv->GetParameterisation() != 0)
353  out << spaces << " It is parameterisation " << std::endl;
354  }
355  }
356 }
std::string spacesFromLeafDepth(unsigned int leafDepth)
tuple out
Definition: dbtoconf.py:99
void PrintGeomInfoAction::dumpSolid ( G4VSolid *  sol,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 395 of file PrintGeomInfoAction.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

395  {
396 
397  std::string spaces = spacesFromLeafDepth(leafDepth);
398  out << spaces << *(sol) << std::endl;
399 }
std::string spacesFromLeafDepth(unsigned int leafDepth)
tuple out
Definition: dbtoconf.py:99
void PrintGeomInfoAction::dumpSummary ( std::ostream &  out = std::cout)
private

Definition at line 128 of file PrintGeomInfoAction.cc.

128  {
129 
130  //---------- Dump number of objects of each class
131  out << " @@@@@@@@@@@@@@@@@@ Dumping G4 geometry objects Summary " << std::endl;
132  if (theTopPV == 0) {
133  out << " No volume created " << std::endl;
134  return;
135  }
136  out << " @@@ Geometry built inside world volume: " << theTopPV->GetName() << std::endl;
137  // Get number of solids (< # LV if several LV share a solid)
138  const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance();
139  std::vector<G4LogicalVolume *>::const_iterator lvcite;
140  std::set<G4VSolid *> theSolids;
141  for (lvcite = lvs->begin(); lvcite != lvs->end(); lvcite++)
142  theSolids.insert((*lvcite)->GetSolid());
143  out << " Number of G4VSolid's: " << theSolids.size() << std::endl;
144  out << " Number of G4LogicalVolume's: " << lvs->size() << std::endl;
145  const G4PhysicalVolumeStore * pvs = G4PhysicalVolumeStore::GetInstance();
146  out << " Number of G4VPhysicalVolume's: " << pvs->size() << std::endl;
147  out << " Number of Touchable's: " << countNoTouchables() << std::endl;
148  const G4MaterialTable * matTab = G4Material::GetMaterialTable();
149  out << " Number of G4Material's: " << matTab->size() << std::endl;
150 }
G4VPhysicalVolume * theTopPV
tuple out
Definition: dbtoconf.py:99
void PrintGeomInfoAction::dumpTouch ( G4VPhysicalVolume *  pv,
unsigned int  leafDepth,
std::ostream &  out = std::cout 
)
private

Definition at line 358 of file PrintGeomInfoAction.cc.

References mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

358  {
359 
360  std::string spaces = spacesFromLeafDepth(leafDepth);
361  if (leafDepth == 0) fHistory.SetFirstEntry(pv);
362  else fHistory.NewLevel(pv, kNormal, pv->GetCopyNo());
363 
364  G4ThreeVector globalpoint = fHistory.GetTopTransform().Inverse().TransformPoint(G4ThreeVector(0,0,0));
365  G4LogicalVolume * lv = pv->GetLogicalVolume();
366 
367  std::string mother = "World";
368  if (pv->GetMotherLogical()) mother = pv->GetMotherLogical()->GetName();
369  std::string lvname = lv->GetName();
370  lvname.assign(lvname,0,nchar);
371  if (lvname == name)
372  out << leafDepth << spaces << "### VOLUME = " << lv->GetName()
373  << " Copy No " << pv->GetCopyNo() << " in " << mother
374  << " global position of centre " << globalpoint << " (r = "
375  << globalpoint.perp() << ", phi = " << globalpoint.phi()/deg
376  << ")" << std::endl;
377 
378  int NoDaughters = lv->GetNoDaughters();
379  while ((NoDaughters--)>0) {
380  G4VPhysicalVolume * pvD = lv->GetDaughter(NoDaughters);
381  if (!pvD->IsReplicated()) dumpTouch(pvD, leafDepth+1, out);
382  }
383 
384  if (leafDepth > 0) fHistory.BackLevel();
385 }
G4NavigationHistory fHistory
std::string spacesFromLeafDepth(unsigned int leafDepth)
tuple out
Definition: dbtoconf.py:99
void dumpTouch(G4VPhysicalVolume *pv, unsigned int leafDepth, std::ostream &out=std::cout)
G4LogicalVolume * PrintGeomInfoAction::getTopLV ( )
private

Definition at line 406 of file PrintGeomInfoAction.cc.

406  {
407  return theTopPV->GetLogicalVolume();
408 }
G4VPhysicalVolume * theTopPV
G4VPhysicalVolume * PrintGeomInfoAction::getTopPV ( )
private

Definition at line 401 of file PrintGeomInfoAction.cc.

401  {
402 
403  return G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
404 }
std::string PrintGeomInfoAction::spacesFromLeafDepth ( unsigned int  leafDepth)
private

Definition at line 387 of file PrintGeomInfoAction.cc.

References cuy::ii, and AlCaHLTBitMon_QueryRunRegistry::string.

387  {
388 
389  std::string spaces;
390  unsigned int ii;
391  for(ii = 0; ii < leafDepth; ii++) { spaces += " "; }
392  return spaces;
393 }
int ii
Definition: cuy.py:588
void PrintGeomInfoAction::update ( const BeginOfJob )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

Definition at line 73 of file PrintGeomInfoAction.cc.

References DDFilteredView::addFilter(), filterCSVwithJSON::copy, DDFilteredView::copyNumbers(), gather_cfg::cout, DDSpecificsFilter::equals, alcazmumu_cfi::filter, DDFilteredView::firstChild(), i, relval_steps::k, create_public_lumi_plots::log, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), cscdqm::h::names, DDFilteredView::next(), sd, DDSpecificsFilter::setCriteria(), AlCaHLTBitMon_QueryRunRegistry::string, and DDFilteredView::translation().

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

73  {
74 
75  if (_dumpSense) {
77  (*job)()->get<IdealGeometryRecord>().get(pDD);
78 
79  std::cout << "PrintGeomInfoAction::Get Printout of Sensitive Volumes "
80  << "for " << names.size() << " Readout Units" << std::endl;
81  for (unsigned int i=0; i<names.size(); i++) {
82  std::string attribute = "ReadOutName";
83  std::string sd = names[i];
85  DDValue ddv(attribute,sd,0);
87  DDFilteredView fv(*pDD);
88  std::cout << "PrintGeomInfoAction:: Get Filtered view for "
89  << attribute << " = " << sd << std::endl;
90  fv.addFilter(filter);
91  bool dodet = fv.firstChild();
92 
93  std::string spaces = spacesFromLeafDepth(1);
94 
95  while (dodet) {
96  const DDLogicalPart & log = fv.logicalPart();
97  std::string lvname = log.name().name();
98  DDTranslation tran = fv.translation();
99  std::vector<int> copy = fv.copyNumbers();
100 
101  unsigned int leafDepth = copy.size();
102  std::cout << leafDepth << spaces << "### VOLUME = " << lvname
103  << " Copy No";
104  for (int k=leafDepth-1; k>=0; k--) std::cout << " " << copy[k];
105  std::cout << " Centre at " << tran << " (r = " << tran.Rho()
106  << ", phi = " << tran.phi()/deg << ")" << std::endl;
107  dodet = fv.next();
108  }
109  }
110  }
111 }
int i
Definition: DBlmapReader.cc:9
const N & name() const
Definition: DDBase.h:82
std::vector< std::string > names
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
std::string spacesFromLeafDepth(unsigned int leafDepth)
double sd
void setCriteria(const DDValue &nameVal, comp_op, log_op l=AND, bool asString=true, bool merged=true)
Definition: DDFilter.cc:285
tuple cout
Definition: gather_cfg.py:121
const std::string & name() const
Returns the name.
Definition: DDName.cc:87
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.
Definition: DDFilter.h:37
void PrintGeomInfoAction::update ( const BeginOfRun )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 113 of file PrintGeomInfoAction.cc.

References gather_cfg::cout.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), relval_steps.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

113  {
114 
115  theTopPV = getTopPV();
116 
119 
120  //---------- Dump list of objects of each class with detail of parameters
123 
124  //---------- Dump LV and PV information
126 }
void dumpMaterialList(std::ostream &out=std::cout)
void dumpSummary(std::ostream &out=std::cout)
G4VPhysicalVolume * theTopPV
void dumpHierarchyTreePVLV(std::ostream &out=std::cout)
void dumpG4LVTree(std::ostream &out=std::cout)
G4VPhysicalVolume * getTopPV()
void dumpG4LVList(std::ostream &out=std::cout)
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

bool PrintGeomInfoAction::_dumpAtts
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpLV
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpLVList
private

Definition at line 51 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpLVTree
private

Definition at line 51 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpMaterial
private

Definition at line 52 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpPV
private

Definition at line 54 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpReplica
private

Definition at line 54 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpRotation
private

Definition at line 54 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpSense
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpSolid
private

Definition at line 53 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpSummary
private

Definition at line 51 of file PrintGeomInfoAction.h.

bool PrintGeomInfoAction::_dumpTouch
private

Definition at line 54 of file PrintGeomInfoAction.h.

G4NavigationHistory PrintGeomInfoAction::fHistory
private

Definition at line 60 of file PrintGeomInfoAction.h.

std::string PrintGeomInfoAction::name
private
std::vector<std::string> PrintGeomInfoAction::names
private

Definition at line 57 of file PrintGeomInfoAction.h.

int PrintGeomInfoAction::nchar
private

Definition at line 56 of file PrintGeomInfoAction.h.

mpvpv PrintGeomInfoAction::thePVTree
private

Definition at line 58 of file PrintGeomInfoAction.h.

G4VPhysicalVolume* PrintGeomInfoAction::theTopPV
private

Definition at line 59 of file PrintGeomInfoAction.h.