40 namespace std {}
using namespace std;
63 if (strcmp(directive->
GetName(),countClass)==0) {
67 if (!element)
return 0;
75 if (!rdCounter)
return 0;
114 factor = xmin = xmax = 0;
115 if (!comments)
return;
116 const char *left = strstr(comments,
"[");
118 const char *right = strstr(left,
"]");
120 const char *comma = strstr(left,
",");
121 if (!comma || comma > right) {
123 left = strstr(right,
"[");
125 right = strstr(left,
"]");
127 comma = strstr(left,
",");
128 if (!comma || comma >right)
return;
131 const char *comma2 = 0;
132 if (comma) comma2 = strstr(comma+1,
",");
133 if (comma2 > right) comma2 = 0;
136 TString sbits(comma2+1,right-comma2-1);
137 sscanf(sbits.
Data(),
"%d",&nbits);
138 if (nbits < 2 || nbits > 32) {
139 ::Error(
"GetRange",
"Illegal specification for the number of bits; %d. reset to 32.",nbits);
144 TString range(left+1,right-left-1);
145 TString sxmin(left+1,comma-left-1);
149 if (sxmin.
Contains(
"2pi")) xmin = 2*kPi;
150 else if (sxmin.
Contains(
"2*pi")) xmin = 2*kPi;
151 else if (sxmin.
Contains(
"twopi")) xmin = 2*kPi;
152 else if (sxmin.
Contains(
"pi/2")) xmin = kPi/2;
153 else if (sxmin.
Contains(
"pi/4")) xmin = kPi/4;
154 else if (sxmin.
Contains(
"pi")) xmin = kPi;
155 if (sxmin.
Contains(
"-")) xmin = -xmin;
159 TString sxmax(comma+1,right-comma-1);
163 if (sxmax.
Contains(
"2pi")) xmax = 2*kPi;
164 else if (sxmax.
Contains(
"2*pi")) xmax = 2*kPi;
165 else if (sxmax.
Contains(
"twopi")) xmax = 2*kPi;
166 else if (sxmax.
Contains(
"pi/2")) xmax = kPi/2;
167 else if (sxmax.
Contains(
"pi/4")) xmax = kPi/4;
168 else if (sxmax.
Contains(
"pi")) xmax = kPi;
169 if (sxmax.
Contains(
"-")) xmax = -xmax;
174 if (nbits < 32) bigint = 1<<nbits;
175 else bigint = 0xffffffff;
176 if (xmin < xmax) factor = bigint/(xmax-
xmin);
177 if (xmin >= xmax && nbits <15) xmin = nbits+0.1;
194 fClassObject = (
TClass*)(-1);
200 for (
Int_t i=0;i<5;i++) fMaxIndex[i] = 0;
215 if (typeName && !strcmp(typeName,
"BASE")) {
232 GetRange(title,fXmin,fXmax,fFactor);
236 GetRange(title,fXmin,fXmax,fFactor);
282 if (className.
Index(
"const ")==0) className.
Remove(0,6);
302 char *action = (
char*)strstr(
GetTitle(),
"EXEC:");
303 if (!action)
return 0;
304 Int_t nch = strlen(action)+1;
305 char *caction =
new char[nch];
306 strlcpy(caction,action+5,nch);
307 char *blank = (
char*)strchr(caction,
' ');
308 if (blank) *blank = 0;
342 sequenceType.
Clear();
345 if (!first) sequenceType +=
",";
347 sequenceType +=
"wholeObject";
351 sequenceType +=
"cached";
354 if (!first) sequenceType +=
",";
356 sequenceType +=
"repeat";
359 if (!first) sequenceType +=
",";
361 sequenceType +=
"nodelete";
364 if (!first) sequenceType +=
",";
366 sequenceType +=
"write";
396 Int_t dtype = fType%20;
462 if (sequenceType.
Length()) {
464 sequenceType +=
") ";
466 printf(
" %-14s %-15s offset=%3d type=%2d %s%-20s\n",
486 if (dim < 0 || dim > 4)
return;
488 if (fArrayLength == 0) fArrayLength =
max;
489 else fArrayLength *=
max;
503 void TStreamerElement::Streamer(
TBuffer &R__b)
514 TNamed::Streamer(R__b);
539 if (type && fArrayLength) fSize = fArrayLength * type->
Size();
599 fBaseCheckSum( *( (
UInt_t*)&(fMaxIndex[1]) ) ),
600 fStreamerFunc(0), fConvStreamerFunc(0), fStreamerInfo(0)
604 fBaseClass = (
TClass*)(-1);
614 fBaseCheckSum( *( (
UInt_t*)&(fMaxIndex[1]) ) ),
615 fStreamerFunc(0), fConvStreamerFunc(0), fStreamerInfo(0)
661 if (cl)
return cl->
Size();
733 if (sequenceType.
Length()) {
735 sequenceType +=
") ";
761 (*extstrm)(b, pointer);
769 (*extstrm)(b, pointer);
781 void TStreamerBase::Streamer(
TBuffer &R__b)
790 TStreamerElement::Streamer(R__b);
855 (*extstrm)(b, pointer);
864 (*extstrm)(b, pointer);
903 fCountVersion = countVersion;
936 if (fArrayLength)
return fArrayLength*
sizeof(
void *);
937 return sizeof(
void *);
964 void TStreamerBasicPointer::Streamer(
TBuffer &R__b)
976 TStreamerElement::Streamer(R__b);
1014 fCountVersion = countVersion;
1043 if (fArrayLength)
return fArrayLength*
sizeof(
void*);
1044 return sizeof(
void*);
1070 void TStreamerLoop::Streamer(
TBuffer &R__b)
1081 TStreamerElement::Streamer(R__b);
1146 void TStreamerBasicType::Streamer(
TBuffer &R__b)
1155 TStreamerElement::Streamer(R__b);
1262 Int_t classSize = 8;
1263 if (cl) classSize = cl->
Size();
1264 if (fArrayLength)
return fArrayLength*classSize;
1271 void TStreamerObject::Streamer(
TBuffer &R__b)
1281 TStreamerElement::Streamer(R__b);
1355 Int_t classSize = 8;
1356 if (cl) classSize = cl->
Size();
1357 if (fArrayLength)
return fArrayLength*classSize;
1364 void TStreamerObjectAny::Streamer(
TBuffer &R__b)
1374 TStreamerElement::Streamer(R__b);
1452 if (fArrayLength)
return fArrayLength*
sizeof(
void *);
1453 return sizeof(
void *);
1469 void TStreamerObjectPointer::Streamer(
TBuffer &R__b)
1479 TStreamerElement::Streamer(R__b);
1556 if (fArrayLength)
return fArrayLength*
sizeof(
void *);
1557 return sizeof(
void *);
1573 void TStreamerObjectAnyPointer::Streamer(
TBuffer &R__b)
1629 if (fArrayLength)
return fArrayLength*
sizeof(
TString);
1636 void TStreamerString::Streamer(
TBuffer &R__b)
1646 TStreamerElement::Streamer(R__b);
1680 || strcmp(name,typeName)==0) {
1705 const char *typeName,
const char *trueType,
Bool_t dmPointer)
1708 const char *
t = trueType;
1709 if (!t || !*t) t = typeName;
1714 || strcmp(name,typeName)==0) {
1719 Int_t nch = strlen(t);
1720 char *s =
new char[nch+1];
1722 char *sopen = strchr(s,
'<');
1724 Fatal(
"TStreamerSTL",
"For %s, the type name (%s) is seemingly not a template (template argument not found)", name, s);
1727 *sopen = 0; sopen++;
1731 for(
int count = 0; *current!=
'\0'; current++) {
1732 if (*current==
'<') count++;
1733 if (*current==
'>') {
1734 if (count==0)
break;
1737 if (*current==
',' && count==0)
break;
1739 char *sclose =
current; *sclose = 0; sclose--;
1740 char *sconst = strstr(sopen,
"const ");
1741 char *sbracket = strstr(sopen,
"<");
1742 if (sconst && (sbracket==0 || sconst < sbracket)) {
1744 char *pconst = sconst-1;
1745 if (*pconst ==
' ' || *pconst ==
'<' || *pconst ==
'*' || *pconst ==
'\0') sopen = sconst + 5;
1764 if (fSTLtype == 0) {
delete [] s;
return;}
1768 while (*sopen==
' ') sopen++;
1772 char *star = strrchr(sopen,
'>');
1773 if (star) star = strchr(star,
'*');
1774 else star = strchr(sopen,
'*');
1780 while (*sclose ==
' ') {*sclose = 0; sclose--;}
1799 if(strcmp(sopen,
"string")) {
1848 if ( type_name[strlen(type_name)-1]==
'*' )
return kTRUE;
1876 Error(
"GetSize",
"Could not find the TClass for %s.\n"
1877 "This is likely to have been a typedef, if possible please declare it in CINT to work around the issue\n",
fTypeName.
Data());
1884 if (fArrayLength)
return fArrayLength*size;
1902 if (sequenceType.
Length()) {
1904 sequenceType +=
") ";
1906 printf(
" %-14s %-15s offset=%3d type=%2d %s,stl=%d, ctype=%d, %-20s\n",
1944 void TStreamerSTL::Streamer(
TBuffer &R__b)
1953 TStreamerElement::Streamer(R__b);
2015 const char *typeName,
Bool_t dmPointer)
2056 if (fArrayLength)
return fArrayLength*
sizeof(string);
2057 return sizeof(string);
2063 void TStreamerSTLstring::Streamer(
TBuffer &R__b)
2073 TStreamerSTL::Streamer(R__b);
2090 void TStreamerArtificial::Streamer(
TBuffer& )
TObject * GetParent() const
Return pointer to parent of this buffer.
const char * GetInclude() const
Return the proper include for this element.
virtual const char * GetTitle() const
Returns title of object.
void SetBufferOffset(Int_t offset=0)
TStreamerBasicType()
value of data member when referenced by an array
virtual Int_t GetCollectionType() const =0
virtual ~TStreamerBase()
TStreamerBase dtor.
ROOT::TSchemaRule::ReadFuncPtr_t fReadFunc
Bool_t CannotSplit() const
We can not split STL's which are inside a variable size array.
virtual void ClassBegin(const TClass *, Version_t=-1)=0
Int_t fNewType
base offset for TObject if the element inherits from it
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
TString GetTypeName()
Get basic type of typedef, e,g.
const char * GetTypeName() const
ClassConvStreamerFunc_t fConvStreamerFunc
Pointer to a wrapper around a custom streamer member function.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual TClass * GetClass() const =0
virtual Bool_t CannotSplit() const
Returns true if the element cannot be split, false otherwise.
virtual TClass * GetValueClass() const =0
Bool_t IsaPointer() const
Return true if the data member is a pointer.
Double_t fXmin
pointer to element Streamer
All ROOT classes may have RTTI (run time type identification) support added.
virtual void Init(TObject *obj=0)
Setup the element.
R__EXTERN TVirtualMutex * gInterpreterMutex
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void SetName(const char *name)
Change (i.e.
virtual Bool_t ClassInfo_IsEnum(const char *) const
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
virtual ~TStreamerObjectAny()
TStreamerObjectAny dtor.
Buffer base class used for serializing objects.
Int_t GetSize() const
Returns size of objectpointer in bytes.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Bool_t IsTransient() const
Return kTRUE if the element represent an entity that is not written to the disk (transient members...
virtual Int_t GetSize() const
Returns size of this element in bytes.
void ToLower()
Change string to lower-case.
TClass * fBaseClass
checksum of the base class (used during memberwise streaming)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
const char * GetInclude() const
Return the proper include for this element.
virtual ~TStreamerObjectAnyPointer()
TStreamerObjectAnyPointer dtor.
ClassStreamerFunc_t fStreamerFunc
pointer to new base class if renamed
virtual Bool_t IsBase() const
Return kTRUE if the element represent a base class.
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
virtual ~TStreamerElement()
TStreamerElement dtor.
TString & Prepend(const char *cs)
ULong_t GetMethod() const
return address of counter
virtual EDataType GetType() const =0
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual Int_t ReadStaticArray(Bool_t *b)=0
virtual void SetMaxIndex(Int_t dim, Int_t max)
set maximum index for array with dimension dim
virtual ~TStreamerBasicType()
TStreamerBasicType dtor.
Int_t GetSize() const
Returns size of anyclass in bytes.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Bool_t IsVersioned() const
TList * GetListOfRealData() const
const char * Data() const
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void ClassMember(const char *, const char *=0, Int_t=-1, Int_t=-1)=0
ClassConvStreamerFunc_t GetConvStreamerFunc() const
Get a wrapper/accessor function around this class custom conversion streamer (member function)...
ULong_t GetMethod() const
return offset of counter
virtual void Init(TObject *obj=0)
Initliaze the element.
Int_t GetSize() const
Returns size of anyclass in bytes.
The TNamed class is the base class for all named ROOT classes.
const char * GetInclude() const
Return the proper include for this element.
UChar_t mod R__LOCKGUARD2(gSrvAuthenticateMutex)
void Clear()
Clear string without changing its capacity.
Int_t GetSize() const
Returns size of counter in bytes.
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
virtual void Init(TObject *obj=0)
Setup the element.
virtual Bool_t IsaPointer() const
void(* ReadFuncPtr_t)(char *, TVirtualObject *)
static TString & IncludeNameBuffer()
const char * GetInclude() const
Return the proper include for this element.
Int_t GetSize() const
Returns size of baseclass in bytes.
const char * GetInclude() const
Return the proper include for this element.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual ~TStreamerObject()
TStreamerObject dtor.
Int_t WriteBuffer(TBuffer &b, void *pointer, const char *info="")
Function called by the Streamer functions to serialize object at p to buffer b.
virtual ~TStreamerString()
TStreamerString dtor.
virtual void SetOnFileClass(const TClass *cl)
static void GetRange(const char *comments, Double_t &xmin, Double_t &xmax, Double_t &factor)
Parse comments to search for a range specifier of the style: [xmin,xmax] or [xmin,xmax,nbits] [0,1] [-10,100]; [-pi,pi], [-pi/2,pi/4],[-2pi,2*pi] [-10,100,16] [0,0,8] if nbits is not specified, or nbits <2 or nbits>32 it is set to 32 if (xmin==0 and xmax==0 and nbits <=16) the double word will be converted to a float and its mantissa truncated to nbits significative bits.
virtual void Init(TObject *obj=0)
Setup the element.
static Int_t AddExec(const char *name)
If Exec with name does not exist in the list of Execs, it is created.
void Error(const char *location, const char *msgfmt,...)
virtual ~TStreamerBasicPointer()
TStreamerBasicPointer dtor.
Int_t GetArrayDim() const
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
virtual void Update(const TClass *oldClass, TClass *newClass)
function called by the TClass constructor when replacing an emulated class by the real class ...
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
Double_t fXmax
Minimum of data member if a range is specified [xmin,xmax,nbits].
virtual void ls(Option_t *option="") const
Print the content of the element.
virtual void SetStreamer(TMemberStreamer *streamer)
set pointer to Streamer function for this element
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
ClassImp(TStreamerElement) TStreamerElement
Default ctor.
TStreamerObjectAnyPointer()
Int_t fTObjectOffset
element offset in class
virtual void ls(Option_t *option="") const
Print the content of the element.
virtual ~TStreamerSTLstring()
TStreamerSTLstring dtor.
TVirtualStreamerInfo * FindConversionStreamerInfo(const char *onfile_classname, UInt_t checksum) const
Return a Conversion StreamerInfo from the class 'classname' for the layout represented by 'checksum' ...
Int_t GetSize() const
Returns size of basicpointer in bytes.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
virtual void Update(const TClass *oldClass, TClass *newClass)
Function called by the TClass constructor when replacing an emulated class by the real class...
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
TClass * GetClass() const
TStreamerBasicPointer()
pointer to basic type counter
Basic data type descriptor (datatype information is obtained from CINT).
const char * GetTypeNameBasic() const
Return type name of this element in case the type name is not a standard basic type, return the basic type name known to CINT.
TVirtualStreamerInfo * GetConversionStreamerInfo(const char *onfile_classname, Int_t version) const
Return a Conversion StreamerInfo from the class 'classname' for version number 'version' to this clas...
virtual Bool_t HasPointers() const =0
TStreamerLoop()
pointer to basic type counter
Int_t WriteBuffer(TBuffer &b, char *pointer)
Write the base class into the buffer.
Bool_t HasInterpreterInfo() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t TestBit(UInt_t f) const
virtual Int_t GetExecID() const
Returns the TExec id for the EXEC instruction in the comment field of a TRef data member...
The TRealData class manages the effective list of all data members for a given class.
virtual const char * GetName() const
Returns name of object.
ROOT::TSchemaRule::ReadRawFuncPtr_t fReadRawFunc
TSubString Strip(EStripType s=kTrailing, char c= ' ') const
Return a substring of self stripped at beginning and/or end.
The ROOT global object gROOT contains a list of all defined classes.
ClassStreamerFunc_t GetStreamerFunc() const
Get a wrapper/accessor function around this class custom streamer (member function).
Version_t GetClassVersion() const
virtual ~TStreamerObjectPointer()
TStreamerObjectPointer dtor.
Int_t GetSize() const
Returns size of objectpointer in bytes.
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
virtual void Init(TObject *obj=0)
Setup the element.
TString & Remove(Ssiz_t pos)
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
Int_t GetSize() const
Returns size of this element in bytes.
void(* ReadRawFuncPtr_t)(char *, TBuffer &)
virtual ~TStreamerLoop()
TStreamerLoop dtor.
virtual const char * GetName() const
Returns name of object.
virtual void SetStreamer(TMemberStreamer *streamer)
Set pointer to Streamer function for this element NOTE: we do not take ownership. ...
ULong_t GetMethod() const
return address of counter
virtual TObjArray * GetElements() const =0
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
const char * GetInclude() const
Return the proper include for this element.
unsigned long long ULong64_t
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
virtual void ls(Option_t *option="") const
Print the content of the element.
virtual void Init(TObject *obj=0)
Setup the element.
virtual void SetType(Int_t dtype)
virtual Bool_t IsOldFormat(const char *newTypeName)
The early 3.00/00 and 3.01/01 versions used to store dm->GetTypeName instead of dm->GetFullTypename i...
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
Int_t GetSize() const
Returns size of object class in bytes.
TMemberStreamer * GetStreamer() const
Return the local streamer object.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Bool_t IsBase() const
Return kTRUE if the element represent a base class.
Int_t GetSize() const
Returns size of STL container in bytes.
TClass * fNewClass
pointer to class of object
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
TMemberStreamer * fStreamer
new element class when reading
virtual UInt_t GetUniqueID() const
Return the unique object id.
Mother of all ROOT objects.
Int_t Size() const
Get size of basic typedef'ed type.
const char * GetInclude() const
Return the proper include for this element.
virtual void Init(TObject *obj=0)
Setup the element.
Bool_t IsBase() const
Return kTRUE if the element represent a base class.
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
const char * GetDeclFileName() const
void GetSequenceType(TString &type) const
Fill type with the string representation of sequence information including 'cached','repeat','write' or 'nodelete'.
void SetArrayDim(Int_t dim)
Set number of array dimensions.
virtual void ClassEnd(const TClass *)=0
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
const char * GetInclude() const
Return the proper include for this element.
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.
ROOT::TSchemaRule::ReadFuncPtr_t GetReadFunc()
static TStreamerBasicType * GetElementCounter(const char *countName, TClass *cl)
Get pointer to a TStreamerBasicType in TClass *cl static function.
Int_t ReadBuffer(TBuffer &b, char *pointer)
Read the content of the buffer.
Double_t fFactor
Maximum of data member if a range is specified [xmin,xmax,nbits].
TDataMember * GetDataMember() const
ROOT::TSchemaRule::ReadRawFuncPtr_t GetReadRawFunc()
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
virtual void Init(TObject *obj=0)
Setup the element.
TStreamerBasicType * fCounter
R__EXTERN TInterpreter * gCling
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Abstract Interface class describing Streamer information for one class.
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
virtual ~TStreamerSTL()
TStreamerSTL dtor.
Int_t GetSize() const
Returns size of anyclass in bytes.
TClass * fNewBaseClass
pointer to base class
TVirtualStreamerInfo * fStreamerInfo
Pointer to a wrapper around a custom convertion streamer member function.
void InitStreaming()
Error message in case of checksum/version mismatch.
Int_t Size() const
Return size of object of this class.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
TStreamerBasicType * fCounter
TString fTypeName
new element type when reading
Int_t GetArrayLength() const
static TStreamerBasicType * InitCounter(const char *countClass, const char *countName, TObject *directive)
Helper function to initialize the 'index/counter' value of the Pointer streamerElements.
const char * GetInclude() const
Return the proper include for this element.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.