ATLAS Offline Software
Loading...
Searching...
No Matches
AODHandleBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7// //
8// Header file for class AODHandleBase.cxx //
9// //
10// Description: Base class for AOD handles. //
11// //
12// //
14
15#ifndef AODHANDLEBASE_H
16#define AODHANDLEBASE_H
17
18//#include "GeoPrimitives/GeoPrimitives.h"
19
20#include <QStringList>
21#include <QTreeWidgetItem>
22#include <vector>
23#include <set>
24#include <QList>
25#include <QFlags>
26#include <iostream>
27
30//class IParticleCollHandleBase;
31//class TrackSysCommonData;
32
33class SoMaterial;
34class SoNode;
35
36namespace xAOD {
37 class IParticle;
38}
39
42
44public:
45
46 static int numberOfInstances();
47
49 virtual ~AODHandleBase();
50
51 const AODSysCommonData * common() const;
52
53 void setVisible(bool);
54 bool visible() const { return m_visible; }
55 const AODCollHandleBase * collHandle() const { return m_collhandle; }
57 virtual bool has3DObjects() {return false;}
59 virtual void update3DObjects();
60 virtual void rebuild3DObjects();
62 virtual void clear3DObjects()=0;
64 virtual void attach3DObjects();
66 virtual void detach3DObjects();
68 virtual SoNode* nodes()=0;
71 virtual SoMaterial * determineMaterial()=0;
72
74 void updateMaterial();
76 SoMaterial * currentMaterial() const { return m_currentmaterial; }
77
78 virtual QStringList baseInfo() const;
81 virtual QStringList clicked() const = 0;
82
83// virtual Amg::Vector3D momentum() const { return Amg::Vector3D(0,0,0); }
84
85// virtual const xAOD::IParticle& iParticle() const =0;
86
87// virtual double charge() const =0 ;//!< Returns unknown() in case of trouble.
88// virtual double mass() const;//!< Returns unknown() in case of trouble.
89
90// bool hasCharge() const { return charge()!=unknown(); }
91// bool hasMass() const { return mass()!=unknown(); }
92
93 static double unknown() { return -999.0; }
94
95 virtual QString shortInfo() const { return QString("Not yet implemented"); }
96 virtual QString type() const { return QString("Not yet implemented"); }
97
98 // Object browser code.
100 virtual void fillObjectBrowser(QList<QTreeWidgetItem *>& list);
104 QTreeWidgetItem* browserTreeItem() const ;
105
106 virtual void dumpToJSON( std::ofstream& ) const {};
107
108protected:
109
110 virtual void visibleStateChanged();
111 virtual void currentMaterialChanged() {};
112
113private:
114
115 // It is illegal to copy/assign a AODHandleBase.cxx:
118
120 class Imp;
122
123
124 //Here for inlining:
127 SoMaterial * m_currentmaterial;
128};
129
130
131#endif
Base class for all AOD object collections This class primarily handles setting up the interface,...
void updateObjectBrowser()
Update object browser QTreeWidgetItem.
virtual QString type() const
return very short word with type (maybe link with collection type?)
AODHandleBase(const AODHandleBase &)
override if need to take action in this case.
virtual void currentMaterialChanged()
static double unknown()
bool visible() const
AODHandleBase & operator=(const AODHandleBase &)
friend class AssocObjAttachmentHandle
const AODCollHandleBase * collHandle() const
SoMaterial * currentMaterial() const
Returns the current material of the handle.
void updateMaterial()
Called after some configuration related to material changes.
virtual void rebuild3DObjects()
SoMaterial * m_currentmaterial
virtual void update3DObjects()
Called after some configuration changes, or when the object is first created. Must be overloaded by c...
void setVisible(bool)
use by the collection handle.
virtual SoNode * nodes()=0
Returns the 3Dobjects.
virtual QStringList baseInfo() const
virtual void clear3DObjects()=0
Delete objects.
QTreeWidgetItem * browserTreeItem() const
Return the QTreeWidgetItem;.
virtual bool has3DObjects()
Returns true if the 3D objects have been created.
virtual QString shortInfo() const
returns mom and hit information about track
virtual void fillObjectBrowser(QList< QTreeWidgetItem * > &list)
Create and fill the object browser QTreeWidgetItem.
virtual ~AODHandleBase()
virtual void visibleStateChanged()
Dummy implementation does nothing.
static int numberOfInstances()
virtual void dumpToJSON(std::ofstream &) const
const AODSysCommonData * common() const
virtual void detach3DObjects()
Remove from the scene graph.
AODHandleBase(AODCollHandleBase *)
virtual SoMaterial * determineMaterial()=0
Should be implemented by children, in order to change the material depending on the interface etc.
virtual void attach3DObjects()
Connect to the scene graph.
virtual QStringList clicked() const =0
Called when user selects the node (stringlist is displayed in messagebox).
AODCollHandleBase * m_collhandle
Class providing the definition of the 4-vector interface.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.