//*CMZ : 1.02/00 23/07/97 18.41.34 by Rene Brun
//*-- Author : Rene Brun 23/07/97
//*KEEP,CopyRight,T=C.
/*************************************************************************
* Copyright(c) 1995-1999, The ROOT System, All rights reserved. *
* Authors: Rene Brun, Fons Rademakers. *
* For list of contributors see $ROOTSYS/AA_CREDITS. *
* *
* Permission to use, copy, modify and distribute this software and its *
* documentation for non-commercial purposes is hereby granted without *
* fee, provided that the above copyright notice appears in all copies *
* and that both the copyright notice and this permission notice appear *
* in the supporting documentation. The authors make no claims about the *
* suitability of this software for any purpose. It is provided "as is" *
* without express or implied warranty. *
*************************************************************************/
//*KEND.
//////////////////////////////////////////////////////////////////////////
// //
// Utility class for browsing TMapFile objects. //
// When the browser is invoked for a TMapFile, a TKeyMapFile object //
// is created for each object in the mapped file. //
// When a TKeyMapFile object is clicked in the browser, a new copy //
// of this object is copied into the local directory and the action //
// corresponding to object->Browse is executed (typically Draw). //
// //
//////////////////////////////////////////////////////////////////////////
//*KEEP,TKeyMapFile,T=C++.
#include "TKeyMapFile.h"
//*KEEP,TDirectory.
#include "TDirectory.h"
//*KEEP,TMapFile.
#include "TMapFile.h"
//*KEEP,TBrowser.
#include "TBrowser.h"
//*KEND.
ClassImp(TKeyMapFile)
//______________________________________________________________________________
TKeyMapFile::TKeyMapFile() : TNamed()
{
}
//______________________________________________________________________________
TKeyMapFile::TKeyMapFile(const Text_t *name, const Text_t *classname, TMapFile *mapfile)
: TNamed(name,classname)
{
fMapFile = mapfile;
}
//______________________________________________________________________________
void TKeyMapFile::Browse(TBrowser *b)
{
TObject *obj = gDirectory->Get((char*)GetName());
delete obj;
obj = fMapFile->Get(GetName(),0);
if( b && obj )
obj->Browse( b );
}
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.