// $Id: BrCreationID.cxx,v 1.4 1998/08/14 21:26:24 videbaek Exp $
// $Log: BrCreationID.cxx,v $
// Revision 1.4 1998/08/14 21:26:24 videbaek
// Some cleanup mods
//
// Revision 1.3 1998/04/06 21:11:50 videbaek
// Clean up and additions for Win95
//
// Revision 1.2 1998/03/09 20:53:48 videbaek
// Ensure that pointers are non-NULL before deleting
//
// Revision 1.1.1.1 1998/03/04 21:32:48 brahmlib
// Brat base
//
//
#include "BrCreationID.h"
#include <iostream.h>
//#define _BRDEBUG
ClassImp(BrCreationID)
////////////////////////////////////////////////////////////
//
// BrCreationID is a bookkeeping class that stores some
// key information about the creation of a BrDataObject
//
////////////////////////////////////////////////////////////
BrCreationID::BrCreationID()
{
// Default constructor. Does nothing.
// Don't use this constructor unless you have to and know
// what you are doing
// Use BrCreationID(TObject *Creator) instead.
#ifdef _BRDEBUG
cout << "BrCreationID() : ctor " << endl;
#endif
fHost = NULL;
fUserID = 0;
fCreatorClassName= NULL;
}
BrCreationID::BrCreationID(TObject *Creator)
{
#ifdef _BRDEBUG
cout << "BrCreationID(Creator) : ctor " << endl;
#endif
// Constructor. Fills the data members of the BrCreationID
// based on the TObject pointer and some TSystem calls
time(&fTime);
// Char_t HostName[512];
if(!Creator)
{
cerr << "No creator specified" << endl;
// fprintf(stderr,"Can't make BrCreationID() for with Creator = %xn",Creator);
}
else
{
TClass *cl = Creator->Class();
fCreatorClassVersion = cl->GetClassVersion();
fCreatorClassName = new TNamed(cl->GetName(),"");
fUserID = 0;
fHost = NULL;
// sprintf(HostName,"%s",gSystem->HostName());
// fHost = new TInetAddress(gSystem->GetHostByName(&HostName[0]));
}
}
BrCreationID::~BrCreationID()
{
// Destructor. Delete BrCreationID
#ifdef _BRDEBUG
cout << "BrCreationID : dtor " << endl;
#endif
if(fHost)
delete fHost;
if(fCreatorClassName)
delete fCreatorClassName;
}
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.