[root] / trunk / core / base / inc / TPluginManager.h Repository:
ViewVC logotype

Log of /trunk/core/base/inc/TPluginManager.h

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 37497 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 10 12:22:54 2010 UTC (4 years, 1 month ago) by rdm
File length: 9501 byte(s)
Diff to previous 32284
Add new method  WritePluginRecords() which writes out the plugin information
in the TEnv format:
  Plugin.TFile:       ^rfio:   TRFIOFile    RFIO   "<constructor>"
This is needed for iOS where we cannot ship the etc/plugins directory
as part of the app bundle. A single system.plugins file will work though.

Revision 32284 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 8 15:57:44 2010 UTC (4 years, 11 months ago) by rdm
File length: 9420 byte(s)
Diff to previous 22961
- add explanation on processing order of plugin directories.
- add TPluginHandler::Print() (code was all in TPluginManager::Print()).

Revision 22961 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 3 13:32:57 2008 UTC (6 years, 9 months ago) by rdm
File length: 9065 byte(s)
Diff to previous 20877
move the directories:
  base clib cont meta metautils newdelete pcre rint thread unix utils
  winnt zip
under the new core meta directory.

Revision 20877 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:17:07 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 9065 byte(s)
Diff to previous 20278
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 20278 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 9 14:22:42 2007 UTC (7 years, 3 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 9065 byte(s)
Diff to previous 19826
in case the plugin base class is in a namespace, like ROOT::MyBase, the
plugins should be stored in the directory ROOT@@MyBase. The : character
is a pathname character on Windows.

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 8840 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 8893 byte(s)
Diff to previous 19373
remove :$ from tag line

Revision 19373 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 17 14:43:18 2007 UTC (7 years, 6 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 8903 byte(s)
Diff to previous 17055
Updated TPluginManager. Plugin handlers can now be specified wia macros
in a list of plugin directories. These new features are implemented via
two new methods described below. These changes are fully backward compatible
and plugin descriptions in rootrc files still work. However, using the new
macros we only load in program memory the handlers for the needed plugins,
instead of the almost 100 handlers of all plugins. For example after starting
root.exe, only these handlers are loaded:

root [0] gPluginMgr->Print()
=====================================================================
Base                 Regexp        Class              Plugin
=====================================================================
TSystem              ^rfio:        TRFIOSystem        RFIO
TSystem              ^castor:      TRFIOSystem        RFIO
TSystem              ^dcache:      TDCacheSystem      DCache
TSystem              ^dcap:        TDCacheSystem      DCache
TSystem              ^alien:       TAlienSystem       RAliEn
TSystem              ^root:        TXNetSystem        Netx
=====================================================================
6 plugin handlers registered
[*] plugin not available
=====================================================================

For more see below:


void TPluginManager::LoadHandlersFromPluginDirs(const char *base)

Load plugin handlers specified via macros in a list of plugin
directories. The $ROOTSYS/etc/plugins is the default top plugin directory
specified in $ROOTSYS/etc/system.rootrc. The macros must have names
like <BaseClass>/PX0_<PluginClass>.C, e.g.:
   TFile/P10_TRFIOFile.C, TSQLServer/P20_TMySQLServer.C, etc.
to allow easy sorting and grouping. Macros not beginning with 'P' and
ending with ".C" are ignored. If base is specified only plugin macros for
that base class are loaded. The macros typically should look like:

   void P10_TDCacheFile()
   {
       gPluginMgr->AddHandler("TFile", "^dcache", "TDCacheFile",
          "DCache", "TDCacheFile(const char*,Option_t*,const char*,Int_t)");
   }

In general these macros should not cause side effects, by changing global
ROOT state via, e.g. gSystem calls, etc. However, in specific cases
this might be useful, e.g. adding a library search path, adding a specific
dependency, check on some OS or ROOT capability or downloading
of the plugin.


Int_t TPluginManager::WritePluginMacros(const char *dir, const char *plugin)

Write in the specified directory the plugin macros. If plugin is specified
and if it is a base class all macros for that base will be written. If it
is a plugin class name, only that one macro will be written. If plugin
is 0 all macros are written. Returns -1 if dir does not exist, 0 otherwise.
This method allows the regeneration of the entire tree of plugin macros
in case we ever decide to change something in the macros.

Revision 17055 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 6 10:21:03 2006 UTC (8 years, 1 month ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 7079 byte(s)
Diff to previous 15245
don't implement copy ctor and assignment operators.

Revision 15245 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 30 15:27:52 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/base/inc/TPluginManager.h
File length: 7123 byte(s)
Diff to previous 15181
From Federico:
Cleanup for gcc option effc++

Revision 15181 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 26 15:13:03 2006 UTC (8 years, 8 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 7068 byte(s)
Diff to previous 15134
one more round of code cleanup: change NULL by 0 in all C++ code.

Revision 15134 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/base/inc/TPluginManager.h
File length: 7130 byte(s)
Diff to previous 6373
From Federico Carminati:

"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."

Revision 6373 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 4 00:10:16 2003 UTC (11 years, 9 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 6671 byte(s)
Diff to previous 4980
new features in the plugin manager: constructors can now be global functions.
In the rootrc file a global function is specified by starting the ctor with
"::". Also added support for plugin macros, instead of the lib name just
use the macro name (typically myplugin.C). The macro will be searched for in
the standard macro path.

Added new default argument to TROOT::LoadMacro() to check for the macros
existence (symmetric with LoadClass()). Used by the plugin manager to check
if a macro exists.

Revision 4980 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 18 14:12:35 2002 UTC (12 years, 6 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 6279 byte(s)
Diff to previous 4933
in TPluginManager::AddHandler() make the new ctor argument optional for
backward compatability.

Revision 4933 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 16 13:57:14 2002 UTC (12 years, 6 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 6275 byte(s)
Diff to previous 3791
extended plugin manager that now supports also the specification of an
ctor, to instantiate an object of the specified class, in the external file
(typically rootrc). This ctor is called via TPluginHandler::ExecPlugin().

Revision 3791 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 27 15:53:40 2002 UTC (12 years, 11 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 4866 byte(s)
Diff to previous 3789
added new default argument check=kFALSE to TROOT::LoadClass(). If check
is true LoadClass() only checks for the existence and readability of the
library and does not attempt to load the library. The plugin manager
uses this new functionality in its Print() method to show which plugins
are available.

Revision 3789 - (view) (download) (as text) (annotate) - [select for diffs]
Added Sun Jan 27 13:53:35 2002 UTC (12 years, 11 months ago) by rdm
Original Path: trunk/base/inc/TPluginManager.h
File length: 4782 byte(s)
This class implements a plugin library manager. It keeps track of
a list of plugin handlers. A plugin handler knows which plugin
library to load to get a specific class that is used to extend the
functionality of a specific base class. For example, to extend the
base class TFile to be able to read RFIO files one needs to load
the plugin library libRFIO.so which defines the TRFIOFile class.
This loading should be triggered when a given URI contains a
regular expression defined by the handler. Handlers can be defined
for example as resources in the .rootrc file, e.g.:

   Plugin.TFile:       ^rfio:    TRFIOFile     RFIO
   Plugin.TSQLServer:  ^mysql:   TMySQLServer  MySQL
   +Plugin.TSQLServer: ^pgsql:   TPgSQLServer  PgSQL

Plugin handlers can also be registered at run time, e.g.:

   gROOT->GetPluginManager()->AddHandler("TSQLServer", "^sapdb:",
                                         "TSapDBServer", "SapDB");

A list of currently defined handlers can be printed using:

   gROOT->GetPluginManager()->Print();

The use of the plugin library manager removes all textual references
to hard-coded class and library names and the resulting dependencies
in the base classes. The plugin manager is used to extend a.o.
TFile, TSQLServer, TGrid, etc. functionality.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9