Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

rHistoFolderServer.h

Go to the documentation of this file.
00001 #ifndef rHistoFolderServer_h
00002 #define rHistoFolderServer_h
00003 
00004 #include "Event/rHistoFolder.h"
00005 #include "Event/serverVI.h"
00006 
00007 #include <vector>
00008 //--------------------------------------
00010 /*! 
00011 <ul>
00012         <li> It has a server with rHistoFolder s. 
00013         <li> But the rHistoFolders are created and defined by a derived class that should implement the pure
00014         virtual method \c defineHistoFolders(). Every rHistoFolder should be incorporated
00015         in the server via the method \c addHistoFolder().
00016         <li> The rHistoFolders incorporated in ther server will turn to be algorithms
00017         via the method \c makeAlgorithms(). This method is automatically executed after
00018         \c defineHistoFolders(). The name of the algorithm will be fill+"name of the
00019         folder in this server" (i.e if the rHistoFolder is named \e "trackHisto", the algorithm
00020         will be named \e "filltrackHisto").
00021         <li> The \c fill() or \c define() of every rHistoFolder in the server can
00022         be executed by the name of the folder.
00023         <li> It provides protected access to a rHistofolder by its name (method \c getHistoFolder()).
00024 </ul>
00025 */
00026 //---------------------------------------
00027 // JA Hernando, Santa Cruz, CA, 05/15/00
00028 //---------------------------------------
00029 //#############################
00030 class rHistoFolderServer 
00031 //#############################
00032 {
00033 public: 
00034         
00036         void define(std::string name) {getHistoFolder(name)->define();}
00038         void fill(std::string name)   {getHistoFolder(name)->fill();}
00039 
00040 protected:
00041 
00043         rHistoFolderServer();
00045         virtual ~rHistoFolderServer();
00046 
00048         rHistoFolder* getHistoFolder(std::string name) const;
00049 
00050 
00052 
00053         virtual void defineHistoFolders() {makeAlgorithms();};
00055         virtual void addHistoFolder(std::string name, rHistoFolder* folder);
00056 
00058         virtual void makeAlgorithms();
00059 
00061         virtual void setFile(TFile* file);
00062 
00063 private:
00064 
00066         serverVI<rHistoFolder>* m_server;
00067 };
00068 #endif

Generated at Fri Aug 18 12:57:38 2000 for centella framework by doxygen 1.1.3 written by Dimitri van Heesch, © 1997-2000