Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cheprep::DefaultHepRepInstanceTree Class Reference

#include <DefaultHepRepInstanceTree.h>

Inheritance diagram for cheprep::DefaultHepRepInstanceTree:
Collaboration diagram for cheprep::DefaultHepRepInstanceTree:

Public Member Functions

 DefaultHepRepInstanceTree (std::string name, std::string version, HEPREP::HepRepTreeID *typeTree)
 
 ~DefaultHepRepInstanceTree ()
 
void overlay (HEPREP::HepRepInstanceTree *instanceTree)
 
HEPREP::HepRepInstanceTreecopy (HEPREP::HepRepTypeTree *typeTree, HEPREP::HepRepSelectFilter *filter)
 
void addInstance (HEPREP::HepRepInstance *instance)
 
void removeInstance (HEPREP::HepRepInstance *instance)
 
std::vector
< HEPREP::HepRepInstance * > 
getInstances ()
 
void addInstanceTree (HEPREP::HepRepTreeID *treeID)
 
HEPREP::HepRepTreeIDgetTypeTree ()
 
std::vector
< HEPREP::HepRepTreeID * > 
getInstanceTreeList ()
 
- Public Member Functions inherited from cheprep::DefaultHepRepTreeID
 DefaultHepRepTreeID (std::string name, std::string version, std::string qualifier="top_level")
 
 ~DefaultHepRepTreeID ()
 
std::string getQualifier ()
 
void setQualifier (std::string qualifier)
 
std::string getName ()
 
std::string getVersion ()
 
- Public Member Functions inherited from HEPREP::HepRepTreeID
virtual ~HepRepTreeID ()
 Destructor. More...
 
- Public Member Functions inherited from HEPREP::HepRepInstanceTree
virtual ~HepRepInstanceTree ()
 Destructor. More...
 

Detailed Description

Definition at line 26 of file DefaultHepRepInstanceTree.h.

Constructor & Destructor Documentation

cheprep::DefaultHepRepInstanceTree::DefaultHepRepInstanceTree ( std::string  name,
std::string  version,
HEPREP::HepRepTreeID typeTree 
)

Definition at line 14 of file DefaultHepRepInstanceTree.cc.

15  : DefaultHepRepTreeID(aName, aVersion), typeTree(aTypeTree) {
16 }
DefaultHepRepTreeID(std::string name, std::string version, std::string qualifier="top_level")
cheprep::DefaultHepRepInstanceTree::~DefaultHepRepInstanceTree ( )

Definition at line 18 of file DefaultHepRepInstanceTree.cc.

18  {
19  for (vector<HepRepInstance*>::iterator i1 = instances.begin(); i1 != instances.end(); i1++) {
20  delete (*i1);
21  }
22  instances.clear();
23 }

Member Function Documentation

void cheprep::DefaultHepRepInstanceTree::addInstance ( HEPREP::HepRepInstance instance)
virtual

Adds an instance to this instancetree.

Parameters
instanceto be added.

Implements HEPREP::HepRepInstanceTree.

Definition at line 34 of file DefaultHepRepInstanceTree.cc.

34  {
35  instances.push_back(instance);
36 }
void cheprep::DefaultHepRepInstanceTree::addInstanceTree ( HEPREP::HepRepTreeID instanceTree)
virtual

Adds a related instance tree to this instancetree.

Parameters
instanceTreerelated instancetree.

Implements HEPREP::HepRepInstanceTree.

Definition at line 46 of file DefaultHepRepInstanceTree.cc.

46  {
47  instanceTrees.push_back(treeID);
48 }
HepRepInstanceTree * cheprep::DefaultHepRepInstanceTree::copy ( HEPREP::HepRepTypeTree typeTree,
HEPREP::HepRepSelectFilter filter 
)
virtual

Returns a deep copy of this instancetree.

Parameters
filterto filter the instances.
Returns
copy of this instancetree.

Implements HEPREP::HepRepInstanceTree.

Definition at line 29 of file DefaultHepRepInstanceTree.cc.

29  {
30  cerr << "DefaultHepRepInstanceTree::copy(HepRepTypeTree*, HepRepSelectFilter*) not implemented." << endl;
31  return NULL;
32 }
vector< HepRepInstance * > cheprep::DefaultHepRepInstanceTree::getInstances ( )
virtual

Returns a collection of instances.

Returns
collection of HepRepInstances.

Implements HEPREP::HepRepInstanceTree.

Definition at line 42 of file DefaultHepRepInstanceTree.cc.

42  {
43  return instances;
44 }
vector< HepRepTreeID * > cheprep::DefaultHepRepInstanceTree::getInstanceTreeList ( )
virtual

Returns a collection of associated instance trees.

Returns
collection of HepRepTreeIDs.

Implements HEPREP::HepRepInstanceTree.

Definition at line 54 of file DefaultHepRepInstanceTree.cc.

54  {
55  return instanceTrees;
56 }
HepRepTreeID * cheprep::DefaultHepRepInstanceTree::getTypeTree ( )
virtual

Returns the associated typetree.

Returns
TreeID of the associated typetree.

Implements HEPREP::HepRepInstanceTree.

Definition at line 50 of file DefaultHepRepInstanceTree.cc.

50  {
51  return typeTree;
52 }
void cheprep::DefaultHepRepInstanceTree::overlay ( HEPREP::HepRepInstanceTree instanceTree)
virtual

Overlays the instance tree on the current tree.

The list of instances of the instanceTree has to be the same as the current tree.

Implements HEPREP::HepRepInstanceTree.

Definition at line 25 of file DefaultHepRepInstanceTree.cc.

25  {
26  cerr << "DefaultHepRepInstanceTree::overlay(HepRepInstanceTree * instanceTree) not implemented." << endl;
27 }
void cheprep::DefaultHepRepInstanceTree::removeInstance ( HEPREP::HepRepInstance instance)
virtual

Removes an instance from this instancetree.

Parameters
instanceto be removed.

Implements HEPREP::HepRepInstanceTree.

Definition at line 38 of file DefaultHepRepInstanceTree.cc.

38  {
39  cerr << "DefaultHepRepInstanceTree::removeInstance(HepRepInstance*) not implemented." << endl;
40 }

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