source: releases/Mars.2014.05.26/mbase/MParEmulated.h@ 18459

Last change on this file since 18459 was 9079, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.2 KB
Line 
1#ifndef MARS_MParEmulated
2#define MARS_MParEmulated
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MParEmulated : public MParContainer
9{
10private:
11 Byte_t *fPtr;
12 TString fClassName;
13
14#ifndef __CINT__
15#if ROOT_VERSION_CODE<ROOT_VERSION(5,18,00)
16 TStreamerInfo *GetStreamerInfo(const TString &cls, TVirtualCollectionProxy* &proxy, Int_t &offset) const;
17 TStreamerInfo *GetStreamerInfo(const TString &cls, Int_t &offset) const
18 {
19 TVirtualCollectionProxy *proxy = 0; return GetStreamerInfo(cls, proxy, offset);
20 }
21#else
22 TVirtualStreamerInfo *GetStreamerInfo(const TString &cls, TVirtualCollectionProxy* &proxy, Int_t &offset) const;
23 TVirtualStreamerInfo *GetStreamerInfo(const TString &cls, Int_t &offset) const
24 {
25 TVirtualCollectionProxy *proxy = 0; return GetStreamerInfo(cls, proxy, offset);
26 }
27#endif
28#endif
29 TMethodCall *GetMethodCall(const char *get, Int_t offset, TVirtualCollectionProxy *proxy=0) const;
30
31public:
32 MParEmulated(const char *name=0, const char *title=0);
33
34 void SetClassName(const char *name) { fClassName=name; }
35
36 Byte_t **GetPtr() { return &fPtr; }
37
38 int GetInt(Int_t offset) const { return *reinterpret_cast<int*>(fPtr+offset); }
39 Int_t GetInt_t(Int_t offset) const { return *reinterpret_cast<Int_t*>(fPtr+offset); }
40 double GetDouble(Int_t offset) const { return *reinterpret_cast<double*>(fPtr+offset); }
41 unsigned long long GetULongLong(Int_t offset) const { return *reinterpret_cast<unsigned long long*>(fPtr+offset); }
42
43 int GetPInt(TVirtualCollectionProxy *proxy, Int_t offset) const;
44 Int_t GetPInt_t(TVirtualCollectionProxy *proxy, Int_t offset) const;
45 double GetPDouble(TVirtualCollectionProxy *proxy, Int_t offset) const;
46 unsigned long long GetPULongLong(TVirtualCollectionProxy *proxy, Int_t offset) const;
47
48 TMethodCall *GetterMethod(const char *name, TString cls, Int_t offset=0) const;
49 TMethodCall *GetterMethod(const char *name) const { return GetterMethod(name, fClassName); }
50
51 void Print(TPRegexp &regex, TString classname, TString prefix, Int_t offset) const;
52 void Print(Option_t *o=0) const;
53
54 ClassDef(MParEmulated, 0) // Storage container for emulated classes from files
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.