ATLAS Offline Software
IVP12DDetViewsSystem.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Implementation of class IVP12DDetViewsSystem //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial version: July 2007 //
12 // //
14 
17 #include <cassert>
18 
20 QWidget * IVP12DDetViewsSystem::buildController() { return 0; }
27 
28 //____________________________________________________________________
30 public:
36  bool wascreated;
37 };
38 
39 //____________________________________________________________________
40 IVP12DDetViewsSystem::IVP12DDetViewsSystem(const QString & name, const QString & information, const QString & contact_info)
41  : IVP12DSystem(name,information,contact_info), m_d(new Imp)
42 {
47 
52 
53  m_d->wasrefreshed=false;
54  m_d->wascreated=false;
55 }
56 
57 //____________________________________________________________________
59 {
60  delete m_d; m_d=0;
61 }
62 
63 //____________________________________________________________________
65 {
66  assert(!m_d->wascreated);
67  systemcreate(detstore);
68 
69  QWidget * controller = buildController();
70  if (controller)
71  registerController(controller);
72 
73  bool hasview_xy = m_d->itemcollectionPermanent_xy->isAttachedToView();
74  if (hasview_xy)
76  bool hasview_rz = m_d->itemcollectionPermanent_rz->isAttachedToView();
77  if (hasview_rz)
79 
83 
84  if (hasview_xy)
86  if (hasview_rz)
88 
89  m_d->wascreated=true;
90 }
91 
92 //____________________________________________________________________
94 {
95  assert(m_d->wascreated);
96  assert(!m_d->wasrefreshed);
97 
98  bool hasview_xy = m_d->itemcollectionEvent_xy->isAttachedToView();
99  if (hasview_xy)
101  updateGUI();
102  bool hasview_rz = m_d->itemcollectionEvent_rz->isAttachedToView();
103  if (hasview_rz)
105  updateGUI();
106 
110 
111  updateGUI();
112  if (hasview_xy)
114  updateGUI();
115  if (hasview_rz)
117 
118  m_d->wasrefreshed=true;
119 }
120 
121 //____________________________________________________________________
123 {
124  assert(m_d->wascreated);
125  assert(m_d->wasrefreshed);
126  systemerase();
129  m_d->wasrefreshed=false;
130 }
131 
132 //____________________________________________________________________
134 {
135  messageDebug("uncreate()...");
136 
137  assert(m_d->wascreated);
138  assert(!m_d->wasrefreshed);
139 
144 
149 
150  systemuncreate();
153  m_d->wascreated=false;
154 }
155 
156 //____________________________________________________________________
157 QSet<VP1GraphicsItemCollection*> IVP12DDetViewsSystem::getItemCollections_XY() const
158 {
159  QSet<VP1GraphicsItemCollection*> l;
162  return l;
163 }
164 
165 //____________________________________________________________________
166 QSet<VP1GraphicsItemCollection*> IVP12DDetViewsSystem::getItemCollections_RZ() const
167 {
168  QSet<VP1GraphicsItemCollection*> l;
171  return l;
172 }
VP1GraphicsItemCollection::isAttachedToView
bool isAttachedToView()
Definition: VP1GraphicsItemCollection.cxx:293
IVP12DDetViewsSystem::Imp::itemcollectionPermanent_xy
VP1GraphicsItemCollection * itemcollectionPermanent_xy
Definition: IVP12DDetViewsSystem.cxx:31
IVP12DSystem::registerItemCollection
void registerItemCollection(VP1GraphicsItemCollection *)
Definition: IVP12DSystem.cxx:44
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
IVP12DDetViewsSystem::getItemCollections_XY
QSet< VP1GraphicsItemCollection * > getItemCollections_XY() const
Definition: IVP12DDetViewsSystem.cxx:157
VP1GraphicsItemCollection.h
IVP12DDetViewsSystem::Imp::wasrefreshed
bool wasrefreshed
Definition: IVP12DDetViewsSystem.cxx:35
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
IVP12DDetViewsSystem::Imp
Definition: IVP12DDetViewsSystem.cxx:29
IVP12DSystem
Definition: IVP12DSystem.h:25
IVP12DDetViewsSystem::Imp::wascreated
bool wascreated
Definition: IVP12DDetViewsSystem.cxx:36
IVP12DDetViewsSystem::buildPermanentItemCollections
virtual void buildPermanentItemCollections(StoreGateSvc *detstore, VP1GraphicsItemCollection *ic_xy, VP1GraphicsItemCollection *ic_rz)
Definition: IVP12DDetViewsSystem.cxx:21
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
IVP12DDetViewsSystem::refresh
void refresh(StoreGateSvc *storegate)
Definition: IVP12DDetViewsSystem.cxx:93
IVP12DDetViewsSystem::m_d
Imp * m_d
Definition: IVP12DDetViewsSystem.h:68
IVP12DDetViewsSystem::getItemCollections_RZ
QSet< VP1GraphicsItemCollection * > getItemCollections_RZ() const
Definition: IVP12DDetViewsSystem.cxx:166
VP1GraphicsItemCollection::detachFromView
void detachFromView()
Definition: VP1GraphicsItemCollection.cxx:257
IVP12DDetViewsSystem.h
VP1GraphicsItemCollection::clear
void clear(const bool &deleteitems=true)
Definition: VP1GraphicsItemCollection.cxx:175
IVP12DDetViewsSystem::systemcreate
virtual void systemcreate(StoreGateSvc *detstore)
Definition: IVP12DDetViewsSystem.cxx:19
IVP12DDetViewsSystem::Imp::itemcollectionPermanent_rz
VP1GraphicsItemCollection * itemcollectionPermanent_rz
Definition: IVP12DDetViewsSystem.cxx:32
IVP12DDetViewsSystem::buildController
virtual QWidget * buildController()
Definition: IVP12DDetViewsSystem.cxx:20
IVP12DDetViewsSystem::uncreate
void uncreate()
Definition: IVP12DDetViewsSystem.cxx:133
VP1GraphicsItemCollection::reattachToView
void reattachToView()
Definition: VP1GraphicsItemCollection.cxx:282
IVP12DDetViewsSystem::buildEventItemCollections
virtual void buildEventItemCollections(StoreGateSvc *sg, VP1GraphicsItemCollection *ic_xy, VP1GraphicsItemCollection *ic_rz)
Definition: IVP12DDetViewsSystem.cxx:23
IVP12DDetViewsSystem::IVP12DDetViewsSystem
IVP12DDetViewsSystem(const QString &name, const QString &information, const QString &contact_info)
Definition: IVP12DDetViewsSystem.cxx:40
IVP1System::messageDebug
void messageDebug(const QString &) const
Definition: IVP1System.cxx:347
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
IVP12DDetViewsSystem::erase
void erase()
Definition: IVP12DDetViewsSystem.cxx:122
IVP12DDetViewsSystem::Imp::itemcollectionEvent_xy
VP1GraphicsItemCollection * itemcollectionEvent_xy
Definition: IVP12DDetViewsSystem.cxx:33
IVP12DDetViewsSystem::~IVP12DDetViewsSystem
virtual ~IVP12DDetViewsSystem()
Definition: IVP12DDetViewsSystem.cxx:58
IVP1System::registerController
void registerController(QWidget *)
Definition: IVP1System.cxx:224
IVP12DDetViewsSystem::Imp::itemcollectionEvent_rz
VP1GraphicsItemCollection * itemcollectionEvent_rz
Definition: IVP12DDetViewsSystem.cxx:34
IVP12DDetViewsSystem::systemuncreate
virtual void systemuncreate()
Definition: IVP12DDetViewsSystem.cxx:25
IVP1System::updateGUI
void updateGUI()
Definition: IVP1System.cxx:262
VP1GraphicsItemCollection
Definition: VP1GraphicsItemCollection.h:53
IVP12DDetViewsSystem::systemerase
virtual void systemerase()
Definition: IVP12DDetViewsSystem.cxx:26
IVP12DDetViewsSystem::create
void create(StoreGateSvc *detstore)
Definition: IVP12DDetViewsSystem.cxx:64