Geant4  10.01.p03
DefaultHepRepInstanceTree.cc
Go to the documentation of this file.
1 // Copyright FreeHEP, 2005.
2 
3 #include "cheprep/DefaultHepRepInstanceTree.h"
4 
5 using namespace std;
6 using namespace HEPREP;
7 
12 namespace cheprep {
13 
14 DefaultHepRepInstanceTree::DefaultHepRepInstanceTree(string aName, string aVersion, HepRepTreeID* aTypeTree)
15  : DefaultHepRepTreeID(aName, aVersion), typeTree(aTypeTree) {
16 }
17 
18 DefaultHepRepInstanceTree::~DefaultHepRepInstanceTree() {
19  for (vector<HepRepInstance*>::iterator i1 = instances.begin(); i1 != instances.end(); i1++) {
20  delete (*i1);
21  }
22  instances.clear();
23 }
24 
25 void DefaultHepRepInstanceTree::overlay(HepRepInstanceTree *) {
26  cerr << "DefaultHepRepInstanceTree::overlay(HepRepInstanceTree * instanceTree) not implemented." << endl;
27 }
28 
29 HepRepInstanceTree* DefaultHepRepInstanceTree::copy(HepRepTypeTree*, HepRepSelectFilter*) {
30  cerr << "DefaultHepRepInstanceTree::copy(HepRepTypeTree*, HepRepSelectFilter*) not implemented." << endl;
31  return NULL;
32 }
33 
34 void DefaultHepRepInstanceTree::addInstance(HepRepInstance* instance) {
35  instances.push_back(instance);
36 }
37 
38 void DefaultHepRepInstanceTree::removeInstance(HepRepInstance*) {
39  cerr << "DefaultHepRepInstanceTree::removeInstance(HepRepInstance*) not implemented." << endl;
40 }
41 
42 vector<HepRepInstance*> DefaultHepRepInstanceTree::getInstances() {
43  return instances;
44 }
45 
46 void DefaultHepRepInstanceTree::addInstanceTree(HepRepTreeID* treeID) {
47  instanceTrees.push_back(treeID);
48 }
49 
50 HepRepTreeID* DefaultHepRepInstanceTree::getTypeTree() {
51  return typeTree;
52 }
53 
54 vector<HepRepTreeID*> DefaultHepRepInstanceTree::getInstanceTreeList() {
55  return instanceTrees;
56 }
57 
58 } // cheprep
59 
void copy(std::vector< T > &main, const std::vector< T > &data)
Definition: DicomRun.hh:91
static MCTruthManager * instance