40 # define INLINE_TEMPLATE_ARGS 42 # define INLINE_TEMPLATE_ARGS inline 48 template <
typename From>
49 struct WithFactorMarker {
53 template <
typename From>
54 struct NoFactorMarker {
75 if (fConfiguration) fConfiguration->PrintDebug(buf,addr);
87 printf(
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d," 88 " %s, offset=%d (%s)\n",
90 aElement->
ClassName(), fOffset, sequenceType.Data());
101 TString sequenceType;
104 printf(
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d," 105 " %s, bufpos=%d, arr=%p, offset=%d (%s)\n",
107 aElement->
ClassName(), buf.
Length(), addr, fOffset, sequenceType.Data());
115 printf(
"TLoopConfiguration: unconfigured\n");
124 void PrintDebug(
TBuffer &,
void *)
const {
140 void PrintDebug(
TBuffer &,
void *)
const {
143 TString sequenceType;
146 printf(
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d," 147 " %s, offset=%d (%s)\n",
149 aElement->
ClassName(), fOffset, sequenceType.Data());
152 void AddToOffset(
Int_t delta)
167 char *obj = (
char*)addr;
168 TGenericConfiguration *conf = (TGenericConfiguration*)config;
174 char *obj = (
char*)addr;
175 TGenericConfiguration *conf = (TGenericConfiguration*)config;
176 return ((
TStreamerInfo*)conf->fInfo)->WriteBufferAux(buf, &obj, &(conf->fCompInfo), 0, 1, 1, config->
fOffset, 2);
179 template <
typename T>
182 T *
x = (
T*)( ((
char*)addr) + config->
fOffset );
189 TBitsConfiguration *conf = (TBitsConfiguration*)config;
201 uid = ( obj->
GetUniqueID() & 0xffffff) + (gpid<<24);
222 template <
typename T>
225 T *
x = (
T *)(((
char *)addr) + config->
fOffset);
233 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
241 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
249 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
257 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
261 buf.SetByteCount(pos,
kTRUE);
267 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
274 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
281 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
289 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
302 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
309 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
316 template<
bool kIsTextT>
341 char **contp = (
char **)((
char *)addr + ioffset);
343 char *cont = contp[j];
345 Int_t nobjects = cont ? proxy->
Size() : 0;
359 }
else if (pstreamer ==
nullptr) {
361 char **contp = (
char **)((
char *)addr + ioffset);
363 char *cont = contp[j];
379 template<
bool kIsTextT>
402 if( vers < 9 && newClass && newClass!=oldClass ) {
403 Error(
"ReadBuffer",
"Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
427 void **contp = (
void**)((
char *) addr + ioffset);
429 void *cont = contp[j];
431 contp[j] = cle->
New();
437 env = newProxy->
Allocate(nobjects,
true);
450 }
else if (pstreamer ==
nullptr) {
452 void **contp = (
void **)((
char *)addr + ioffset);
454 void *cont = contp[j];
455 if (cont ==
nullptr) {
460 contp[j] = cle->
New();
476 template<
bool kIsTextT>
493 (*pstreamer)(buf, (
char *) addr + ioffset , *counter);
495 buf.SetByteCount(pos,
kTRUE);
513 fileVersion = file->GetVersion();
518 if (fileVersion > 51508) {
528 char** pp = (
char**) ((
char *) addr + ioffset );
567 char** pp = (
char**) ((
char *) addr + ioffset );
591 char**
r = (
char**) pp[ndx];
609 template<
bool kIsTextT>
632 (*pstreamer)(buf, (
char *) addr + ioffset , *counter);
650 fileVersion = file->GetVersion();
657 if (fileVersion > 51508) {
662 Int_t vlen = *((
Int_t *)((
char *)addr + eoffset +
670 char **pp = (
char **)((
char *)addr + ioffset );
723 pp[ndx] = (
char *)cl->
NewArray(vlen);
725 Error(
"ReadBuffer",
"Memory allocation failed!\n");
732 pp[ndx] = (
char *)
new char *[vlen];
734 Error(
"ReadBuffer",
"Memory allocation failed!\n");
738 memset(pp[ndx], 0, vlen *
sizeof(
char *));
755 Int_t vlen = *((
Int_t *)((
char *)addr + eoffset +
763 char **pp = (
char **)((
char *)addr + ioffset );
813 pp[ndx] = (
char *)cl->
NewArray(vlen);
815 Error(
"ReadBuffer",
"Memory allocation failed!\n");
822 pp[ndx] = (
char *)
new char *[vlen];
824 Error(
"ReadBuffer",
"Memory allocation failed!\n");
828 memset(pp[ndx], 0, vlen *
sizeof(
char *));
841 char **
r = (
char **)pp[ndx];
845 r[
v] = (
char *)cl->
New();
867 TConfWithFactor(
TVirtualStreamerInfo *info,
UInt_t id, TCompInfo_t *compinfo,
Int_t offset,
Double_t factor,
Double_t xmin) :
TConfiguration(info,
id,compinfo,offset),fFactor(factor),fXmin(xmin) {};
871 template <
typename T>
877 TConfWithFactor *conf = (TConfWithFactor *)config;
890 template <
typename T>
895 TConfNoFactor *conf = (TConfNoFactor *)config;
896 Int_t nbits = conf->fNbits;
908 ((TString*)(((
char*)addr)+config->
fOffset))->TString::Streamer(buf);
918 ((
TObject*)(((
char*)addr)+config->
fOffset))->TObject::Streamer(buf);
951 const char *fTypeName;
960 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(oldClass), fStreamer(0), fTypeName(type_name), fIsSTLBase(isbase),
961 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
964 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(newClass), fStreamer(0), fTypeName(type_name), fIsSTLBase(isbase),
965 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
968 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(oldClass), fStreamer(streamer), fTypeName(type_name), fIsSTLBase(isbase),
969 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
972 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(newClass), fStreamer(streamer), fTypeName(type_name), fIsSTLBase(isbase),
973 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
978 class TConfSTLWithFactor :
public TConfigSTL {
983 TConfSTLWithFactor(TConfigSTL *orig,
Double_t factor,
Double_t xmin) : TConfigSTL(*orig),fFactor(factor),fXmin(xmin) {};
987 class TConfSTLNoFactor :
public TConfigSTL {
991 TConfSTLNoFactor(TConfigSTL *orig,
Int_t nbits) : TConfigSTL(*orig),fNbits(nbits) {};
1003 virtual ~TVectorLoopConfig() {};
1006 printf(
"TVectorLoopConfig: increment=%ld\n",fIncrement);
1009 void* GetFirstAddress(
void *start,
const void * )
const 1024 virtual ~TAssocLoopConfig() {};
1027 printf(
"TAssocLoopConfig: proxy=%s\n",fProxy->GetCollectionClass()->GetName());
1031 void* GetFirstAddress(
void *start,
const void * )
const 1051 if (fProxy->HasPointers()) {
1056 fNext = fProxy->GetFunctionNext(read);
1057 fCopyIterator = fProxy->GetFunctionCopyIterator(read);
1058 fDeleteIterator = fProxy->GetFunctionDeleteIterator(read);
1071 virtual ~TGenericLoopConfig() {};
1074 printf(
"TGenericLoopConfig: proxy=%s\n",fProxy->GetCollectionClass()->GetName());
1078 void* GetFirstAddress(
void *start_collection,
const void *end_collection)
const 1083 void *iter = fCopyIterator(&iterator,start_collection);
1084 void *arr0 = fNext(iter,end_collection);
1085 if (iter != &iterator[0]) {
1086 fDeleteIterator(iter);
1096 TConfigSTL *config = (TConfigSTL*)conf;
1101 TClass *oldClass = config->fOldClass;
1114 void* alternative = oldProxy->
Allocate(nobjects,
true);
1120 void *begin = &(startbuf[0]);
1121 void *end = &(endbuf[0]);
1122 config->fCreateIterators(alternative, &begin, &end, oldProxy);
1126 if (begin != &(startbuf[0])) {
1128 config->fDeleteTwoIterators(begin,end);
1131 oldProxy->
Commit(alternative);
1135 TClass *oldClass = config->fOldClass;
1146 void* env = oldProxy->
Allocate(nobjects,
true);
1148 if (nobjects || vers < 7 ) {
1162 TConfigSTL *config = (TConfigSTL*)conf;
1167 TClass *oldClass = config->fOldClass;
1179 int objectSize = oldClass->
Size();
1180 char *obj = (
char*)addr;
1181 char *endobj = obj + conf->
fLength*objectSize;
1183 for(; obj<endobj; obj+=objectSize) {
1187 void* alternative = oldProxy->
Allocate(nobjects,
true);
1191 void *begin = &(startbuf[0]);
1192 void *end = &(endbuf[0]);
1193 config->fCreateIterators(alternative, &begin, &end, oldProxy);
1197 if (begin != &(startbuf[0])) {
1199 config->fDeleteTwoIterators(begin,end);
1202 oldProxy->
Commit(alternative);
1207 TClass *oldClass = config->fOldClass;
1215 int objectSize = oldClass->
Size();
1216 char *obj = (
char*)addr;
1217 char *endobj = obj + conf->
fLength*objectSize;
1219 for(; obj<endobj; obj+=objectSize) {
1223 void* env = oldProxy->
Allocate(nobjects,
true);
1225 if (nobjects || vers < 7 ) {
1240 TConfigSTL *config = (TConfigSTL*)conf;
1244 TClass *newClass = config->fNewClass;
1245 TClass *oldClass = config->fOldClass;
1248 Error(
"ReadSTLMemberWiseChangedClass",
"Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
1260 void* alternative = newProxy->
Allocate(nobjects,
true);
1265 void *begin = &(startbuf[0]);
1266 void *end = &(endbuf[0]);
1267 config->fCreateIterators( alternative, &begin, &end, newProxy);
1271 if (begin != &(startbuf[0])) {
1273 config->fDeleteTwoIterators(begin,end);
1276 newProxy->
Commit(alternative);
1284 TConfigSTL *config = (TConfigSTL*)conf;
1288 TClass *newClass = config->fNewClass;
1289 TClass *oldClass = config->fOldClass;
1292 Error(
"ReadSTLMemberWiseChangedClass",
"Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
1301 int objectSize = newClass->
Size();
1302 char *obj = (
char*)addr;
1303 char *endobj = obj + conf->
fLength*objectSize;
1305 for(; obj<endobj; obj+=objectSize) {
1309 void* alternative = newProxy->
Allocate(nobjects,
true);
1314 void *begin = &(startbuf[0]);
1315 void *end = &(endbuf[0]);
1316 config->fCreateIterators( alternative, &begin, &end, newProxy);
1320 if (begin != &(startbuf[0])) {
1322 config->fDeleteTwoIterators(begin,end);
1325 newProxy->
Commit(alternative);
1333 TConfigSTL *config = (TConfigSTL*)conf;
1339 TConfigSTL *config = (TConfigSTL*)conf;
1340 (*config->fStreamer)(buf,addr,conf->
fLength);
1346 TConfigSTL *config = (TConfigSTL*)conf;
1349 if (config->fIsSTLBase || vers == 0) {
1359 TConfigSTL *config = (TConfigSTL*)conf;
1362 if (config->fIsSTLBase || vers == 0) {
1365 (*config->fStreamer)(buf,addr,conf->
fLength);
1372 TConfigSTL *config = (TConfigSTL*)conf;
1374 Version_t vers = buf.
ReadVersion(&start, &count, config->fOldClass);
1376 memberwise(buf,((
char*)addr)+config->fOffset,config, vers);
1378 objectwise(buf,((
char*)addr)+config->fOffset,config, vers, start);
1384 template <
typename From,
typename To>
1385 struct ConvertBasicType {
1391 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1396 template <
typename To>
1397 struct ConvertBasicType<BitsMarker,To> {
1408 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1413 template <
typename From,
typename To>
1414 struct ConvertBasicType<WithFactorMarker<From>,To> {
1418 TConfWithFactor *conf = (TConfWithFactor *)config;
1421 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1426 template <
typename From,
typename To>
1427 struct ConvertBasicType<NoFactorMarker<From>,To> {
1431 TConfNoFactor *conf = (TConfNoFactor *)config;
1434 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1439 class TConfigurationPushDataCache :
public TConfiguration {
1445 TConfiguration(info, -1,
nullptr, offset), fOnfileObject(onfileObject)
1448 virtual void Print()
const {
1451 printf(
"StreamerInfoAction, class:%s, PushDataCache offset=%d\n",
1454 printf(
"StreamerInfoAction, class:%s, PopDataCache offset=%d\n",
1457 virtual void PrintDebug(
TBuffer &buffer,
void *
object)
const {
1460 printf(
"StreamerInfoAction, class:%s, %sDataCache, bufpos=%d, arr=%p, offset=%d, onfileObject=%p\n",
1461 info->
GetClass()->
GetName(), fOnfileObject ?
"Push" :
"Pop", buffer.
Length(), object, fOffset, fOnfileObject);
1469 TConfigurationPushDataCache *config = (TConfigurationPushDataCache*)conf;
1470 auto onfileObject = config->fOnfileObject;
1480 TConfigurationPushDataCache *config = (TConfigurationPushDataCache*)conf;
1481 auto onfileObject = config->fOnfileObject;
1486 onfileObject->SetSize(n);
1504 class TConfigurationUseCache :
public TConfiguration {
1512 virtual void PrintDebug(
TBuffer &
b,
void *addr)
const 1518 fprintf(stdout,
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d," 1519 " %s, bufpos=%d, arr=%p, eoffset=%d, Redirect=%p\n",
1525 virtual ~TConfigurationUseCache() {};
1526 virtual TConfiguration *
Copy() {
1527 TConfigurationUseCache *copy =
new TConfigurationUseCache(*
this);
1535 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1542 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1543 char *ptr = (
char*)addr;
1546 config->fAction(b, (*cached)[0]);
1549 if (config->fNeedRepeat) {
1557 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1564 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1565 char *ptr = (
char*)start;
1566 UInt_t n = (((
void**)end)-((
void**)start));
1569 TVectorLoopConfig cached_config(
nullptr, cached->
fClass->
Size(),
kTRUE );
1570 void *cached_start = (*cached)[0];
1571 void *cached_end = ((
char*)cached_start) + cached->
fSize * cached_config.fIncrement;
1572 config->fAction(b,cached_start,cached_end,&cached_config);
1575 if (config->fNeedRepeat) {
1583 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1590 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1591 char *ptr = (
char*)start;
1592 UInt_t n = (((
char*)end)-((
char*)start))/((TVectorLoopConfig*)loopconf)->fIncrement;
1595 TVectorLoopConfig cached_config(
nullptr, cached->
fClass->
Size(),
kTRUE );
1596 void *cached_start = (*cached)[0];
1597 void *cached_end = ((
char*)cached_start) + cached->
fSize * cached_config.fIncrement;
1598 config->fAction(b,cached_start,cached_end,&cached_config);
1601 if (config->fNeedRepeat) {
1609 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1618 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1622 TVectorLoopConfig cached_config(
nullptr, cached->
fClass->
Size(),
kTRUE );
1623 void *cached_start = (*cached)[0];
1624 void *cached_end = ((
char*)cached_start) + cached->
fSize * cached_config.fIncrement;
1625 config->fAction(b,cached_start,cached_end,&cached_config);
1628 if (config->fNeedRepeat) {
1654 return kGenericLooper;
1668 struct VectorLooper {
1670 template <
typename T>
1673 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1674 iter = (
char*)iter + config->
fOffset;
1675 end = (
char*)end + config->
fOffset;
1676 for(; iter != end; iter = (
char*)iter + incr ) {
1677 T *
x = (
T*) ((
char*) iter);
1683 template <
typename From,
typename To>
1684 struct ConvertBasicType {
1689 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1690 iter = (
char*)iter + config->
fOffset;
1691 end = (
char*)end + config->
fOffset;
1692 for(; iter != end; iter = (
char*)iter + incr ) {
1694 *(To*)( ((
char*)iter) ) = (To)temp;
1700 template <
typename To>
1701 struct ConvertBasicType<BitsMarker,To> {
1706 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1707 iter = (
char*)iter + config->
fOffset;
1708 end = (
char*)end + config->
fOffset;
1709 for(; iter != end; iter = (
char*)iter + incr ) {
1716 *(To*)( ((
char*)iter) ) = (To)temp;
1722 template <
typename From,
typename To>
1723 struct ConvertBasicType<WithFactorMarker<From>,To> {
1727 TConfWithFactor *conf = (TConfWithFactor *)config;
1729 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1730 iter = (
char*)iter + config->
fOffset;
1731 end = (
char*)end + config->
fOffset;
1732 for(; iter != end; iter = (
char*)iter + incr ) {
1734 *(To*)( ((
char*)iter) ) = (To)temp;
1740 template <
typename From,
typename To>
1741 struct ConvertBasicType<NoFactorMarker<From>,To> {
1745 TConfNoFactor *conf = (TConfNoFactor *)config;
1747 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1748 iter = (
char*)iter + config->
fOffset;
1749 end = (
char*)end + config->
fOffset;
1750 for(; iter != end; iter = (
char*)iter + incr ) {
1752 *(To*)( ((
char*)iter) ) = (To)temp;
1758 template <
typename T>
1761 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1762 iter = (
char*)iter + config->
fOffset;
1763 end = (
char*)end + config->
fOffset;
1764 for(; iter != end; iter = (
char*)iter + incr ) {
1765 T *
x = (
T*) ((
char*) iter);
1771 template <Int_t (*iter_action)(TBuffer&,
void *,const TConfiguration*)>
1774 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1777 for(
void *iter = start; iter != end; iter = (
char*)iter + incr ) {
1778 iter_action(buf, iter, config);
1788 UInt_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1789 UInt_t n = (((
char*)end)-((
char*)start))/incr;
1790 char **arrptr =
new char*[
n];
1792 for(
void *iter = start; iter != end; iter = (
char*)iter + incr, ++i ) {
1793 arrptr[i] = (
char*)iter;
1825 UInt_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1826 UInt_t n = (((
char*)end)-((
char*)start))/incr;
1827 char **arrptr =
new char*[
n];
1829 for(
void *iter = start; iter != end; iter = (
char*)iter + incr, ++i ) {
1830 arrptr[i] = (
char*)iter;
1841 UInt_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1842 UInt_t n = (((
char*)end)-((
char*)start))/incr;
1843 char **arrptr =
new char*[
n];
1845 for(
void *iter = start; iter != end; iter = (
char*)iter + incr, ++i ) {
1846 arrptr[i] = (
char*)iter;
1853 template <
typename T>
1858 TConfigSTL *config = (TConfigSTL*)conf;
1860 buf.
ReadVersion(&start, &count, config->fOldClass);
1862 std::vector<T> *
const vec = (std::vector<T>*)(((
char*)addr)+config->fOffset);
1865 vec->resize(nvalues);
1867 #ifdef R__VISUAL_CPLUSPLUS 1873 T *begin = &(*vec->begin());
1884 TConfigSTL *config = (TConfigSTL*)conf;
1886 buf.
ReadVersion(&start, &count, config->fOldClass);
1888 std::vector<bool> *
const vec = (std::vector<bool>*)(((
char*)addr)+config->fOffset);
1891 vec->resize(nvalues);
1893 bool *items =
new bool[nvalues];
1895 for(
Int_t i = 0 ; i < nvalues; ++i) {
1896 (*vec)[i] = items[i];
1915 TConfigSTL *config = (TConfigSTL*)conf;
1917 buf.
ReadVersion(&start, &count, config->fOldClass);
1919 std::vector<float> *
const vec = (std::vector<float>*)(((
char*)addr)+config->fOffset);
1922 vec->resize(nvalues);
1924 #ifdef R__VISUAL_CPLUSPLUS 1930 float *begin = &(*vec->begin());
1941 TConfigSTL *config = (TConfigSTL*)conf;
1943 buf.
ReadVersion(&start, &count, config->fOldClass);
1945 std::vector<double> *
const vec = (std::vector<double>*)(((
char*)addr)+config->fOffset);
1948 vec->resize(nvalues);
1950 #ifdef R__VISUAL_CPLUSPLUS 1956 double *begin = &(*vec->begin());
1963 template <
typename From,
typename To>
1964 struct ConvertCollectionBasicType {
1969 TConfigSTL *config = (TConfigSTL*)conf;
1971 buf.
ReadVersion(&start, &count, config->fOldClass);
1973 std::vector<To> *
const vec = (std::vector<To>*)(((
char*)addr)+config->fOffset);
1976 vec->resize(nvalues);
1978 From *temp =
new From[nvalues];
1980 for(
Int_t ind = 0; ind < nvalues; ++ind) {
1981 (*vec)[ind] = (To)temp[ind];
1990 template <
typename From,
typename To>
1991 struct ConvertCollectionBasicType<NoFactorMarker<From>,To> {
1996 TConfigSTL *config = (TConfigSTL*)conf;
1998 buf.
ReadVersion(&start, &count, config->fOldClass);
2000 std::vector<To> *
const vec = (std::vector<To>*)(((
char*)addr)+config->fOffset);
2003 vec->resize(nvalues);
2005 From *temp =
new From[nvalues];
2007 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2008 (*vec)[ind] = (To)temp[ind];
2017 template <
typename To>
2022 TConfigSTL *config = (TConfigSTL*)conf;
2024 buf.
ReadVersion(&start, &count, config->fOldClass);
2026 std::vector<To> *
const vec = (std::vector<To>*)(((
char*)addr)+config->fOffset);
2029 vec->resize(nvalues);
2033 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2034 (*vec)[ind] = (To)temp[ind];
2044 struct VectorPtrLooper {
2046 template <
typename T>
2051 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2052 T *
x = (
T*)( ((
char*) (*(
void**)iter) ) + offset );
2058 template <
typename From,
typename To>
2059 struct ConvertBasicType {
2065 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2067 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
2074 template <
typename To>
2075 struct ConvertBasicType<BitsMarker,To> {
2081 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2088 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
2095 template <
typename From,
typename To>
2096 struct ConvertBasicType<WithFactorMarker<From>,To> {
2100 TConfWithFactor *conf = (TConfWithFactor *)config;
2103 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2105 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
2112 template <
typename From,
typename To>
2113 struct ConvertBasicType<NoFactorMarker<From>,To> {
2117 TConfNoFactor *conf = (TConfNoFactor *)config;
2120 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2122 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
2129 template <
typename T>
2134 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2135 T *
x = (
T*)( ((
char*) (*(
void**)iter) ) + offset );
2141 template <Int_t (*action)(TBuffer&,
void *,const TConfiguration*)>
2144 for(
void *iter = start; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2145 action(buf, *(
void**)iter, config);
2155 return GenericRead(buf,start,end,config);
2160 Int_t n = ( ((
void**)end) - ((
void**)iter) );
2161 char **arr = (
char**)iter;
2167 Int_t n = ( ((
void**)end) - ((
void**)iter) );
2168 char **arr = (
char**)iter;
2174 struct AssociativeLooper {
2176 template <
typename T>
2192 template <
typename T,
void (*action)(TBuffer&,
void *,Int_t)>
2197 TConfigSTL *config = (TConfigSTL*)conf;
2199 buf.
ReadVersion(&start, &count, config->fOldClass);
2201 TClass *newClass = config->fNewClass;
2207 void* alternative = newProxy->
Allocate(nvalues,
true);
2211 void *begin = &(startbuf[0]);
2212 void *end = &(endbuf[0]);
2213 config->fCreateIterators(alternative, &begin, &end, newProxy);
2217 action(buf,begin,nvalues);
2219 if (begin != &(startbuf[0])) {
2221 config->fDeleteTwoIterators(begin,end);
2224 newProxy->
Commit(alternative);
2232 return ReadNumericalCollection<bool,SimpleRead<bool> >(buf,addr,conf);
2237 return ReadNumericalCollection<Float_t,SimpleReadFloat16 >(buf,addr,conf);
2242 return ReadNumericalCollection<Double_t,SimpleReadDouble32 >(buf,addr,conf);
2245 template <
typename T>
2248 return ReadNumericalCollection<T,SimpleRead<T> >(buf,addr,conf);
2251 template <
typename From,
typename To>
2252 struct ConvertRead {
2255 From *temp =
new From[nvalues];
2257 To *vec = (To*)addr;
2258 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2259 vec[ind] = (To)temp[ind];
2265 template <
typename From,
typename To>
2266 struct ConvertRead<NoFactorMarker<From>,To> {
2269 From *temp =
new From[nvalues];
2271 To *vec = (To*)addr;
2272 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2273 vec[ind] = (To)temp[ind];
2279 template <
typename From,
typename To>
2280 struct ConvertRead<WithFactorMarker<From>,To> {
2283 From *temp =
new From[nvalues];
2286 To *vec = (To*)addr;
2287 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2288 vec[ind] = (To)temp[ind];
2294 template <
typename From,
typename To>
2295 struct ConvertCollectionBasicType {
2298 return ReadNumericalCollection<To,ConvertRead<From,To>::Action >(buf,addr,conf);
2304 struct GenericLooper {
2306 template <
typename T>
2309 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2311 Next_t next = loopconfig->fNext;
2315 void *iter = loopconfig->fCopyIterator(iterator,start);
2317 while( (addr = next(iter,end)) ) {
2318 T *
x = (
T*)( ((
char*)addr) + offset );
2321 if (iter != &iterator[0]) {
2322 loopconfig->fDeleteIterator(iter);
2327 template <
typename T>
2330 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2332 Next_t next = loopconfig->fNext;
2336 void *iter = loopconfig->fCopyIterator(iterator,start);
2338 while( (addr = next(iter,end)) ) {
2339 T *
x = (
T*)( ((
char*)addr) + offset );
2342 if (iter != &iterator[0]) {
2343 loopconfig->fDeleteIterator(iter);
2348 template <Int_t (*iter_action)(TBuffer&,
void *,const TConfiguration*)>
2351 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2354 Next_t next = loopconfig->fNext;
2357 void *iter = loopconfig->fCopyIterator(&iterator,start);
2359 while( (addr = next(iter,end)) ) {
2360 iter_action(buf, addr, config);
2362 if (iter != &iterator[0]) {
2363 loopconfig->fDeleteIterator(iter);
2368 template <
typename From,
typename To>
2370 static void ConvertAction(From *items,
void *start,
const void *end,
const TLoopConfiguration *loopconf,
const TConfiguration *config)
2372 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2375 Next_t next = loopconfig->fNext;
2378 void *iter = loopconfig->fCopyIterator(&iterator,start);
2380 while( (addr = next(iter,end)) ) {
2381 To *
x = (To*)( ((
char*)addr) + offset );
2385 if (iter != &iterator[0]) {
2386 loopconfig->fDeleteIterator(iter);
2391 template <
typename From,
typename To>
2393 static void ConvertAction(From *items,
void *start,
const void *end,
const TLoopConfiguration *loopconf,
const TConfiguration * )
2398 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2399 Next_t next = loopconfig->fNext;
2403 while( (addr = next(iter,end)) ) {
2404 To *
x = (To*)(addr);
2411 template <
typename From,
typename To,
template <
typename F,
typename T>
class Converter = Generic >
2412 struct ConvertBasicType {
2417 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2421 From *items =
new From[nvalues];
2423 Converter<From,To>::ConvertAction(items,start,end,loopconfig,config);
2429 template <
typename To>
2430 struct ConvertBasicType<BitsMarker, To, Generic> {
2435 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2440 UInt_t *items = items_storage;
2443 Next_t next = loopconfig->fNext;
2446 void *iter = loopconfig->fCopyIterator(&iterator,start);
2448 while( (addr = next(iter,end)) ) {
2453 To *
x = (To*)( ((
char*)addr) + offset );
2457 if (iter != &iterator[0]) {
2458 loopconfig->fDeleteIterator(iter);
2461 delete [] items_storage;
2466 template <
typename From,
typename To,
template <
typename F,
typename T>
class Converter >
2467 struct ConvertBasicType<WithFactorMarker<From>,To,Converter > {
2472 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2476 TConfSTLWithFactor *conf = (TConfSTLWithFactor *)config;
2478 From *items =
new From[nvalues];
2480 Converter<From,To>::ConvertAction(items,start,end,loopconfig,config);
2486 template <
typename From,
typename To,
template <
typename F,
typename T>
class Converter >
2487 struct ConvertBasicType<NoFactorMarker<From>,To,Converter > {
2492 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2496 TConfSTLNoFactor *conf = (TConfSTLNoFactor *)config;
2498 From *items =
new From[nvalues];
2500 Converter<From,To>::ConvertAction(items,start,end,loopconfig,config);
2511 return GenericRead(buf,start,end,loopconfig, config);
2516 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2523 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2528 template <
typename T>
2547 template <
typename ActionHolder>
2552 TConfigSTL *config = (TConfigSTL*)conf;
2554 buf.
ReadVersion(&start, &count, config->fOldClass);
2556 TClass *newClass = config->fNewClass;
2562 void* alternative = newProxy->
Allocate(nvalues,
true);
2566 void *begin = &(startbuf[0]);
2567 void *end = &(endbuf[0]);
2568 config->fCreateIterators(alternative, &begin, &end, newProxy);
2572 TGenericLoopConfig loopconf(newProxy,
kTRUE);
2573 ActionHolder::Action(buf,begin,end,&loopconf,config);
2575 if (begin != &(startbuf[0])) {
2577 config->fDeleteTwoIterators(begin,end);
2580 newProxy->
Commit(alternative);
2588 return ReadNumericalCollection<ConvertBasicType<bool,bool,Numeric > >(buf,addr,conf);
2593 return ReadNumericalCollection<ConvertBasicType<NoFactorMarker<float>,float,Numeric > >(buf,addr,conf);
2598 return ReadNumericalCollection<ConvertBasicType<float,double,Numeric > >(buf,addr,conf);
2603 template <
typename T>
2606 return ReadNumericalCollection<ConvertBasicType<T,T,Numeric > >(buf,addr,conf);
2609 template <
typename From,
typename To>
2610 struct ConvertCollectionBasicType {
2614 return ReadNumericalCollection<ConvertBasicType<From,To,Numeric > >(buf,addr,conf);
2621 template <
typename Looper,
typename From>
2649 template <
class Looper>
2669 case TStreamerInfo::kBits:
Error(
"GetNumericCollectionReadAction",
"There is no support for kBits outside of a TObject.");
break;
2671 TConfigSTL *alternate =
new TConfSTLNoFactor(conf,12);
2684 TConfigSTL *alternate =
new TConfSTLNoFactor(conf,0);
2700 Fatal(
"GetNumericCollectionReadAction",
"Is confused about %d",type);
2705 template <
typename Looper,
typename From>
2732 template <
typename Looper>
2737 return GetConvertCollectionReadActionFrom<Looper,Bool_t>(newtype, conf );
2740 return GetConvertCollectionReadActionFrom<Looper,Char_t>(newtype, conf );
2743 return GetConvertCollectionReadActionFrom<Looper,Short_t>(newtype, conf );
2746 return GetConvertCollectionReadActionFrom<Looper,Int_t>(newtype, conf );
2749 return GetConvertCollectionReadActionFrom<Looper,Long_t>(newtype, conf );
2752 return GetConvertCollectionReadActionFrom<Looper,Long64_t>(newtype, conf );
2755 return GetConvertCollectionReadActionFrom<Looper,Float_t>( newtype, conf );
2758 return GetConvertCollectionReadActionFrom<Looper,Double_t>(newtype, conf );
2761 return GetConvertCollectionReadActionFrom<Looper,UChar_t>(newtype, conf );
2764 return GetConvertCollectionReadActionFrom<Looper,UShort_t>(newtype, conf );
2767 return GetConvertCollectionReadActionFrom<Looper,UInt_t>(newtype, conf );
2770 return GetConvertCollectionReadActionFrom<Looper,ULong_t>(newtype, conf );
2773 return GetConvertCollectionReadActionFrom<Looper,ULong64_t>(newtype, conf );
2776 return GetConvertCollectionReadActionFrom<Looper,NoFactorMarker<Float16_t> >( newtype, conf );
2779 return GetConvertCollectionReadActionFrom<Looper,NoFactorMarker<Double32_t> >( newtype, conf );
2782 Error(
"GetConvertCollectionReadAction",
"There is no support for kBits outside of a TObject.");
2791 template <
class Looper>
2812 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_WithFactor<float> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2815 if (!nbits) nbits = 12;
2816 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_NoFactor<float> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2822 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_WithFactor<double> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2826 return TConfiguredAction( Looper::template ReadAction<ConvertBasicType<float,double>::Action >,
new TConfiguration(info,i,compinfo,offset) );
2828 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_NoFactor<double> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2846 return GetCollectionReadConvertAction<Looper,Bool_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2849 return GetCollectionReadConvertAction<Looper,Char_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2852 return GetCollectionReadConvertAction<Looper,Short_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2855 return GetCollectionReadConvertAction<Looper,Int_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2858 return GetCollectionReadConvertAction<Looper,Long_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2861 return GetCollectionReadConvertAction<Looper,Long64_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2864 return GetCollectionReadConvertAction<Looper,Float_t>( element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2867 return GetCollectionReadConvertAction<Looper,Double_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2870 return GetCollectionReadConvertAction<Looper,UChar_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2873 return GetCollectionReadConvertAction<Looper,UShort_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2876 return GetCollectionReadConvertAction<Looper,UInt_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2879 return GetCollectionReadConvertAction<Looper,ULong_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2882 return GetCollectionReadConvertAction<Looper,ULong64_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2885 return GetCollectionReadConvertAction<Looper,BitsMarker>(element->
GetNewType(),
new TBitsConfiguration(info,i,compinfo,offset) );
2889 return GetCollectionReadConvertAction<Looper,WithFactorMarker<float> >(element->
GetNewType(),
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2892 if (!nbits) nbits = 12;
2893 return GetCollectionReadConvertAction<Looper,NoFactorMarker<float> >(element->
GetNewType(),
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2899 return GetCollectionReadConvertAction<Looper,WithFactorMarker<double> >(element->
GetNewType(),
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2903 return GetCollectionReadConvertAction<Looper,Float_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2905 return GetCollectionReadConvertAction<Looper,NoFactorMarker<double> >(element->
GetNewType(),
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2911 return TConfiguredAction( Looper::GenericRead,
new TGenericConfiguration(info,i,compinfo) );
2918 template <
class Looper>
2937 return TConfiguredAction( Looper::GenericWrite,
new TConfiguration(info,i,compinfo,0 ) );
2966 if (fNumber >= infos->
GetSize()) {
2969 if (!infos->
At(fNumber)) {
2970 infos->
AddAt(
this, fNumber);
2974 assert(fComp == 0 && fCompFull == 0 && fCompOpt == 0);
2977 Int_t ndata = fElements->GetEntries();
2980 if (fReadObjectWise) fReadObjectWise->fActions.clear();
2983 if (fWriteObjectWise) fWriteObjectWise->fActions.clear();
2986 if (fReadMemberWise) fReadMemberWise->fActions.clear();
2989 if (fReadText) fReadText->fActions.clear();
2992 if (fWriteMemberWise) fWriteMemberWise->fActions.clear();
2995 if (fReadMemberWiseVecPtr) fReadMemberWiseVecPtr->fActions.clear();
2998 if (fWriteMemberWiseVecPtr) fWriteMemberWiseVecPtr->fActions.clear();
3001 if (fWriteText) fWriteText->fActions.clear();
3013 fCompOpt[0] = fCompFull[0] = &(fComp[0]);
3021 fNslots = ndata + ndata/2 + 1;
3033 if (!CanOptimize()) {
3034 SetBit(kCannotOptimize);
3040 for (i = 0; i < ndata; ++i) {
3050 fComp[fNdata].fType = element->
GetType();
3051 fComp[fNdata].fNewType = element->
GetNewType();
3052 fComp[fNdata].fOffset = element->
GetOffset();
3054 fComp[fNdata].fElem = element;
3055 fComp[fNdata].fMethod = element->
GetMethod();
3062 if (!TestBit(kCannotOptimize)
3066 && (fComp[fNdata].
fType == fComp[fNdata].fNewType)
3067 && (fComp[keep].fMethod == 0)
3070 && (fComp[keep].
fType < kObject)
3073 && ((element->
GetOffset()-fComp[keep].fOffset) == (fComp[keep].fLength)*asize)
3074 && ((fOldVersion<6) || !previous ||
3085 if (!previousOptimized) {
3088 fComp[fNslots - (++optiOut) ] = fComp[keep];
3089 fCompFull[fNfulldata-1] = &(fComp[fNslots - optiOut]);
3091 fComp[fNslots - (++optiOut) ] = fComp[fNdata];
3092 fCompFull[fNfulldata] = &(fComp[fNslots - optiOut]);
3094 R__ASSERT( keep < (fNslots - optiOut) );
3096 if (fComp[keep].fLength == 0) {
3097 fComp[keep].fLength++;
3099 fComp[keep].fLength++;
3101 isOptimized =
kTRUE;
3102 previousOptimized =
kTRUE;
3103 }
else if (element->
GetType() < 0) {
3113 fComp[fNslots - (++optiOut) ] = fComp[fNdata];
3114 fCompFull[fNfulldata] = &(fComp[fNslots - optiOut]);
3116 previousOptimized =
kFALSE;
3119 if (fComp[fNdata].fNewType != fComp[fNdata].
fType) {
3120 if (fComp[fNdata].fNewType > 0) {
3121 if ( (fComp[fNdata].fNewType == kObjectp || fComp[fNdata].fNewType == kAnyp
3122 || fComp[fNdata].fNewType == kObject || fComp[fNdata].fNewType == kAny
3123 || fComp[fNdata].fNewType == kTObject || fComp[fNdata].fNewType == kTNamed || fComp[fNdata].fNewType == kTString)
3124 && (fComp[fNdata].fType == kObjectp || fComp[fNdata].fType == kAnyp
3125 || fComp[fNdata].fType == kObject || fComp[fNdata].fType == kAny
3126 || fComp[fNdata].fType == kTObject || fComp[fNdata].fType == kTNamed || fComp[fNdata].fType == kTString )
3128 fComp[fNdata].fType = fComp[fNdata].fNewType;
3129 }
else if (fComp[fNdata].fType !=
kCounter) {
3130 fComp[fNdata].fType += kConv;
3133 if (fComp[fNdata].fType ==
kCounter) {
3134 Warning(
"Compile",
"Counter %s should not be skipped from class %s", element->
GetName(),
GetName());
3136 fComp[fNdata].fType += kSkip;
3139 fCompOpt[fNdata] = &(fComp[fNdata]);
3140 fCompFull[fNfulldata] = &(fComp[fNdata]);
3142 R__ASSERT( fNdata < (fNslots - optiOut) );
3145 if (fComp[keep].fLength == 0) {
3146 fComp[keep].fLength = 1;
3149 previousOptimized =
kFALSE;
3159 for (i = 0; i < fNdata; ++i) {
3160 if (!fCompOpt[i]->fElem || fCompOpt[i]->fElem->GetType()< 0) {
3163 AddReadAction(fReadObjectWise, i, fCompOpt[i]);
3164 AddWriteAction(fWriteObjectWise, i, fCompOpt[i]);
3166 for (i = 0; i < fNfulldata; ++i) {
3167 if (!fCompFull[i]->fElem || fCompFull[i]->fElem->GetType()< 0) {
3170 AddReadAction(fReadMemberWise, i, fCompFull[i]);
3171 AddWriteAction(fWriteMemberWise, i, fCompFull[i]);
3172 AddReadMemberWiseVecPtrAction(fReadMemberWiseVecPtr, i, fCompFull[i]);
3173 AddWriteMemberWiseVecPtrAction(fWriteMemberWiseVecPtr, i, fCompFull[i]);
3175 AddReadTextAction(fReadText, i, fCompFull[i]);
3176 AddWriteTextAction(fWriteText, i, fCompFull[i]);
3180 fOptimized = isOptimized;
3188 template <
typename From>
3220 switch (compinfo->
fType) {
3238 readSequence->
AddAction( ReadBasicType_WithFactor<float>,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
3241 if (!nbits) nbits = 12;
3242 readSequence->
AddAction( ReadBasicType_NoFactor<float>,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
3248 readSequence->
AddAction( ReadBasicType_WithFactor<double>,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
3252 readSequence->
AddAction( ConvertBasicType<float,double>::Action,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3254 readSequence->
AddAction( ReadBasicType_NoFactor<double>,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
3271 if (newClass && newClass != oldClass) {
3273 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3275 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase));
3279 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3281 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetTypeName(),isSTLbase));
3285 if (newClass && newClass != oldClass) {
3287 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3290 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase));
3294 readSequence->
AddAction(GetConvertCollectionReadAction<VectorLooper>(oldClass->
GetCollectionProxy()->
GetType(), newClass->
GetCollectionProxy()->
GetType(),
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase)));
3297 readSequence->
AddAction(GetConvertCollectionReadAction<AssociativeLooper>(oldClass->
GetCollectionProxy()->
GetType(), newClass->
GetCollectionProxy()->
GetType(),
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase)));
3303 readSequence->
AddAction(GetConvertCollectionReadAction<GenericLooper>(oldClass->
GetCollectionProxy()->
GetType(), newClass->
GetCollectionProxy()->
GetType(),
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase)));
3310 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3313 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetTypeName(),isSTLbase));
3335 if (newClass && newClass != oldClass) {
3337 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3339 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetTypeName(),isSTLbase));
3343 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3345 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetTypeName(),isSTLbase));
3349 if (newClass && newClass != oldClass) {
3351 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3353 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetTypeName(),isSTLbase));
3357 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3359 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetTypeName(),isSTLbase));
3368 AddReadConvertAction<Bool_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3371 AddReadConvertAction<Char_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3374 AddReadConvertAction<Short_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3377 AddReadConvertAction<Int_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3380 AddReadConvertAction<Long_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3383 AddReadConvertAction<Long64_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3386 AddReadConvertAction<Float_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3389 AddReadConvertAction<Double_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3392 AddReadConvertAction<UChar_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3395 AddReadConvertAction<UShort_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3398 AddReadConvertAction<UInt_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3401 AddReadConvertAction<ULong_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3404 AddReadConvertAction<ULong64_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3407 AddReadConvertAction<BitsMarker>(readSequence, compinfo->
fNewType,
new TBitsConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3411 AddReadConvertAction<WithFactorMarker<float> >(readSequence, compinfo->
fNewType,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
3414 if (!nbits) nbits = 12;
3415 AddReadConvertAction<NoFactorMarker<float> >(readSequence, compinfo->
fNewType,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
3421 AddReadConvertAction<WithFactorMarker<double> >(readSequence, compinfo->
fNewType,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
3425 AddReadConvertAction<Float_t>(readSequence, compinfo->
fNewType,
new TConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3427 AddReadConvertAction<NoFactorMarker<double> >(readSequence, compinfo->
fNewType,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
3433 readSequence->AddAction(
GenericReadAction,
new TGenericConfiguration(
this,i,compinfo) );
3455 switch (compinfo->
fType) {
3482 readSequence->
AddAction(ReadSTLp<true>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3487 readSequence->
AddAction(ReadStreamerLoop<true>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3496 default:
generic =
kTRUE;
break;
3523 readSequence->
AddAction( GetCollectionReadAction<VectorPtrLooper>(
this,element,compinfo->
fType,i,compinfo,compinfo->
fOffset) );
3540 switch (compinfo->
fType) {
3624 #if defined(CDJ_NO_COMPILE) 3627 writeSequence->
fActions.pop_back();
3649 switch (compinfo->
fType) {
3652 writeSequence->
AddAction(WriteBasicType<Bool_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3655 writeSequence->
AddAction(WriteBasicType<Char_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3658 writeSequence->
AddAction(WriteBasicType<Short_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3661 writeSequence->
AddAction(WriteBasicType<Int_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3664 writeSequence->
AddAction(WriteBasicType<Long_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3667 writeSequence->
AddAction(WriteBasicType<Long64_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3670 writeSequence->
AddAction(WriteBasicType<Float_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3673 writeSequence->
AddAction(WriteBasicType<Double_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3676 writeSequence->
AddAction(WriteBasicType<UChar_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3679 writeSequence->
AddAction(WriteBasicType<UShort_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3682 writeSequence->
AddAction(WriteBasicType<UInt_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3685 writeSequence->
AddAction(WriteBasicType<ULong_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3688 writeSequence->
AddAction(WriteBasicType<ULong64_t>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3708 writeSequence->
AddAction(WriteSTLp<true>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3713 writeSequence->
AddAction(WriteStreamerLoop<true>,
new TConfiguration(
this, i, compinfo, compinfo->
fOffset));
3804 default:
generic =
kTRUE;
break;
3820 #if defined(CDJ_NO_COMPILE) 3823 writeSequence->
fActions.pop_back();
3845 #if defined(CDJ_NO_COMPILE) 3850 writeSequence->Addaction( GetCollectionWriteAction<VectorPtrLooper>(
this,element,compinfo->
fType,i,compinfo,compinfo->
fOffset) );
3853 writeSequence->
AddAction( VectorPtrLooper::GenericWrite,
new TGenericConfiguration(
this,i,compinfo) );
3896 for (
UInt_t i = 0; i < ndata; ++i) {
3920 ::Warning(
"CreateReadMemberWiseActions",
"%s",
3936 if (newType != oldType) {
3954 TConfiguredAction action( GetCollectionReadAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
3957 sequence->
AddAction( GetCollectionReadAction<VectorLooper>(info,element,oldType,i,compinfo,offset));
3964 TConfiguredAction action( GetCollectionReadAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
3967 sequence->
AddAction( GetCollectionReadAction<GenericLooper>(info,element,oldType,i,compinfo,offset) );
4011 for (
UInt_t i = 0; i < ndata; ++i) {
4039 #if defined(CDJ_NO_COMPILE) 4042 if (newType != oldType) {
4058 TConfiguredAction action( GetCollectionWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
4061 sequence->
AddAction(GetCollectionWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset));
4070 TConfiguredAction action( GetWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
4091 sequence->
AddAction( GenericLooper<WriteBasicType_WithFactor<float> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
4094 if (!nbits) nbits = 12;
4095 sequence->
AddAction( GenericLooper<WriteBasicType_NoFactor<float> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
4101 sequence->
AddAction( GenericLooper<WriteBasicType_WithFactor<double> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
4105 sequence->
AddAction( GenericLooper<ConvertBasicType<float,double> >,
new TConfiguration(info,i,compinfo,offset) );
4107 sequence->
AddAction( GenericLooper<WriteBasicType_NoFactor<double> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
4128 sequence->
AddAction( GetCollectionWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
4145 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4146 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4150 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4151 iter->fConfiguration->AddToOffset(delta);
4163 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4164 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4168 TConfiguration *conf = iter->fConfiguration->
Copy();
4169 sequence->
AddAction( iter->fAction, conf );
4179 for(
UInt_t id = 0;
id < element_ids.size(); ++
id) {
4180 if ( element_ids[
id].fElemID < 0 ) {
4181 if (element_ids[
id].fNestedIDs) {
4182 auto original = create(element_ids[
id].fNestedIDs->fInfo,
4185 if (element_ids[
id].fNestedIDs->fOnfileObject) {
4186 auto conf =
new TConfigurationPushDataCache(element_ids[
id].fNestedIDs->fInfo, element_ids[
id].fNestedIDs->fOnfileObject, offset);
4193 original->AddToSubSequence(sequence, element_ids[
id].fNestedIDs->fIDs, element_ids[
id].fNestedIDs->fOffset, create);
4195 if (element_ids[
id].fNestedIDs->fOnfileObject)
4197 new TConfigurationPushDataCache(element_ids[
id].fNestedIDs->fInfo,
nullptr, element_ids[
id].fNestedIDs->fOffset) );
4199 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4200 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4204 TConfiguration *conf = iter->fConfiguration->
Copy();
4205 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4207 sequence->
AddAction( iter->fAction, conf );
4212 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4213 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4225 if ( iter->fConfiguration->fElemId == (
UInt_t)element_ids[
id].fElemID ) {
4226 TConfiguration *conf = iter->fConfiguration->
Copy();
4227 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4229 sequence->
AddAction( iter->fAction, conf );
4246 AddToSubSequence(sequence, element_ids, offset, create);
4260 for(
UInt_t id = 0;
id < element_ids.size(); ++
id) {
4261 if ( element_ids[
id] < 0 ) {
4262 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4263 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4267 TConfiguration *conf = iter->fConfiguration->
Copy();
4268 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4270 sequence->
AddAction( iter->fAction, conf );
4273 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4274 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4277 if ( iter->fConfiguration->fElemId == (
UInt_t)element_ids[
id] ) {
4278 TConfiguration *conf = iter->fConfiguration->
Copy();
4279 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4281 sequence->
AddAction( iter->fAction, conf );
4289 #if !defined(R__WIN32) && !defined(_AIX) 4298 #if defined(R__WIN32) || defined(__CYGWIN__) || defined(_AIX) 4299 return "not available on this platform";
4301 MEMORY_BASIC_INFORMATION mbi;
4302 if (!VirtualQuery (func, &mbi,
sizeof (mbi)))
4307 HMODULE hMod = (HMODULE) mbi.AllocationBase;
4308 static char moduleName[MAX_PATH];
4310 if (!GetModuleFileNameA (hMod, moduleName,
sizeof (moduleName)))
4318 if (dladdr((
void*)func,&info)==0) {
4320 return "name not found";
4323 return info.dli_sname;
4335 fLoopConfig->Print();
4337 TStreamerInfoActions::ActionContainer_t::const_iterator end = fActions.end();
4338 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = fActions.begin();
4342 iter->fConfiguration->Print();
4343 if (strstr(opt,
"func")) {
Describe Streamer information for one class version.
virtual const char * GetName() const
Returns name of object.
std::string GetName(const std::string &scope_name)
void SetBufferOffset(Int_t offset=0)
virtual Int_t GetCollectionType() const =0
void AddReadTextAction(TStreamerInfoActions::TActionSequence *readSequence, Int_t index, TCompInfo *compinfo)
Add a read text action for the given element.
virtual UInt_t GetUniqueID() const
Return the unique object id.
INLINE_TEMPLATE_ARGS Int_t ReadTextTObjectBase(TBuffer &buf, void *addr, const TConfiguration *config)
INLINE_TEMPLATE_ARGS Int_t ReadBasicType_WithFactor(TBuffer &buf, void *addr, const TConfiguration *config)
void PutObjectWithID(TObject *obj, UInt_t uid=0)
stores the object at the uid th slot in the table of objects The object uniqued is set as well as its...
Int_t ReadBufferSkip(TBuffer &b, const T &arrptr, const TCompInfo *compinfo, Int_t kase, TStreamerElement *aElement, Int_t narr, Int_t eoffset)
Skip an element.
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
static Bool_t GetStreamMemberWise()
Return whether the TStreamerInfos will save the collections in "member-wise" order whenever possible...
INLINE_TEMPLATE_ARGS Int_t ReadTextObject(TBuffer &buf, void *addr, const TConfiguration *config)
virtual void * Allocate(UInt_t n, Bool_t forceDelete)=0
TVirtualStreamerInfo * fInfo
TStreamerInfo form which the action is derived.
static void AddReadConvertAction(TStreamerInfoActions::TActionSequence *sequence, Int_t newtype, TConfiguration *conf)
virtual void AddToOffset(Int_t delta)
static TConfiguredAction GetConvertCollectionReadActionFrom(Int_t newtype, TConfiguration *conf)
ActionContainer_t fActions
virtual TStreamerInfoActions::TActionSequence * GetReadMemberWiseActions(Int_t version)=0
virtual Int_t GetProperties() const
void AddReadMemberWiseVecPtrAction(TStreamerInfoActions::TActionSequence *readSequence, Int_t index, TCompInfo *compinfo)
Add a read action for the given element.
void Fatal(const char *location, const char *msgfmt,...)
INLINE_TEMPLATE_ARGS Int_t ReadSTL(TBuffer &buf, void *addr, const TConfiguration *conf)
std::vector< TIDNode > TIDs
TLoopConfiguration * fLoopConfig
If this is a bundle of memberwise streaming action, this configures the looping.
void AddReadAction(TStreamerInfoActions::TActionSequence *readSequence, Int_t index, TCompInfo *compinfo)
Add a read action for the given element.
Equal to TDataType's kchar.
static void * CopyIterator(void *dest, const void *source)
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...
INLINE_TEMPLATE_ARGS Int_t WriteTextBaseClass(TBuffer &buf, void *addr, const TConfiguration *config)
virtual TStreamerInfoActions::TActionSequence * GetConversionReadMemberWiseActions(TClass *oldClass, Int_t version)=0
virtual TClass * GetValueClass() const =0
void AddAction(action_t action, TConfiguration *conf)
TObject * GetParent() const
Return pointer to parent of this buffer.
static void * Next(void *iter, const void *end)
INLINE_TEMPLATE_ARGS Int_t ReadTextStreamer(TBuffer &buf, void *addr, const TConfiguration *config)
R__EXTERN TVirtualMutex * gInterpreterMutex
T ReadBuffer(TBufferFile *buf)
One of the template functions used to read objects from messages.
virtual void PrintDebug(TBuffer &buffer, void *object) const
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
INLINE_TEMPLATE_ARGS Int_t WriteTextStreamer(TBuffer &buf, void *addr, const TConfiguration *config)
static TConfiguredAction GetNumericCollectionReadAction(Int_t type, TConfigSTL *conf)
INLINE_TEMPLATE_ARGS Int_t ReadBasicType< BitsMarker >(TBuffer &buf, void *addr, const TConfiguration *config)
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
INLINE_TEMPLATE_ARGS Int_t ReadBasicType_NoFactor(TBuffer &buf, void *addr, const TConfiguration *config)
TMemberStreamer * GetStreamer() const
Return the local streamer object.
virtual void Commit(void *)=0
INLINE_TEMPLATE_ARGS Int_t UseCacheVectorLoop(TBuffer &b, void *start, const void *end, const TLoopConfiguration *loopconf, const TConfiguration *conf)
Buffer base class used for serializing objects.
INLINE_TEMPLATE_ARGS Int_t ReadTObject(TBuffer &buf, void *addr, const TConfiguration *config)
virtual TClass * GetCollectionClass() const
virtual void Print() const
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual UInt_t WriteVersionMemberWise(const TClass *cl, Bool_t useBcnt=kFALSE)=0
void AddWriteAction(TStreamerInfoActions::TActionSequence *writeSequence, Int_t index, TCompInfo *compinfo)
UInt_t fElemId
Identifier of the TStreamerElement.
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Int_t GetArrayLength() const
Cache the value in memory than is not part of the object but is accessible via a SchemaRule.
virtual UShort_t GetPidOffset() const =0
void AddWriteMemberWiseVecPtrAction(TStreamerInfoActions::TActionSequence *writeSequence, Int_t index, TCompInfo *compinfo)
This is for streaming via a TClonesArray (or a vector of pointers of this type).
virtual DeleteIterator_t GetFunctionDeleteIterator(Bool_t read=kTRUE)=0
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
TObject * At(Int_t idx) const
Int_t GetArrayDim() const
INLINE_TEMPLATE_ARGS Int_t ReadTString(TBuffer &buf, void *addr, const TConfiguration *config)
virtual EDataType GetType() const =0
void GetSequenceType(TString &type) const
Fill type with the string representation of sequence information including 'cached','repeat','write' or 'nodelete'.
void *(* CopyIterator_t)(void *dest, const void *source)
Int_t PushDataCache(TBuffer &b, void *, const TConfiguration *conf)
INLINE_TEMPLATE_ARGS void ReadArraySTLMemberWiseSameClass(TBuffer &buf, void *addr, const TConfiguration *conf, Version_t vers)
TCompInfo ** fCompFull
![fElements->GetEntries()]
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
static TActionSequence * CreateReadMemberWiseActions(TVirtualStreamerInfo *info, TVirtualCollectionProxy &proxy)
Create the bundle of the actions necessary for the streaming memberwise of the content described by '...
void DeleteArray(void *ary, Bool_t dtorOnly=kFALSE)
Explicitly call operator delete[] for an array.
virtual void ReadInt(Int_t &i)=0
TVirtualCollectionProxy::Next_t Next_t
void AddToSubSequence(TActionSequence *sequence, const TIDs &element_ids, Int_t offset, SequenceGetter_t create)
TActionSequence * CreateSubSequence(const std::vector< Int_t > &element_ids, size_t offset)
void(* DeleteIterator_t)(void *iter)
INLINE_TEMPLATE_ARGS void ReadSTLMemberWiseChangedClass(TBuffer &buf, void *addr, const TConfiguration *conf, Version_t vers)
static TConfiguredAction GetCollectionReadAction(TVirtualStreamerInfo *info, TStreamerElement *element, Int_t type, UInt_t i, TStreamerInfo::TCompInfo_t *compinfo, Int_t offset)
TActionSequence * CreateCopy()
INLINE_TEMPLATE_ARGS Int_t WriteStreamerLoop(TBuffer &buf, void *addr, const TConfiguration *config)
Direct copy of code from TStreamerInfo::WriteBufferAux, potentially can be used later for non-text st...
virtual void ReadWithNbits(Float_t *ptr, Int_t nbits)=0
virtual Int_t GetClassVersion() const =0
INLINE_TEMPLATE_ARGS Int_t WriteBasicType(TBuffer &buf, void *addr, const TConfiguration *config)
virtual const char * ClassName() const
Returns name of class to which the object belongs.
char * GetObjectAt(UInt_t ind) const
virtual TProcessID * ReadProcessID(UShort_t pidf)=0
Return the current Process-ID.
void AddWriteTextAction(TStreamerInfoActions::TActionSequence *writeSequence, Int_t index, TCompInfo *compinfo)
virtual void Copy(TObject &object) const
Copy this to obj.
void Init(TClassEdit::TInterpreterLookupHelper *helper)
INLINE_TEMPLATE_ARGS Int_t ReadSTLp(TBuffer &buf, void *addr, const TConfiguration *config)
Direct copy of code from TStreamerInfo::WriteBufferAux, potentially can be used later for non-text st...
Int_t WriteLoopInvalid(TBuffer &, void *, const void *, const TConfiguration *config)
TMemberStreamer * fStreamer
Not Owned.
void * NewArray(Long_t nElements, ENewType defConstructor=kClassNew) const
Return a pointer to a newly allocated array of objects of this class.
A TProcessID identifies a ROOT job in a unique way in time and space.
Int_t PushDataCacheGenericCollection(TBuffer &b, void *, const void *, const TLoopConfiguration *loopconfig, const TConfiguration *conf)
Base class of the Configurations for the member wise looping routines.
Int_t ReadLoopInvalid(TBuffer &, void *, const void *, const TConfiguration *config)
void Error(const char *location, const char *msgfmt,...)
virtual DeleteTwoIterators_t GetFunctionDeleteTwoIterators(Bool_t read=kTRUE)=0
virtual CreateIterators_t GetFunctionCreateIterators(Bool_t read=kTRUE)=0
Int_t GenericWriteAction(TBuffer &buf, void *addr, const TConfiguration *config)
ESelectLooper SelectLooper(TVirtualCollectionProxy &proxy)
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
INLINE_TEMPLATE_ARGS void ReadSTLObjectWiseFastArray(TBuffer &buf, void *addr, const TConfiguration *conf, Version_t, UInt_t)
virtual Version_t ReadVersionForMemberWise(const TClass *cl=0)=0
static TConfiguredAction GetCollectionReadConvertAction(Int_t newtype, TConfiguration *conf)
virtual TVirtualCollectionProxy * GetCollectionProxy() const
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
TClass * GetClass() const
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=0)=0
static TConfiguredAction GetCollectionWriteAction(TVirtualStreamerInfo *info, TStreamerElement *, Int_t type, UInt_t i, TStreamerInfo::TCompInfo_t *compinfo, Int_t offset)
virtual Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object)=0
void(* CreateIterators_t)(void *collection, void **begin_arena, void **end_arena, TVirtualCollectionProxy *proxy)
Int_t fOffset
Offset within the object.
virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue)=0
virtual TLoopConfiguration * Copy() const =0
virtual Bool_t HasPointers() const =0
static TActionSequence * CreateWriteMemberWiseActions(TVirtualStreamerInfo *info, TVirtualCollectionProxy &proxy)
Create the bundle of the actions necessary for the streaming memberwise of the content described by '...
virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=0)=0
virtual void Print() const
INLINE_TEMPLATE_ARGS Int_t WriteSTLp(TBuffer &buf, void *addr, const TConfiguration *config)
Direct copy of code from TStreamerInfo::WriteBufferAux, potentially can be used later for non-text st...
Int_t Size() const
Return size of object of this class.
INLINE_TEMPLATE_ARGS Int_t WriteTextTObject(TBuffer &buf, void *addr, const TConfiguration *config)
virtual TVirtualArray * PeekDataCache() const
Return the 'current' data cache area from the list of area to be used for temporarily store 'missing'...
virtual void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue)=0
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
char * Strip(const char *str, char c=' ')
Strip leading and trailing c (blanks by default) from a string.
TStreamerInfoActions::TActionSequence * GetReadMemberWiseActions(Bool_t forCollection)
INLINE_TEMPLATE_ARGS void ReadSTLObjectWiseStreamer(TBuffer &buf, void *addr, const TConfiguration *conf, Version_t, UInt_t)
void Warning(const char *location, const char *msgfmt,...)
INLINE_TEMPLATE_ARGS Int_t ReadBasicType(TBuffer &buf, void *addr, const TConfiguration *config)
TClass * fClass
Not Owned.
static const Int_t fgIteratorArenaSize
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
INLINE_TEMPLATE_ARGS Int_t UseCacheGenericCollection(TBuffer &b, void *, const void *, const TLoopConfiguration *loopconfig, const TConfiguration *conf)
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=0) const
virtual void WriteFastArray(const Bool_t *b, Int_t n)=0
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
INLINE_TEMPLATE_ARGS void ReadSTLObjectWiseStreamerV2(TBuffer &buf, void *addr, const TConfiguration *conf, Version_t vers, UInt_t start)
virtual void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=0)=0
TStreamerElement * fElem
Not Owned.
virtual ULong_t GetIncrement() const =0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
Base class for text-based streamers like TBufferJSON or TBufferXML Special actions list will use meth...
void HandleReferencedTObject(TBuffer &buf, void *addr, const TConfiguration *config)
void Copy(void *source, void *dest)
virtual TVirtualArray * PopDataCache()
Pop and Return the 'current' data cache area from the list of area to be used for temporarily store '...
void Print(Option_t *="") const
This method must be overridden when a class wants to print itself.
#define INLINE_TEMPLATE_ARGS
void Print(std::ostream &os, const OptionType &opt)
virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits)=0
INLINE_TEMPLATE_ARGS Int_t ReadStreamerLoop(TBuffer &buf, void *addr, const TConfiguration *config)
Direct copy of code from TStreamerInfo::WriteBufferAux, potentially can be used later for non-text st...
virtual TObjArray * GetElements() const =0
INLINE_TEMPLATE_ARGS Int_t WriteTextTNamed(TBuffer &buf, void *addr, const TConfiguration *config)
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
INLINE_TEMPLATE_ARGS Int_t UseCache(TBuffer &b, void *addr, const TConfiguration *conf)
Double_t GetFactor() const
virtual Int_t GetSize() const
Returns size of this element in bytes.
static const Int_t kRegrouped
virtual Bool_t HasCounter() const
virtual Bool_t IsBase() const
Return kTRUE if the element represent a base class.
static void DeleteIterator(void *iter)
#define R__LOCKGUARD(mutex)
static TConfiguredAction GetConvertCollectionReadAction(Int_t oldtype, Int_t newtype, TConfiguration *conf)
virtual void PushDataCache(TVirtualArray *)
Push a new data cache area onto the list of area to be used for temporarily store 'missing' data memb...
Int_t PopDataCacheGenericCollection(TBuffer &b, void *, const void *, const TLoopConfiguration *, const TConfiguration *)
void Compile()
loop on the TStreamerElement list regroup members with same type Store predigested information into l...
virtual CopyIterator_t GetFunctionCopyIterator(Bool_t read=kTRUE)=0
Mother of all ROOT objects.
SequencePtr(*)(TStreamerInfo *info, TVirtualCollectionProxy *collectionProxy, TClass *originalClass) SequenceGetter_t
virtual UInt_t Size() const =0
typedef void((*Func_t)())
INLINE_TEMPLATE_ARGS Int_t ReadTextTObject(TBuffer &buf, void *addr, const TConfiguration *config)
INLINE_TEMPLATE_ARGS void ReadSTLObjectWiseFastArrayV2(TBuffer &buf, void *addr, const TConfiguration *conf, Version_t vers, UInt_t start)
const char * GetTypeName() const
INLINE_TEMPLATE_ARGS Int_t ReadTNamed(TBuffer &buf, void *addr, const TConfiguration *config)
TClass * GetNewClass() const
INLINE_TEMPLATE_ARGS void ReadArraySTLMemberWiseChangedClass(TBuffer &buf, void *addr, const TConfiguration *conf, Version_t vers)
static const char * R__GetSymbolName(voidfunc func)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Int_t GetEntries() const
Return the number of objects in array (i.e.
INLINE_TEMPLATE_ARGS Int_t UseCacheVectorPtrLoop(TBuffer &b, void *start, const void *end, const TConfiguration *conf)
void *(* Next_t)(void *iter, const void *end)
virtual ULong_t GetMethod() const
Int_t GenericReadAction(TBuffer &buf, void *addr, const TConfiguration *config)
const char * GetErrorMessage() const
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Abstract Interface class describing Streamer information for one class.
Int_t ReadBufferSTL(TBuffer &b, TVirtualCollectionProxy *cont, Int_t nc, Int_t eoffset, Bool_t v7=kTRUE)
The STL vector/list is deserialized from the buffer b.
void(* DeleteTwoIterators_t)(void *begin, void *end)
INLINE_TEMPLATE_ARGS Int_t ReadTextBaseClass(TBuffer &buf, void *addr, const TConfiguration *config)
Base class of the Configurations.
UInt_t fLength
Number of element in a fixed length array.
INLINE_TEMPLATE_ARGS void ReadSTLMemberWiseSameClass(TBuffer &buf, void *addr, const TConfiguration *conf, Version_t vers)
INLINE_TEMPLATE_ARGS Int_t ReadTextTNamed(TBuffer &buf, void *addr, const TConfiguration *config)
TStreamerInfoActions::TActionSequence * GetWriteMemberWiseActions(Bool_t forCollection)
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual const char * GetTitle() const
Returns title of object.
Int_t PopDataCache(TBuffer &b, void *, const TConfiguration *)
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
void AddToOffset(Int_t delta)
TCompInfo_t * fCompInfo
Access to compiled information (for legacy code)