Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
cheprep::DefaultHepRepFactory Class Reference

#include <DefaultHepRepFactory.h>

+ Inheritance diagram for cheprep::DefaultHepRepFactory:

Public Member Functions

 DefaultHepRepFactory ()
 
 ~DefaultHepRepFactory ()
 
HEPREP::HepRepReadercreateHepRepReader (std::istream *in)
 
HEPREP::HepRepReadercreateHepRepReader (std::string filename)
 
HEPREP::HepRepWritercreateHepRepWriter (std::ostream *out, bool randomAccess, bool compress)
 
HEPREP::HepRepPointcreateHepRepPoint (HEPREP::HepRepInstance *instance, double x, double y, double z)
 
HEPREP::HepRepInstancecreateHepRepInstance (HEPREP::HepRepInstance *parent, HEPREP::HepRepType *type)
 
HEPREP::HepRepInstancecreateHepRepInstance (HEPREP::HepRepInstanceTree *parent, HEPREP::HepRepType *type)
 
HEPREP::HepRepTreeIDcreateHepRepTreeID (std::string name, std::string version, std::string qualifier="top-level")
 
HEPREP::HepRepActioncreateHepRepAction (std::string name, std::string expression)
 
HEPREP::HepRepInstanceTreecreateHepRepInstanceTree (std::string name, std::string version, HEPREP::HepRepTreeID *typeTreeID)
 
HEPREP::HepRepTypecreateHepRepType (HEPREP::HepRepType *parent, std::string name)
 
HEPREP::HepRepTypecreateHepRepType (HEPREP::HepRepTypeTree *parent, std::string name)
 
HEPREP::HepRepTypeTreecreateHepRepTypeTree (HEPREP::HepRepTreeID *treeID)
 
HEPREP::HepRepcreateHepRep ()
 
- Public Member Functions inherited from HEPREP::HepRepFactory
virtual ~HepRepFactory ()
 Destructor.
 
virtual HepRepReadercreateHepRepReader (std::istream *in)=0
 
virtual HepRepReadercreateHepRepReader (std::string inputFileName)=0
 
virtual HepRepWritercreateHepRepWriter (std::ostream *out, bool randomAccess, bool compress)=0
 
virtual HepRepPointcreateHepRepPoint (HepRepInstance *instance, double x, double y, double z)=0
 
virtual HepRepInstancecreateHepRepInstance (HepRepInstance *parent, HepRepType *type)=0
 
virtual HepRepInstancecreateHepRepInstance (HepRepInstanceTree *parent, HepRepType *type)=0
 
virtual HepRepTreeIDcreateHepRepTreeID (std::string name, std::string version, std::string qualifier="top-level")=0
 
virtual HepRepActioncreateHepRepAction (std::string name, std::string expression)=0
 
virtual HepRepInstanceTreecreateHepRepInstanceTree (std::string name, std::string version, HepRepTreeID *typeTree)=0
 
virtual HepRepTypecreateHepRepType (HepRepTypeTree *parent, std::string name)=0
 
virtual HepRepTypecreateHepRepType (HepRepType *parent, std::string name)=0
 
virtual HepRepTypeTreecreateHepRepTypeTree (HepRepTreeID *treeID)=0
 
virtual HepRepcreateHepRep ()=0
 

Detailed Description

Definition at line 27 of file DefaultHepRepFactory.h.

Constructor & Destructor Documentation

◆ DefaultHepRepFactory()

cheprep::DefaultHepRepFactory::DefaultHepRepFactory ( )

Definition at line 25 of file DefaultHepRepFactory.cc.

25 {
26}

◆ ~DefaultHepRepFactory()

cheprep::DefaultHepRepFactory::~DefaultHepRepFactory ( )

Definition at line 28 of file DefaultHepRepFactory.cc.

28 {
29}

Member Function Documentation

◆ createHepRep()

HepRep * cheprep::DefaultHepRepFactory::createHepRep ( )
virtual

Creates a HepRep.

Implements HEPREP::HepRepFactory.

Definition at line 84 of file DefaultHepRepFactory.cc.

84 {
85 return new DefaultHepRep();
86}

◆ createHepRepAction()

HepRepAction * cheprep::DefaultHepRepFactory::createHepRepAction ( std::string  name,
std::string  expression 
)
virtual

Creates a HepRepAction.

Parameters
nameof the action.
expressionof the action.

Implements HEPREP::HepRepFactory.

Definition at line 63 of file DefaultHepRepFactory.cc.

63 {
64 return new DefaultHepRepAction(name, expression);
65}

◆ createHepRepInstance() [1/2]

HepRepInstance * cheprep::DefaultHepRepFactory::createHepRepInstance ( HEPREP::HepRepInstance parent,
HEPREP::HepRepType type 
)
virtual

Creates a HepRepInstance.

@parent to add the instance to. @type type the associated type.

Implements HEPREP::HepRepFactory.

Definition at line 51 of file DefaultHepRepFactory.cc.

51 {
52 return new DefaultHepRepInstance(parent, type);
53}

◆ createHepRepInstance() [2/2]

HepRepInstance * cheprep::DefaultHepRepFactory::createHepRepInstance ( HEPREP::HepRepInstanceTree parent,
HEPREP::HepRepType type 
)
virtual

Creates a HepRepInstance.

@parent to add the instance to. @type type the associated type.

Implements HEPREP::HepRepFactory.

Definition at line 55 of file DefaultHepRepFactory.cc.

55 {
56 return new DefaultHepRepInstance(parent, type);
57}

◆ createHepRepInstanceTree()

HepRepInstanceTree * cheprep::DefaultHepRepFactory::createHepRepInstanceTree ( std::string  name,
std::string  version,
HEPREP::HepRepTreeID typeTree 
)
virtual

Creates a HepRepInstanceTree.

The tree needs to be added to the HepRep.

Parameters
nameof the instancetree.
versionof the instancetree.
typeTreeassociated typetree.

Implements HEPREP::HepRepFactory.

Definition at line 67 of file DefaultHepRepFactory.cc.

68 {
69 return new DefaultHepRepInstanceTree(name, version, typeTreeID);
70}

◆ createHepRepPoint()

HepRepPoint * cheprep::DefaultHepRepFactory::createHepRepPoint ( HEPREP::HepRepInstance instance,
double  x,
double  y,
double  z 
)
virtual

Creates a HepRepPoint.

Parameters
instanceto add the point to.
xx coordinate of point.
yy coordinate of point.
zz coordinate of point.

Implements HEPREP::HepRepFactory.

Definition at line 46 of file DefaultHepRepFactory.cc.

47 {
48 return new DefaultHepRepPoint(instance, x, y, z);
49}

◆ createHepRepReader() [1/2]

HEPREP::HepRepReader * cheprep::DefaultHepRepFactory::createHepRepReader ( std::istream *  in)
virtual

Creates a HepRepReader from a stream.

Parameters
ininput stream.

Implements HEPREP::HepRepFactory.

Reimplemented in cheprep::XMLHepRepFactory.

◆ createHepRepReader() [2/2]

HepRepReader * cheprep::DefaultHepRepFactory::createHepRepReader ( std::string  inputFileName)
virtual

Creates a HepRepReader from a file name.

Parameters
inputFileNamefile name.

Implements HEPREP::HepRepFactory.

Reimplemented in cheprep::XMLHepRepFactory.

Definition at line 36 of file DefaultHepRepFactory.cc.

36 {
37 cerr << "DefaultHepRepFactory::createHepRepReader not implemented" << endl;
38 return NULL;
39}

◆ createHepRepTreeID()

HepRepTreeID * cheprep::DefaultHepRepFactory::createHepRepTreeID ( std::string  name,
std::string  version,
std::string  qualifier = "top-level" 
)
virtual

Creates a HepRepTreeID.

Parameters
nameof the treeID.
versionof the treeID.
qualifierof the treeID.

Implements HEPREP::HepRepFactory.

Definition at line 59 of file DefaultHepRepFactory.cc.

59 {
60 return new DefaultHepRepTreeID(name, version, qualifier);
61}

◆ createHepRepType() [1/2]

HepRepType * cheprep::DefaultHepRepFactory::createHepRepType ( HEPREP::HepRepType parent,
std::string  name 
)
virtual

Creates a HepRepType.

Parameters
parentto add this type to.
nameof the type to create.

Implements HEPREP::HepRepFactory.

Definition at line 72 of file DefaultHepRepFactory.cc.

72 {
73 return new DefaultHepRepType(parent, name);
74}

◆ createHepRepType() [2/2]

HepRepType * cheprep::DefaultHepRepFactory::createHepRepType ( HEPREP::HepRepTypeTree parent,
std::string  name 
)
virtual

Creates a HepRepType.

Parameters
parentto add this type to.
nameof the type to create.

Implements HEPREP::HepRepFactory.

Definition at line 76 of file DefaultHepRepFactory.cc.

76 {
77 return new DefaultHepRepType(parent, name);
78}

◆ createHepRepTypeTree()

HepRepTypeTree * cheprep::DefaultHepRepFactory::createHepRepTypeTree ( HEPREP::HepRepTreeID treeID)
virtual

Creates a HepRepTypeTree.

The tree needs to be added to the HepRep.

Parameters
treeIDto name the tree being created.

Implements HEPREP::HepRepFactory.

Definition at line 80 of file DefaultHepRepFactory.cc.

80 {
81 return new DefaultHepRepTypeTree(treeID);
82}

◆ createHepRepWriter()

HepRepWriter * cheprep::DefaultHepRepFactory::createHepRepWriter ( std::ostream *  out,
bool  randomAccess,
bool  compress 
)
virtual

Creates a HepRepWriter.

Parameters
outoutput stream.
randomAccesscreate a writer in a format that will allow random access (may be ignored).
compresscreate a writer that uses compression (may be ignored).

Implements HEPREP::HepRepFactory.

Reimplemented in cheprep::XMLHepRepFactory.

Definition at line 41 of file DefaultHepRepFactory.cc.

41 {
42 cerr << "DefaultHepRepFactory::createHepRepWriter not implemented" << endl;
43 return NULL;
44}

The documentation for this class was generated from the following files: