5 #include "cheprep/DefaultHepRepInstance.h" 
   16 DefaultHepRepInstance::DefaultHepRepInstance(HepRepInstance* 
instance, HepRepType* heprepType)
 
   17     : DefaultHepRepAttribute(), parent(instance), type(heprepType) {
 
   19     if (type == NULL) cerr << 
"HepRepInstance cannot be created without a HepRepType." << endl;
 
   20     parent->addInstance(
this);
 
   23 DefaultHepRepInstance::DefaultHepRepInstance(HepRepInstanceTree* instanceTree, HepRepType* heprepType)
 
   24     : DefaultHepRepAttribute(), parent(NULL), type(heprepType) {
 
   26     if (type == NULL) cerr << 
"HepRepInstance cannot be created without a HepRepType." << endl;
 
   27     instanceTree->addInstance(
this);
 
   30 DefaultHepRepInstance::~DefaultHepRepInstance() {
 
   33     for (vector<HepRepInstance*>::iterator i1 = instances.begin(); i1 != instances.end(); i1++) {
 
   36     for (vector<HepRepPoint*>::iterator i2 = points.begin(); i2 != points.end(); i2++) {
 
   41 void DefaultHepRepInstance::overlay(HepRepInstance *) {
 
   42     cerr << 
"DefaultHepRepInstance::overlay(HepRepInstance * instance) not implemented." << endl;
 
   46     cerr << 
"DefaultHepRepInstance::copy(HepRepTypeTree*, HepRepInstance*, HepRepSelectFilter*) not implemented." << endl;
 
   51     cerr << 
"DefaultHepRepInstance::copy(HepRepTypeTree*, HepRepInstanceTree*, HepRepSelectFilter*) not implemented." << endl;
 
   55 HepRepType* DefaultHepRepInstance::getType() {
 
   59 void DefaultHepRepInstance::addPoint(HepRepPoint* point) {
 
   60     points.push_back(point);
 
   63 vector<HepRepPoint*> DefaultHepRepInstance::getPoints() {
 
   67 HepRepInstance* DefaultHepRepInstance::getSuperInstance() {
 
   71 void DefaultHepRepInstance::addInstance(HepRepInstance* instance) {
 
   72     instances.push_back(instance);
 
   75 void DefaultHepRepInstance::removeInstance(HepRepInstance*) {
 
   76     cerr << 
"DefaultHepRepInstance::removeInstance(HepRepInstance*) not implemented." << endl;
 
   79 vector<HepRepInstance*> DefaultHepRepInstance::getInstances() {
 
   83 HepRepAttValue* DefaultHepRepInstance::getAttValue(
string name) {
 
   84     HepRepAttValue* value = getAttValueFromNode(name);
 
   85     return (value != NULL) ? value : type->getAttValue(name);
 
void copy(std::vector< T > &main, const std::vector< T > &data)
 
static MCTruthManager * instance