ATLAS Offline Software
VP1MissingEtSystem.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Implementation of class VP1MissingEtSystem //
8 // //
9 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
10 // Initial version: May 2007, rewritten July 2008 //
11 // Updated By: Giorgi Gvaberidze(ggvaberi@cern.ch) July 2010 //
13 
19 //***
21 
22 #include "VP1Base/VP1Serialise.h"
23 #include "VP1Base/VP1Deserialise.h"
24 #include <Inventor/nodes/SoSeparator.h>
25 #include <Inventor/nodes/SoSwitch.h>
26 #include <Inventor/SoPath.h>
27 
28 //____________________________________________________________________
30 public:
34  //***
36 };
37 
38 //_____________________________________________________________________________________
40 : IVP13DSystemSimple ("EtMiss",
41  "Displaying missing ET.",
42  "Thomas.Kittelmann@cern.ch, ggvaberi@cern.ch"), m_d(new Imp(this))
43 {
44 }
45 
46 //____________________________________________________________________
48 {
49  delete m_d;
50 }
51 
52 //_____________________________________________________________________________________
54 {
55  //Save present states and then clear all event data and related gui elements.
56  m_d->collWidget->clear();
57 }
58 
59 //_____________________________________________________________________________________
61 {
62  //Create collection list based on contents of event store, populate gui and apply states:
63  QList<VP1StdCollection*> cols;
65  cols << col;
67  cols << col;
69  cols << col;
70 
72 
73  //Add collections to event scenegraph:
75  root->addChild(col->collSwitch());
76 }
77 
78 //_____________________________________________________________________________________
80 {
81  //Updated: replaced to predefined controller
82  m_d->controller = new missingEtController(this);
84  return m_d->controller;
85  //m_d->collWidget = new VP1MissingEtCollWidget;
86  //return m_d->collWidget;
87 }
88 
89 //_____________________________________________________________________________________
90 void VP1MissingEtSystem::userPickedNode(SoNode*, SoPath * pickedPath)
91 {
92  //Find in which collection an object was picked and let that deal with the pick:
94  if (handle->visible()&&pickedPath->containsNode(handle->collSep())) {
95  message(handle->clicked(pickedPath));
96  return;
97  }
98  }
99  message("Error: Unknown picked node.");
100 }
101 
102 //_____________________________________________________________________________________
104 {
106  VP1Serialise serialise(1/*version*/, this);
110  serialise.warnUnsaved(controllerWidget());
111  return serialise.result();
112 }
113 
114 //_____________________________________________________________________________________
116 {
117  VP1Deserialise state(ba,this);
118  if (state.version() < 0 || state.version() > 1) {
119  message("Warning: State data in .vp1 file is in wrong format - ignoring!");
120  return;
121  }
123  IVP13DSystemSimple::restoreFromState(state.restoreByteArray());
125 
126  if (state.version() >= 1)
127  m_d->controller->restoreSettings(state.restoreByteArray());
128  state.warnUnrestored(controllerWidget());
129 }
VP1Serialise.h
VP1MissingEtTruthHandle.h
VP1Deserialise.h
VP1Serialise
Definition: VP1Serialise.h:45
VP1MissingEtSystem::userPickedNode
void userPickedNode(SoNode *pickedNode, SoPath *pickedPath)
Definition: VP1MissingEtSystem.cxx:90
IVP13DSystemSimple
Definition: IVP13DSystemSimple.h:24
RoiUtil::serialise
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
Definition: RoiSerialise.cxx:45
VP1MissingEtSystem::buildEventSceneGraph
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
Definition: VP1MissingEtSystem.cxx:60
VP1MissingEtSystem::Imp::Imp
Imp(VP1MissingEtSystem *tc)
Definition: VP1MissingEtSystem.cxx:31
VP1MissingEtSystem::buildController
QWidget * buildController()
Definition: VP1MissingEtSystem.cxx:79
VP1MissingEtSystem::~VP1MissingEtSystem
virtual ~VP1MissingEtSystem()
Definition: VP1MissingEtSystem.cxx:47
VP1MissingEtCollWidget
Definition: VP1MissingEtCollWidget.h:23
VP1MissingEtSystem::saveState
QByteArray saveState()
Definition: VP1MissingEtSystem.cxx:103
VP1MissingEtCaloHandle::createCollections
static QList< VP1StdCollection * > createCollections(IVP1System *sys)
Definition: VP1MissingEtCaloHandle.cxx:28
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
VP1MissingEtHandle
Definition: VP1MissingEtHandle.h:36
VP1MissingEtSystem
Definition: VP1MissingEtSystem.h:22
sendEI_SPB.root
root
Definition: sendEI_SPB.py:34
VP1CollectionWidget::clear
void clear(bool deleteCollections=true, bool deleteGuiElements=false)
Definition: VP1CollectionWidget.cxx:81
VP1Controller::saveSettings
QByteArray saveSettings() const
Definition: VP1Controller.cxx:405
VP1CollectionWidget::setCollections
void setCollections(QList< VP1Collection * >, bool applySavedStates=true)
Definition: VP1CollectionWidget.cxx:258
IVP1System::state
State state() const
Definition: IVP1System.cxx:129
IVP1System::saveState
virtual QByteArray saveState()
Definition: IVP1System.cxx:294
beamspotnt.cols
list cols
Definition: bin/beamspotnt.py:1114
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
VP1MissingEtHandle::createCollections
static QList< VP1StdCollection * > createCollections(IVP1System *sys)
Definition: VP1MissingEtHandle.cxx:43
VP1Controller::restoreSettings
void restoreSettings(QByteArray)
Definition: VP1Controller.cxx:387
IVP13DSystemSimple::ensureBuildController
void ensureBuildController()
Definition: IVP13DSystemSimple.cxx:90
VP1CollectionWidget::collections
QList< VP1Collection * > collections() const
Definition: VP1CollectionWidget.cxx:61
VP1Deserialise
Definition: VP1Deserialise.h:44
VP1MissingEtSystem::m_d
Imp * m_d
Definition: VP1MissingEtSystem.h:37
VP1MissingEtCollWidget.h
VP1MissingEtSystem::Imp
Definition: VP1MissingEtSystem.cxx:29
VP1MissingEtSystem::restoreFromState
void restoreFromState(QByteArray ba)
Definition: VP1MissingEtSystem.cxx:115
VP1MissingEtSystem::VP1MissingEtSystem
VP1MissingEtSystem()
Definition: VP1MissingEtSystem.cxx:39
missingEtController::collWidget
VP1CollectionWidget * collWidget() const
Definition: missingEtController.cxx:101
query_example.col
col
Definition: query_example.py:7
VP1MissingEtSystem::Imp::controller
missingEtController * controller
Definition: VP1MissingEtSystem.cxx:35
VP1MissingEtSystem.h
VP1CollectionWidget
Definition: VP1CollectionWidget.h:32
VP1MissingEtSystem::systemerase
void systemerase()
Definition: VP1MissingEtSystem.cxx:53
VP1MissingEtSystem::Imp::theclass
VP1MissingEtSystem * theclass
Definition: VP1MissingEtSystem.cxx:32
missingEtController.h
VP1MissingEtSystem::Imp::collWidget
VP1MissingEtCollWidget * collWidget
Definition: VP1MissingEtSystem.cxx:33
missingEtController
Definition: missingEtController.h:22
VP1MissingEtHandle.h
VP1StdCollection
Definition: VP1StdCollection.h:31
VP1MissingEtTruthHandle::createCollections
static QList< VP1StdCollection * > createCollections(IVP1System *sys)
Definition: VP1MissingEtTruthHandle.cxx:25
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
VP1MissingEtCaloHandle.h
IVP1System::controllerWidget
QWidget * controllerWidget()
Definition: IVP1System.cxx:202
IVP1System::restoreFromState
virtual void restoreFromState(QByteArray)
Definition: IVP1System.cxx:302