PHNode.C
//-----------------------------------------------------------------------------
// $Header: /afs/rhic/phenix/cvsroot/offline/framework/phool/PHNode.C,v 1.5 2001/03/12 14:42:05 pinkenbu Exp $
//
// The PHOOL's Software
// Copyright (C) PHENIX collaboration, 1999
//
// Implementation of class PHNode
//
// Author: Matthias Messer
//-----------------------------------------------------------------------------
#include "PHNode.h"
/* to keep backward compatibility, default type of stored object is PHTable */
PHNode::PHNode(const PHString& n) : name(n)
{
persistent = False;
parent = 0;
objecttype = "PHTable";
}
PHNode::PHNode(const PHString& n, const PHString& objtype ) : name(n)
{
persistent = False;
parent = 0;
objecttype = objtype;
}
PHNode::PHNode()
{
}
PHNode::~PHNode()
{
if (parent)
parent->forgetMe(this);
}
//
// Implementation of external functions.
//
ostream & operator << (ostream & stream, const PHNode & node)
{
stream << node.getType() << " : " << node.getName();
return stream;
}