| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

RootIOUserDataProxy.h

Go to the documentation of this file.
00001 
00013 #ifndef ROOTIOUSERDATAPROXY
00014 #define ROOTIOUSERDATAPROXY
00015 
00016 #include <map>
00017 #include <string>
00018 
00019 class TTree;
00020 
00021 class RootIOUserDataProxy
00022 {
00023 public:
00024     RootIOUserDataProxy(const std::string& varName,
00025                         const std::string& cppType,
00026                         char* address);
00027     virtual ~RootIOUserDataProxy();
00028     
00030     const std::string& varName() { return m_varName; }
00031 
00033     const std::string& cppType() { return m_cppType; }
00034     
00036     bool isObject() { return m_isObject; }
00037 
00039     bool branch(TTree* tree);
00040 
00043     template<class DTYPE> DTYPE& value() {
00044         return *(DTYPE*)(m_address);
00045     }
00046     template<class DTYPE> DTYPE* address() {
00047         return (DTYPE*)(m_address);
00048     }
00049 
00051     void resetAddress(char* address) {
00052         m_address = address;
00053     }
00054 
00055 private:
00056     std::string m_varName;
00057     std::string m_cppType;
00058     char* m_address;
00059     bool m_isObject;
00060 };
00061 
00062 #endif  // ROOTIOUSERDATAPROXY
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:18:19 2011 for RootIOSvc by doxygen 1.4.7