ATLAS Offline Software
VP1RawDataCommonData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Implementation of class VP1RawDataCommonData //
9 // //
10 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11 // Initial version: January 2009 //
12 // //
14 
19 #include "VP1Base/IVP13DSystem.h"
20 #include <map>
22 #include <Inventor/nodes/SoGroup.h>
23 
24 //____________________________________________________________________
26 public:
27  std::map<SoTransform*,VP1RawDataHandleBase*> transform2handle;
28  static void setShowVolumeOutlines(SoGroup*nodegroup,bool showvol);
29  bool showVolOutlines = false;
30 };
31 
32 
33 
34 //____________________________________________________________________
36  : VP1HelperClassBase(sys,"VP1RawDataCommonData"),
37  m_controller(controller), m_system(sys),
38  m_nodeManager(new HitsSoNodeManager(sys)), m_d(new Imp)
39 {
42  connect(controller,SIGNAL(showVolumeOutLinesChanged(bool)),
43  this,SLOT(setShowVolumeOutLines(bool)));
44 }
45 
46 //____________________________________________________________________
48 {
49  delete m_nodeManager;
50  delete m_d;
51 }
52 
53 //____________________________________________________________________
55 {
56  if (t&&h) {
58  }
59 }
60 
61 //____________________________________________________________________
63 {
64  m_d->transform2handle.clear();
65 }
66 
67 //____________________________________________________________________
69 {
70  if (!t)
71  return 0;
73  return it==m_d->transform2handle.end() ? 0 : it->second;
74 }
75 
76 //_____________________________________________________________________________________
77 void VP1RawDataCommonData::Imp::setShowVolumeOutlines(SoGroup*nodegroup,bool showvol)
78 {
79  for (int i = 0; i<nodegroup->getNumChildren();++i) {
80  SoNode * n = nodegroup->getChild(i);
81  if (n->getTypeId().isDerivedFrom(SoGenericBox::getClassTypeId())) {
82  if (static_cast<SoGenericBox*>(n)->drawEdgeLines.getValue()!=showvol)
83  static_cast<SoGenericBox*>(n)->drawEdgeLines.setValue(showvol);
84  } else if (n->getTypeId().isDerivedFrom(SoGroup::getClassTypeId())) {
85  setShowVolumeOutlines(static_cast<SoGroup*>(n),showvol);
86  }
87  }
88 }
89 
90 //_____________________________________________________________________________________
92 {
94 }
95 
96 //_____________________________________________________________________________________
98 {
99  if (m_d->showVolOutlines==b)
100  return;
101  m_d->showVolOutlines = b;
103  for (it=m_d->transform2handle.begin();it!=itE;++it)
104  it->second->updateShownOutlines();
105 }
106 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1RawDataCommonData::setShowVolumeOutLines
void setShowVolumeOutLines(bool)
Definition: VP1RawDataCommonData.cxx:97
HitsSoNodeManager.h
VP1RawDataCommonData::Imp
Definition: VP1RawDataCommonData.cxx:25
VP1RawDataHandleBase
Definition: VP1RawDataHandleBase.h:34
VP1RawDataCommonData::getHandle
VP1RawDataHandleBase * getHandle(SoTransform *)
Definition: VP1RawDataCommonData.cxx:68
VP1RawDataCommonData::VP1RawDataCommonData
VP1RawDataCommonData(IVP13DSystem *sys, VP1RawDataSysController *)
Definition: VP1RawDataCommonData.cxx:35
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
VP1RawDataCommonData::Imp::setShowVolumeOutlines
static void setShowVolumeOutlines(SoGroup *nodegroup, bool showvol)
Definition: VP1RawDataCommonData.cxx:77
skel.it
it
Definition: skel.GENtoEVGEN.py:396
VP1RawDataSysController
Definition: VP1RawDataSysController.h:24
VP1RawDataSysController::showVolumeOutLines
bool showVolumeOutLines() const
Definition: VP1RawDataSysController.cxx:221
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
VP1RawDataCommonData::registerTransformAndHandle
void registerTransformAndHandle(SoTransform *, VP1RawDataHandleBase *)
Definition: VP1RawDataCommonData.cxx:54
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
TruthTest.itE
itE
Definition: TruthTest.py:25
SoGenericBox::initClass
static void initClass()
Definition: SoGenericBox.cxx:62
VP1RawDataCommonData::~VP1RawDataCommonData
virtual ~VP1RawDataCommonData()
Definition: VP1RawDataCommonData.cxx:47
lumiFormat.i
int i
Definition: lumiFormat.py:85
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
beamspotman.n
n
Definition: beamspotman.py:731
VP1RawDataSysController.h
extractSporadic.h
list h
Definition: extractSporadic.py:97
VP1RawDataCommonData::updateVolumeOutlines
void updateVolumeOutlines(SoGroup *)
Definition: VP1RawDataCommonData.cxx:91
IVP13DSystem.h
VP1RawDataCommonData::m_nodeManager
HitsSoNodeManager * m_nodeManager
Definition: VP1RawDataCommonData.h:57
VP1RawDataCommonData::Imp::showVolOutlines
bool showVolOutlines
Definition: VP1RawDataCommonData.cxx:29
VP1HelperClassBase
Definition: VP1HelperClassBase.h:28
VP1RawDataCommonData.h
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VP1RawDataCommonData::controller
VP1RawDataSysController * controller()
Definition: VP1RawDataCommonData.h:40
VP1RawDataCommonData::m_d
Imp * m_d
Definition: VP1RawDataCommonData.h:59
h
VP1RawDataCommonData::Imp::transform2handle
std::map< SoTransform *, VP1RawDataHandleBase * > transform2handle
Definition: VP1RawDataCommonData.cxx:27
IVP13DSystem
Definition: IVP13DSystem.h:31
HitsSoNodeManager
Definition: HitsSoNodeManager.h:17
SoGenericBox
Definition: SoGenericBox.h:26
VP1RawDataCommonData::clearEventData
void clearEventData()
Definition: VP1RawDataCommonData.cxx:62
VP1RawDataHandleBase.h
SoGenericBox.h