| [233] | 1 | #ifndef G4Lab_HitsCollectionAccessor_h
|
|---|
| 2 | #define G4Lab_HitsCollectionAccessor_h
|
|---|
| 3 |
|
|---|
| 4 | // Inheritance :
|
|---|
| 5 | #include <OnX/Inventor/InventorAccessor.h>
|
|---|
| 6 |
|
|---|
| 7 | #include <G4Transform3D.hh>
|
|---|
| 8 |
|
|---|
| 9 | class G4VHitsCollection;
|
|---|
| 10 | class G4VHit;
|
|---|
| 11 | class G4LogicalVolume;
|
|---|
| 12 | class G4Colour;
|
|---|
| [288] | 13 | class G4RunManager;
|
|---|
| [233] | 14 |
|
|---|
| 15 | namespace Slash {namespace Core {class ISession;}}
|
|---|
| 16 | namespace Slash {namespace Core {class IWriter;}}
|
|---|
| 17 |
|
|---|
| 18 | #include <map>
|
|---|
| 19 | #include <G4AttDef.hh>
|
|---|
| 20 | #include <G4String.hh>
|
|---|
| 21 |
|
|---|
| 22 | namespace G4Lab {
|
|---|
| 23 |
|
|---|
| 24 | class HitsCollectionAccessor : public OnX::InventorAccessor {
|
|---|
| 25 | public: //Slash::Data::IAccessor
|
|---|
| 26 | virtual std::string name() const;
|
|---|
| 27 | virtual Slash::Data::IIterator* iterator();
|
|---|
| 28 | virtual Slash::Core::IValue* findValue(Slash::Data::IAccessor::Data,const std::string&,void*);
|
|---|
| 29 | public: //Slash::Data::IVisualizer
|
|---|
| 30 | virtual void beginVisualize();
|
|---|
| 31 | virtual void visualize(Slash::Data::IAccessor::Data,void*);
|
|---|
| 32 | public:
|
|---|
| [288] | 33 | HitsCollectionAccessor(Slash::Core::ISession&,G4RunManager*,
|
|---|
| 34 | const std::string& = "");
|
|---|
| [233] | 35 | virtual ~HitsCollectionAccessor();
|
|---|
| 36 | const std::string& HCName() const;
|
|---|
| 37 | protected:
|
|---|
| 38 | static G4LogicalVolume* hitLogicalVolume(const G4VHit&);
|
|---|
| 39 | static G4Transform3D* hitTransform3D(const G4VHit&);
|
|---|
| 40 | static bool hitColor(const G4VHit&,G4Colour&);
|
|---|
| [288] | 41 | protected:
|
|---|
| 42 | G4VHitsCollection* getCollection(Slash::Core::IWriter&,const std::string&);
|
|---|
| [233] | 43 | private:
|
|---|
| 44 | std::string fType;
|
|---|
| [288] | 45 | G4RunManager* fRunManager;
|
|---|
| [233] | 46 | std::map<G4String,G4AttDef>* fAttDefs;
|
|---|
| 47 | std::string fHC;
|
|---|
| 48 | };
|
|---|
| 49 |
|
|---|
| 50 | }
|
|---|
| 51 |
|
|---|
| 52 | #endif
|
|---|