39 # define INLINE_TEMPLATE_ARGS
41 # define INLINE_TEMPLATE_ARGS inline
54 return isEmulated || (isVector && hasDefaultAlloc);
57 template <
typename From>
58 struct WithFactorMarker {
62 template <
typename From>
63 struct NoFactorMarker {
105 printf(
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d,"
106 " %s, offset=%d (%s)\n",
122 printf(
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d,"
123 " %s, bufpos=%d, arr=%p, offset=%d (%s)\n",
133 printf(
"TLoopConfiguration: unconfigured\n");
142 void PrintDebug(
TBuffer &,
void *)
const {
158 void PrintDebug(
TBuffer &,
void *)
const {
164 printf(
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d,"
165 " %s, offset=%d (%s)\n",
170 void AddToOffset(
Int_t delta)
192 char *obj = (
char*)addr;
193 TGenericConfiguration *conf = (TGenericConfiguration*)config;
199 char *obj = (
char*)addr;
200 TGenericConfiguration *conf = (TGenericConfiguration*)config;
201 return ((
TStreamerInfo*)conf->fInfo)->WriteBufferAux(buf, &obj, &(conf->fCompInfo), 0, 1, 1, config->
fOffset, 2);
204 template <
typename T>
207 T *
x = (
T*)( ((
char*)addr) + config->
fOffset );
214 TBitsConfiguration *conf = (TBitsConfiguration*)config;
226 uid = ( obj->
GetUniqueID() & 0xffffff) + (gpid<<24);
247 template <
typename T>
250 T *
x = (
T *)(((
char *)addr) + config->
fOffset);
258 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
266 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
274 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
282 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
286 buf.SetByteCount(pos,
kTRUE);
292 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
299 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
306 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
314 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
327 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
334 void *
x = (
void *)(((
char *)addr) + config->
fOffset);
341 template<
bool kIsTextT>
366 char **contp = (
char **)((
char *)addr + ioffset);
368 char *cont = contp[j];
370 Int_t nobjects = cont ? proxy->
Size() : 0;
384 }
else if (pstreamer ==
nullptr) {
386 char **contp = (
char **)((
char *)addr + ioffset);
388 char *cont = contp[j];
404 template<
bool kIsTextT>
427 if( vers < 9 && newClass && newClass!=oldClass ) {
428 Error(
"ReadBuffer",
"Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
452 void **contp = (
void**)((
char *) addr + ioffset);
454 void *cont = contp[j];
456 contp[j] = cle->
New();
462 env = newProxy->
Allocate(nobjects,
true);
475 }
else if (pstreamer ==
nullptr) {
477 void **contp = (
void **)((
char *)addr + ioffset);
479 void *cont = contp[j];
480 if (cont ==
nullptr) {
485 contp[j] = cle->
New();
501 template<
bool kIsTextT>
518 (*pstreamer)(buf, (
char *) addr + ioffset , *counter);
520 buf.SetByteCount(pos,
kTRUE);
538 fileVersion =
file->GetVersion();
543 if (fileVersion > 51508) {
553 char** pp = (
char**) ((
char *) addr + ioffset );
592 char** pp = (
char**) ((
char *) addr + ioffset );
616 char**
r = (
char**) pp[ndx];
634 template<
bool kIsTextT>
657 (*pstreamer)(buf, (
char *) addr + ioffset , *counter);
675 fileVersion =
file->GetVersion();
682 if (fileVersion > 51508) {
687 Int_t vlen = *((
Int_t *)((
char *)addr + eoffset +
695 char **pp = (
char **)((
char *)addr + ioffset );
748 pp[ndx] = (
char *)cl->
NewArray(vlen);
750 Error(
"ReadBuffer",
"Memory allocation failed!\n");
757 pp[ndx] = (
char *)
new char *[vlen];
759 Error(
"ReadBuffer",
"Memory allocation failed!\n");
763 memset(pp[ndx], 0, vlen *
sizeof(
char *));
780 Int_t vlen = *((
Int_t *)((
char *)addr + eoffset +
788 char **pp = (
char **)((
char *)addr + ioffset );
838 pp[ndx] = (
char *)cl->
NewArray(vlen);
840 Error(
"ReadBuffer",
"Memory allocation failed!\n");
847 pp[ndx] = (
char *)
new char *[vlen];
849 Error(
"ReadBuffer",
"Memory allocation failed!\n");
853 memset(pp[ndx], 0, vlen *
sizeof(
char *));
866 char **
r = (
char **)pp[ndx];
870 r[
v] = (
char *)cl->
New();
892 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) {};
896 template <
typename T>
902 TConfWithFactor *conf = (TConfWithFactor *)config;
915 template <
typename T>
920 TConfNoFactor *conf = (TConfNoFactor *)config;
921 Int_t nbits = conf->fNbits;
933 ((
TString*)(((
char*)addr)+config->
fOffset))->TString::Streamer(buf);
943 ((
TObject*)(((
char*)addr)+config->
fOffset))->TObject::Streamer(buf);
985 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(oldClass), fStreamer(0),
fTypeName(type_name), fIsSTLBase(isbase),
986 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
989 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(newClass), fStreamer(0),
fTypeName(type_name), fIsSTLBase(isbase),
990 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
993 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(oldClass), fStreamer(streamer),
fTypeName(type_name), fIsSTLBase(isbase),
994 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
997 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(newClass), fStreamer(streamer),
fTypeName(type_name), fIsSTLBase(isbase),
998 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
1003 class TConfSTLWithFactor :
public TConfigSTL {
1008 TConfSTLWithFactor(TConfigSTL *orig,
Double_t factor,
Double_t xmin) : TConfigSTL(*orig),fFactor(factor),fXmin(
xmin) {};
1012 class TConfSTLNoFactor :
public TConfigSTL {
1016 TConfSTLNoFactor(TConfigSTL *orig,
Int_t nbits) : TConfigSTL(*orig),fNbits(nbits) {};
1028 virtual ~TVectorLoopConfig() {};
1031 printf(
"TVectorLoopConfig: increment=%ld\n",fIncrement);
1034 void* GetFirstAddress(
void *start,
const void * )
const
1049 virtual ~TAssocLoopConfig() {};
1056 void* GetFirstAddress(
void *start,
const void * )
const
1096 virtual ~TGenericLoopConfig() {};
1103 void* GetFirstAddress(
void *start_collection,
const void *end_collection)
const
1108 void *iter = fCopyIterator(&iterator,start_collection);
1109 void *arr0 = fNext(iter,end_collection);
1110 if (iter != &iterator[0]) {
1111 fDeleteIterator(iter);
1121 TConfigSTL *config = (TConfigSTL*)conf;
1126 TClass *oldClass = config->fOldClass;
1139 void* alternative = oldProxy->
Allocate(nobjects,
true);
1145 void *begin = &(startbuf[0]);
1146 void *end = &(endbuf[0]);
1147 config->fCreateIterators(alternative, &begin, &end, oldProxy);
1151 if (begin != &(startbuf[0])) {
1153 config->fDeleteTwoIterators(begin,end);
1156 oldProxy->
Commit(alternative);
1160 TClass *oldClass = config->fOldClass;
1171 void* env = oldProxy->
Allocate(nobjects,
true);
1173 if (nobjects || vers < 7 ) {
1187 TConfigSTL *config = (TConfigSTL*)conf;
1192 TClass *oldClass = config->fOldClass;
1204 int objectSize = oldClass->
Size();
1205 char *obj = (
char*)addr;
1206 char *endobj = obj + conf->
fLength*objectSize;
1208 for(; obj<endobj; obj+=objectSize) {
1212 void* alternative = oldProxy->
Allocate(nobjects,
true);
1216 void *begin = &(startbuf[0]);
1217 void *end = &(endbuf[0]);
1218 config->fCreateIterators(alternative, &begin, &end, oldProxy);
1222 if (begin != &(startbuf[0])) {
1224 config->fDeleteTwoIterators(begin,end);
1227 oldProxy->
Commit(alternative);
1232 TClass *oldClass = config->fOldClass;
1240 int objectSize = oldClass->
Size();
1241 char *obj = (
char*)addr;
1242 char *endobj = obj + conf->
fLength*objectSize;
1244 for(; obj<endobj; obj+=objectSize) {
1248 void* env = oldProxy->
Allocate(nobjects,
true);
1250 if (nobjects || vers < 7 ) {
1265 TConfigSTL *config = (TConfigSTL*)conf;
1269 TClass *newClass = config->fNewClass;
1270 TClass *oldClass = config->fOldClass;
1273 Error(
"ReadSTLMemberWiseChangedClass",
"Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
1285 void* alternative = newProxy->
Allocate(nobjects,
true);
1290 void *begin = &(startbuf[0]);
1291 void *end = &(endbuf[0]);
1292 config->fCreateIterators( alternative, &begin, &end, newProxy);
1296 if (begin != &(startbuf[0])) {
1298 config->fDeleteTwoIterators(begin,end);
1301 newProxy->
Commit(alternative);
1309 TConfigSTL *config = (TConfigSTL*)conf;
1313 TClass *newClass = config->fNewClass;
1314 TClass *oldClass = config->fOldClass;
1317 Error(
"ReadSTLMemberWiseChangedClass",
"Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
1326 int objectSize = newClass->
Size();
1327 char *obj = (
char*)addr;
1328 char *endobj = obj + conf->
fLength*objectSize;
1330 for(; obj<endobj; obj+=objectSize) {
1334 void* alternative = newProxy->
Allocate(nobjects,
true);
1339 void *begin = &(startbuf[0]);
1340 void *end = &(endbuf[0]);
1341 config->fCreateIterators( alternative, &begin, &end, newProxy);
1345 if (begin != &(startbuf[0])) {
1347 config->fDeleteTwoIterators(begin,end);
1350 newProxy->
Commit(alternative);
1358 TConfigSTL *config = (TConfigSTL*)conf;
1364 TConfigSTL *config = (TConfigSTL*)conf;
1365 (*config->fStreamer)(buf,addr,conf->
fLength);
1371 TConfigSTL *config = (TConfigSTL*)conf;
1374 if (config->fIsSTLBase || vers == 0) {
1384 TConfigSTL *config = (TConfigSTL*)conf;
1387 if (config->fIsSTLBase || vers == 0) {
1390 (*config->fStreamer)(buf,addr,conf->
fLength);
1397 TConfigSTL *config = (TConfigSTL*)conf;
1401 memberwise(buf,((
char*)addr)+config->fOffset,config, vers);
1403 objectwise(buf,((
char*)addr)+config->fOffset,config, vers, start);
1409 template <
typename From,
typename To>
1410 struct ConvertBasicType {
1416 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1421 template <
typename To>
1422 struct ConvertBasicType<BitsMarker,To> {
1433 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1438 template <
typename From,
typename To>
1439 struct ConvertBasicType<WithFactorMarker<From>,To> {
1443 TConfWithFactor *conf = (TConfWithFactor *)config;
1446 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1451 template <
typename From,
typename To>
1452 struct ConvertBasicType<NoFactorMarker<From>,To> {
1456 TConfNoFactor *conf = (TConfNoFactor *)config;
1459 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1470 TConfiguration(info, -1, nullptr, offset), fOnfileObject(onfileObject)
1473 virtual void Print()
const {
1476 printf(
"StreamerInfoAction, class:%s, PushDataCache offset=%d\n",
1479 printf(
"StreamerInfoAction, class:%s, PopDataCache offset=%d\n",
1482 virtual void PrintDebug(
TBuffer &buffer,
void *
object)
const {
1485 printf(
"StreamerInfoAction, class:%s, %sDataCache, bufpos=%d, arr=%p, offset=%d, onfileObject=%p\n",
1486 info->
GetClass()->
GetName(), fOnfileObject ?
"Push" :
"Pop", buffer.
Length(),
object, fOffset, fOnfileObject);
1494 TConfigurationPushDataCache *config = (TConfigurationPushDataCache*)conf;
1495 auto onfileObject = config->fOnfileObject;
1498 b.PushDataCache( onfileObject );
1505 TConfigurationPushDataCache *config = (TConfigurationPushDataCache*)conf;
1506 auto onfileObject = config->fOnfileObject;
1511 onfileObject->SetSize(
n);
1512 b.PushDataCache( onfileObject );
1536 TConfiguration(info,action.fConfiguration->fElemId,action.fConfiguration->fCompInfo,action.fConfiguration->fOffset),fAction(action),fNeedRepeat(repeat) {};
1537 virtual void PrintDebug(
TBuffer &
b,
void *addr)
const
1543 fprintf(stdout,
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d,"
1544 " %s, bufpos=%d, arr=%p, eoffset=%d, Redirect=%p\n",
1546 aElement->
ClassName(),
b.Length(),addr, 0,
b.PeekDataCache() ?
b.PeekDataCache()->GetObjectAt(0) : 0);
1550 virtual ~TConfigurationUseCache() {};
1552 TConfigurationUseCache *copy =
new TConfigurationUseCache(*
this);
1560 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1562 Int_t bufpos =
b.Length();
1567 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1568 char *ptr = (
char*)addr;
1571 config->fAction(
b, (*cached)[0]);
1574 if (config->fNeedRepeat) {
1575 b.SetBufferOffset(bufpos);
1582 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1583 Int_t bufpos =
b.Length();
1589 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1590 char *ptr = (
char*)start;
1591 UInt_t n = (((
void**)end)-((
void**)start));
1594 TVectorLoopConfig cached_config(
nullptr, cached->
fClass->
Size(),
kTRUE );
1595 void *cached_start = (*cached)[0];
1596 void *cached_end = ((
char*)cached_start) + cached->
fSize * cached_config.fIncrement;
1597 config->fAction(
b,cached_start,cached_end,&cached_config);
1600 if (config->fNeedRepeat) {
1601 b.SetBufferOffset(bufpos);
1608 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1610 Int_t bufpos =
b.Length();
1615 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1616 char *ptr = (
char*)start;
1617 UInt_t n = (((
char*)end)-((
char*)start))/((TVectorLoopConfig*)loopconf)->fIncrement;
1620 TVectorLoopConfig cached_config(
nullptr, cached->
fClass->
Size(),
kTRUE );
1621 void *cached_start = (*cached)[0];
1622 void *cached_end = ((
char*)cached_start) + cached->
fSize * cached_config.fIncrement;
1623 config->fAction(
b,cached_start,cached_end,&cached_config);
1626 if (config->fNeedRepeat) {
1627 b.SetBufferOffset(bufpos);
1634 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1636 Int_t bufpos =
b.Length();
1643 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1647 TVectorLoopConfig cached_config(
nullptr, cached->
fClass->
Size(),
kTRUE );
1648 void *cached_start = (*cached)[0];
1649 void *cached_end = ((
char*)cached_start) + cached->
fSize * cached_config.fIncrement;
1650 config->fAction(
b,cached_start,cached_end,&cached_config);
1653 if (config->fNeedRepeat) {
1654 b.SetBufferOffset(bufpos);
1693 struct VectorLooper {
1695 template <
typename T>
1698 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1699 iter = (
char*)iter + config->
fOffset;
1700 end = (
char*)end + config->
fOffset;
1701 for(; iter != end; iter = (
char*)iter + incr ) {
1702 T *
x = (
T*) ((
char*) iter);
1708 template <
typename From,
typename To>
1709 struct ConvertBasicType {
1714 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1715 iter = (
char*)iter + config->
fOffset;
1716 end = (
char*)end + config->
fOffset;
1717 for(; iter != end; iter = (
char*)iter + incr ) {
1719 *(To*)( ((
char*)iter) ) = (To)temp;
1725 template <
typename To>
1726 struct ConvertBasicType<BitsMarker,To> {
1731 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1732 iter = (
char*)iter + config->
fOffset;
1733 end = (
char*)end + config->
fOffset;
1734 for(; iter != end; iter = (
char*)iter + incr ) {
1741 *(To*)( ((
char*)iter) ) = (To)temp;
1747 template <
typename From,
typename To>
1748 struct ConvertBasicType<WithFactorMarker<From>,To> {
1752 TConfWithFactor *conf = (TConfWithFactor *)config;
1754 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1755 iter = (
char*)iter + config->
fOffset;
1756 end = (
char*)end + config->
fOffset;
1757 for(; iter != end; iter = (
char*)iter + incr ) {
1759 *(To*)( ((
char*)iter) ) = (To)temp;
1765 template <
typename From,
typename To>
1766 struct ConvertBasicType<NoFactorMarker<From>,To> {
1770 TConfNoFactor *conf = (TConfNoFactor *)config;
1772 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1773 iter = (
char*)iter + config->
fOffset;
1774 end = (
char*)end + config->
fOffset;
1775 for(; iter != end; iter = (
char*)iter + incr ) {
1777 *(To*)( ((
char*)iter) ) = (To)temp;
1783 template <
typename T>
1786 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1787 iter = (
char*)iter + config->
fOffset;
1788 end = (
char*)end + config->
fOffset;
1789 for(; iter != end; iter = (
char*)iter + incr ) {
1790 T *
x = (
T*) ((
char*) iter);
1796 template <Int_t (*iter_action)(TBuffer&,
void *,const TConfiguration*)>
1799 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1802 for(
void *iter = start; iter != end; iter = (
char*)iter + incr ) {
1803 iter_action(buf, iter, config);
1813 UInt_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1814 UInt_t n = (((
char*)end)-((
char*)start))/incr;
1815 char **arrptr =
new char*[
n];
1817 for(
void *iter = start; iter != end; iter = (
char*)iter + incr, ++i ) {
1818 arrptr[i] = (
char*)iter;
1850 UInt_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1851 UInt_t n = (((
char*)end)-((
char*)start))/incr;
1852 char **arrptr =
new char*[
n];
1854 for(
void *iter = start; iter != end; iter = (
char*)iter + incr, ++i ) {
1855 arrptr[i] = (
char*)iter;
1866 UInt_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1867 UInt_t n = (((
char*)end)-((
char*)start))/incr;
1868 char **arrptr =
new char*[
n];
1870 for(
void *iter = start; iter != end; iter = (
char*)iter + incr, ++i ) {
1871 arrptr[i] = (
char*)iter;
1878 template <
typename T>
1883 TConfigSTL *config = (TConfigSTL*)conf;
1885 buf.
ReadVersion(&start, &count, config->fOldClass);
1887 std::vector<T> *
const vec = (std::vector<T>*)(((
char*)addr)+config->fOffset);
1890 vec->resize(nvalues);
1892 #ifdef R__VISUAL_CPLUSPLUS
1898 T *begin = &(*vec->begin());
1909 TConfigSTL *config = (TConfigSTL*)conf;
1911 buf.
ReadVersion(&start, &count, config->fOldClass);
1913 std::vector<bool> *
const vec = (std::vector<bool>*)(((
char*)addr)+config->fOffset);
1916 vec->resize(nvalues);
1918 bool *items =
new bool[nvalues];
1920 for(
Int_t i = 0 ; i < nvalues; ++i) {
1921 (*vec)[i] = items[i];
1940 TConfigSTL *config = (TConfigSTL*)conf;
1942 buf.
ReadVersion(&start, &count, config->fOldClass);
1944 std::vector<float> *
const vec = (std::vector<float>*)(((
char*)addr)+config->fOffset);
1947 vec->resize(nvalues);
1949 #ifdef R__VISUAL_CPLUSPLUS
1955 float *begin = &(*vec->begin());
1966 TConfigSTL *config = (TConfigSTL*)conf;
1968 buf.
ReadVersion(&start, &count, config->fOldClass);
1970 std::vector<double> *
const vec = (std::vector<double>*)(((
char*)addr)+config->fOffset);
1973 vec->resize(nvalues);
1975 #ifdef R__VISUAL_CPLUSPLUS
1981 double *begin = &(*vec->begin());
1988 template <
typename From,
typename To>
1989 struct ConvertCollectionBasicType {
1994 TConfigSTL *config = (TConfigSTL*)conf;
1996 buf.
ReadVersion(&start, &count, config->fOldClass);
1998 std::vector<To> *
const vec = (std::vector<To>*)(((
char*)addr)+config->fOffset);
2001 vec->resize(nvalues);
2003 From *temp =
new From[nvalues];
2005 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2006 (*vec)[ind] = (To)temp[ind];
2015 template <
typename From,
typename To>
2016 struct ConvertCollectionBasicType<NoFactorMarker<From>,To> {
2021 TConfigSTL *config = (TConfigSTL*)conf;
2023 buf.
ReadVersion(&start, &count, config->fOldClass);
2025 std::vector<To> *
const vec = (std::vector<To>*)(((
char*)addr)+config->fOffset);
2028 vec->resize(nvalues);
2030 From *temp =
new From[nvalues];
2032 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2033 (*vec)[ind] = (To)temp[ind];
2042 template <
typename To>
2047 TConfigSTL *config = (TConfigSTL*)conf;
2049 buf.
ReadVersion(&start, &count, config->fOldClass);
2051 std::vector<To> *
const vec = (std::vector<To>*)(((
char*)addr)+config->fOffset);
2054 vec->resize(nvalues);
2058 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2059 (*vec)[ind] = (To)temp[ind];
2069 struct VectorPtrLooper {
2071 template <
typename T>
2076 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2077 T *
x = (
T*)( ((
char*) (*(
void**)iter) ) + offset );
2083 template <
typename From,
typename To>
2084 struct ConvertBasicType {
2090 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2092 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
2099 template <
typename To>
2100 struct ConvertBasicType<BitsMarker,To> {
2106 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2113 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
2120 template <
typename From,
typename To>
2121 struct ConvertBasicType<WithFactorMarker<From>,To> {
2125 TConfWithFactor *conf = (TConfWithFactor *)config;
2128 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2130 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
2137 template <
typename From,
typename To>
2138 struct ConvertBasicType<NoFactorMarker<From>,To> {
2142 TConfNoFactor *conf = (TConfNoFactor *)config;
2145 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2147 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
2154 template <
typename T>
2159 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2160 T *
x = (
T*)( ((
char*) (*(
void**)iter) ) + offset );
2166 template <Int_t (*action)(TBuffer&,
void *,const TConfiguration*)>
2169 for(
void *iter = start; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
2170 action(buf, *(
void**)iter, config);
2180 return GenericRead(buf,start,end,config);
2185 Int_t n = ( ((
void**)end) - ((
void**)iter) );
2186 char **arr = (
char**)iter;
2192 Int_t n = ( ((
void**)end) - ((
void**)iter) );
2193 char **arr = (
char**)iter;
2199 struct AssociativeLooper {
2201 template <
typename T>
2217 template <
typename T,
void (*action)(TBuffer&,
void *,Int_t)>
2222 TConfigSTL *config = (TConfigSTL*)conf;
2224 buf.
ReadVersion(&start, &count, config->fOldClass);
2226 TClass *newClass = config->fNewClass;
2232 void* alternative = newProxy->
Allocate(nvalues,
true);
2236 void *begin = &(startbuf[0]);
2237 void *end = &(endbuf[0]);
2238 config->fCreateIterators(alternative, &begin, &end, newProxy);
2242 action(buf,begin,nvalues);
2244 if (begin != &(startbuf[0])) {
2246 config->fDeleteTwoIterators(begin,end);
2249 newProxy->
Commit(alternative);
2257 return ReadNumericalCollection<bool,SimpleRead<bool> >(buf,addr,conf);
2262 return ReadNumericalCollection<Float_t,SimpleReadFloat16 >(buf,addr,conf);
2267 return ReadNumericalCollection<Double_t,SimpleReadDouble32 >(buf,addr,conf);
2270 template <
typename T>
2273 return ReadNumericalCollection<T,SimpleRead<T> >(buf,addr,conf);
2276 template <
typename From,
typename To>
2277 struct ConvertRead {
2280 From *temp =
new From[nvalues];
2282 To *vec = (To*)addr;
2283 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2284 vec[ind] = (To)temp[ind];
2290 template <
typename From,
typename To>
2291 struct ConvertRead<NoFactorMarker<From>,To> {
2294 From *temp =
new From[nvalues];
2296 To *vec = (To*)addr;
2297 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2298 vec[ind] = (To)temp[ind];
2304 template <
typename From,
typename To>
2305 struct ConvertRead<WithFactorMarker<From>,To> {
2308 From *temp =
new From[nvalues];
2311 To *vec = (To*)addr;
2312 for(
Int_t ind = 0; ind < nvalues; ++ind) {
2313 vec[ind] = (To)temp[ind];
2319 template <
typename From,
typename To>
2320 struct ConvertCollectionBasicType {
2323 return ReadNumericalCollection<To,ConvertRead<From,To>::Action >(buf,addr,conf);
2329 struct GenericLooper {
2331 template <
typename T>
2334 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2336 Next_t next = loopconfig->fNext;
2340 void *iter = loopconfig->fCopyIterator(iterator,start);
2342 while( (addr = next(iter,end)) ) {
2343 T *
x = (
T*)( ((
char*)addr) + offset );
2346 if (iter != &iterator[0]) {
2347 loopconfig->fDeleteIterator(iter);
2352 template <
typename T>
2355 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2357 Next_t next = loopconfig->fNext;
2361 void *iter = loopconfig->fCopyIterator(iterator,start);
2363 while( (addr = next(iter,end)) ) {
2364 T *
x = (
T*)( ((
char*)addr) + offset );
2367 if (iter != &iterator[0]) {
2368 loopconfig->fDeleteIterator(iter);
2373 template <Int_t (*iter_action)(TBuffer&,
void *,const TConfiguration*)>
2376 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2379 Next_t next = loopconfig->fNext;
2382 void *iter = loopconfig->fCopyIterator(&iterator,start);
2384 while( (addr = next(iter,end)) ) {
2385 iter_action(buf, addr, config);
2387 if (iter != &iterator[0]) {
2388 loopconfig->fDeleteIterator(iter);
2393 template <
typename From,
typename To>
2397 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2400 Next_t next = loopconfig->fNext;
2403 void *iter = loopconfig->fCopyIterator(&iterator,start);
2405 while( (addr = next(iter,end)) ) {
2406 To *
x = (To*)( ((
char*)addr) + offset );
2410 if (iter != &iterator[0]) {
2411 loopconfig->fDeleteIterator(iter);
2416 template <
typename From,
typename To>
2423 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2424 Next_t next = loopconfig->fNext;
2428 while( (addr = next(iter,end)) ) {
2429 To *
x = (To*)(addr);
2436 template <
typename From,
typename To,
template <
typename F,
typename T>
class Converter = Generic >
2437 struct ConvertBasicType {
2442 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2446 From *items =
new From[nvalues];
2448 Converter<From,To>::ConvertAction(items,start,end,loopconfig,config);
2454 template <
typename To>
2455 struct ConvertBasicType<BitsMarker, To, Generic> {
2460 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2465 UInt_t *items = items_storage;
2468 Next_t next = loopconfig->fNext;
2471 void *iter = loopconfig->fCopyIterator(&iterator,start);
2473 while( (addr = next(iter,end)) ) {
2478 To *
x = (To*)( ((
char*)addr) + offset );
2482 if (iter != &iterator[0]) {
2483 loopconfig->fDeleteIterator(iter);
2486 delete [] items_storage;
2491 template <
typename From,
typename To,
template <
typename F,
typename T>
class Converter >
2492 struct ConvertBasicType<WithFactorMarker<From>,To,Converter > {
2497 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2501 TConfSTLWithFactor *conf = (TConfSTLWithFactor *)config;
2503 From *items =
new From[nvalues];
2505 Converter<From,To>::ConvertAction(items,start,end,loopconfig,config);
2511 template <
typename From,
typename To,
template <
typename F,
typename T>
class Converter >
2512 struct ConvertBasicType<NoFactorMarker<From>,To,Converter > {
2517 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2521 TConfSTLNoFactor *conf = (TConfSTLNoFactor *)config;
2523 From *items =
new From[nvalues];
2525 Converter<From,To>::ConvertAction(items,start,end,loopconfig,config);
2536 return GenericRead(buf,start,end,loopconfig, config);
2541 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2548 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2553 template <
typename T>
2572 template <
typename ActionHolder>
2577 TConfigSTL *config = (TConfigSTL*)conf;
2579 buf.
ReadVersion(&start, &count, config->fOldClass);
2581 TClass *newClass = config->fNewClass;
2587 void* alternative = newProxy->
Allocate(nvalues,
true);
2591 void *begin = &(startbuf[0]);
2592 void *end = &(endbuf[0]);
2593 config->fCreateIterators(alternative, &begin, &end, newProxy);
2597 TGenericLoopConfig loopconf(newProxy,
kTRUE);
2598 ActionHolder::Action(buf,begin,end,&loopconf,config);
2600 if (begin != &(startbuf[0])) {
2602 config->fDeleteTwoIterators(begin,end);
2605 newProxy->
Commit(alternative);
2613 return ReadNumericalCollection<ConvertBasicType<bool,bool,Numeric > >(buf,addr,conf);
2618 return ReadNumericalCollection<ConvertBasicType<NoFactorMarker<float>,float,Numeric > >(buf,addr,conf);
2623 return ReadNumericalCollection<ConvertBasicType<float,double,Numeric > >(buf,addr,conf);
2628 template <
typename T>
2631 return ReadNumericalCollection<ConvertBasicType<T,T,Numeric > >(buf,addr,conf);
2634 template <
typename From,
typename To>
2635 struct ConvertCollectionBasicType {
2639 return ReadNumericalCollection<ConvertBasicType<From,To,Numeric > >(buf,addr,conf);
2646 template <
typename Looper,
typename From>
2674 template <
class Looper>
2694 case TStreamerInfo::kBits:
Error(
"GetNumericCollectionReadAction",
"There is no support for kBits outside of a TObject.");
break;
2696 TConfigSTL *alternate =
new TConfSTLNoFactor(conf,12);
2709 TConfigSTL *alternate =
new TConfSTLNoFactor(conf,0);
2725 Fatal(
"GetNumericCollectionReadAction",
"Is confused about %d",
type);
2730 template <
typename Looper,
typename From>
2757 template <
typename Looper>
2762 return GetConvertCollectionReadActionFrom<Looper,Bool_t>(newtype, conf );
2765 return GetConvertCollectionReadActionFrom<Looper,Char_t>(newtype, conf );
2768 return GetConvertCollectionReadActionFrom<Looper,Short_t>(newtype, conf );
2771 return GetConvertCollectionReadActionFrom<Looper,Int_t>(newtype, conf );
2774 return GetConvertCollectionReadActionFrom<Looper,Long_t>(newtype, conf );
2777 return GetConvertCollectionReadActionFrom<Looper,Long64_t>(newtype, conf );
2780 return GetConvertCollectionReadActionFrom<Looper,Float_t>( newtype, conf );
2783 return GetConvertCollectionReadActionFrom<Looper,Double_t>(newtype, conf );
2786 return GetConvertCollectionReadActionFrom<Looper,UChar_t>(newtype, conf );
2789 return GetConvertCollectionReadActionFrom<Looper,UShort_t>(newtype, conf );
2792 return GetConvertCollectionReadActionFrom<Looper,UInt_t>(newtype, conf );
2795 return GetConvertCollectionReadActionFrom<Looper,ULong_t>(newtype, conf );
2798 return GetConvertCollectionReadActionFrom<Looper,ULong64_t>(newtype, conf );
2801 return GetConvertCollectionReadActionFrom<Looper,NoFactorMarker<Float16_t> >( newtype, conf );
2804 return GetConvertCollectionReadActionFrom<Looper,NoFactorMarker<Double32_t> >( newtype, conf );
2807 Error(
"GetConvertCollectionReadAction",
"There is no support for kBits outside of a TObject.");
2816 template <
class Looper>
2837 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_WithFactor<float> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2840 if (!nbits) nbits = 12;
2841 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_NoFactor<float> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2847 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_WithFactor<double> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2853 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_NoFactor<double> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2871 return GetCollectionReadConvertAction<Looper,Bool_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2874 return GetCollectionReadConvertAction<Looper,Char_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2877 return GetCollectionReadConvertAction<Looper,Short_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2880 return GetCollectionReadConvertAction<Looper,Int_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2883 return GetCollectionReadConvertAction<Looper,Long_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2886 return GetCollectionReadConvertAction<Looper,Long64_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2889 return GetCollectionReadConvertAction<Looper,Float_t>( element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2892 return GetCollectionReadConvertAction<Looper,Double_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2895 return GetCollectionReadConvertAction<Looper,UChar_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2898 return GetCollectionReadConvertAction<Looper,UShort_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2901 return GetCollectionReadConvertAction<Looper,UInt_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2904 return GetCollectionReadConvertAction<Looper,ULong_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2907 return GetCollectionReadConvertAction<Looper,ULong64_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2910 return GetCollectionReadConvertAction<Looper,BitsMarker>(element->
GetNewType(),
new TBitsConfiguration(info,i,compinfo,offset) );
2914 return GetCollectionReadConvertAction<Looper,WithFactorMarker<float> >(element->
GetNewType(),
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2917 if (!nbits) nbits = 12;
2918 return GetCollectionReadConvertAction<Looper,NoFactorMarker<float> >(element->
GetNewType(),
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2924 return GetCollectionReadConvertAction<Looper,WithFactorMarker<double> >(element->
GetNewType(),
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2928 return GetCollectionReadConvertAction<Looper,Float_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2930 return GetCollectionReadConvertAction<Looper,NoFactorMarker<double> >(element->
GetNewType(),
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2936 return TConfiguredAction( Looper::GenericRead,
new TGenericConfiguration(info,i,compinfo) );
2943 template <
class Looper>
3050 fNslots = ndata + ndata/2 + 1;
3069 for (i = 0; i < ndata; ++i) {
3113 if (!previousOptimized) {
3124 if (
fComp[keep].fLength == 0) {
3129 isOptimized =
kTRUE;
3130 previousOptimized =
kTRUE;
3131 }
else if (element->
GetType() < 0) {
3144 previousOptimized =
kFALSE;
3162 Warning(
"Compile",
"Counter %s should not be skipped from class %s", element->
GetName(),
GetName());
3173 if (
fComp[keep].fLength == 0) {
3177 previousOptimized =
kFALSE;
3187 for (i = 0; i <
fNdata; ++i) {
3216 template <
typename From>
3248 switch (compinfo->
fType) {
3266 readSequence->
AddAction( ReadBasicType_WithFactor<float>,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
3269 if (!nbits) nbits = 12;
3270 readSequence->
AddAction( ReadBasicType_NoFactor<float>,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
3276 readSequence->
AddAction( ReadBasicType_WithFactor<double>,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
3282 readSequence->
AddAction( ReadBasicType_NoFactor<double>,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
3299 if (newClass && newClass != oldClass) {
3301 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3303 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase));
3307 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3309 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetTypeName(),isSTLbase));
3313 if (newClass && newClass != oldClass) {
3315 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3318 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase));
3322 readSequence->
AddAction(GetConvertCollectionReadAction<VectorLooper>(oldClass->
GetCollectionProxy()->
GetType(), newClass->
GetCollectionProxy()->
GetType(),
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase)));
3325 readSequence->
AddAction(GetConvertCollectionReadAction<AssociativeLooper>(oldClass->
GetCollectionProxy()->
GetType(), newClass->
GetCollectionProxy()->
GetType(),
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase)));
3331 readSequence->
AddAction(GetConvertCollectionReadAction<GenericLooper>(oldClass->
GetCollectionProxy()->
GetType(), newClass->
GetCollectionProxy()->
GetType(),
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase)));
3338 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3341 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetTypeName(),isSTLbase));
3363 if (newClass && newClass != oldClass) {
3365 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3367 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetTypeName(),isSTLbase));
3371 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3373 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetTypeName(),isSTLbase));
3377 if (newClass && newClass != oldClass) {
3379 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3381 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetTypeName(),isSTLbase));
3385 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
3387 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetTypeName(),isSTLbase));
3435 AddReadConvertAction<BitsMarker>(readSequence, compinfo->
fNewType,
new TBitsConfiguration(
this,i,compinfo,compinfo->
fOffset) );
3439 AddReadConvertAction<WithFactorMarker<float> >(readSequence, compinfo->
fNewType,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
3442 if (!nbits) nbits = 12;
3443 AddReadConvertAction<NoFactorMarker<float> >(readSequence, compinfo->
fNewType,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
3449 AddReadConvertAction<WithFactorMarker<double> >(readSequence, compinfo->
fNewType,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
3455 AddReadConvertAction<NoFactorMarker<double> >(readSequence, compinfo->
fNewType,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
3483 switch (compinfo->
fType) {
3524 default:
generic =
kTRUE;
break;
3551 readSequence->
AddAction( GetCollectionReadAction<VectorPtrLooper>(
this,element,compinfo->
fType,i,compinfo,compinfo->
fOffset) );
3568 switch (compinfo->
fType) {
3652 #if defined(CDJ_NO_COMPILE)
3655 writeSequence->
fActions.pop_back();
3677 switch (compinfo->
fType) {
3832 default:
generic =
kTRUE;
break;
3848 #if defined(CDJ_NO_COMPILE)
3851 writeSequence->
fActions.pop_back();
3873 #if defined(CDJ_NO_COMPILE)
3878 writeSequence->Addaction( GetCollectionWriteAction<VectorPtrLooper>(
this,element,compinfo->
fType,i,compinfo,compinfo->
fOffset) );
3881 writeSequence->
AddAction( VectorPtrLooper::GenericWrite,
new TGenericConfiguration(
this,i,compinfo) );
3924 for (
UInt_t i = 0; i < ndata; ++i) {
3948 ::Warning(
"CreateReadMemberWiseActions",
"%s",
3964 if (newType != oldType) {
3982 TConfiguredAction action( GetCollectionReadAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
3985 sequence->
AddAction( GetCollectionReadAction<VectorLooper>(info,element,oldType,i,compinfo,offset));
3992 TConfiguredAction action( GetCollectionReadAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
3995 sequence->
AddAction( GetCollectionReadAction<GenericLooper>(info,element,oldType,i,compinfo,offset) );
4039 for (
UInt_t i = 0; i < ndata; ++i) {
4067 #if defined(CDJ_NO_COMPILE)
4070 if (newType != oldType) {
4086 TConfiguredAction action( GetCollectionWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
4089 sequence->
AddAction(GetCollectionWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset));
4098 TConfiguredAction action( GetWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
4119 sequence->
AddAction( GenericLooper<WriteBasicType_WithFactor<float> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
4122 if (!nbits) nbits = 12;
4123 sequence->
AddAction( GenericLooper<WriteBasicType_NoFactor<float> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
4129 sequence->
AddAction( GenericLooper<WriteBasicType_WithFactor<double> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
4133 sequence->
AddAction( GenericLooper<ConvertBasicType<float,double> >,
new TConfiguration(info,i,compinfo,offset) );
4135 sequence->
AddAction( GenericLooper<WriteBasicType_NoFactor<double> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
4156 sequence->
AddAction( GetCollectionWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
4174 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4175 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4179 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4180 iter->fConfiguration->AddToOffset(delta);
4189 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4190 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4194 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4195 iter->fConfiguration->SetMissing();
4207 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4208 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4213 sequence->
AddAction( iter->fAction, conf );
4223 for(
UInt_t id = 0;
id < element_ids.size(); ++
id) {
4224 if ( element_ids[
id].fElemID < 0 ) {
4225 if (element_ids[
id].fNestedIDs) {
4226 auto original = create(element_ids[
id].fNestedIDs->fInfo,
4229 if (element_ids[
id].fNestedIDs->fOnfileObject) {
4230 auto conf =
new TConfigurationPushDataCache(element_ids[
id].fNestedIDs->fInfo, element_ids[
id].fNestedIDs->fOnfileObject, offset);
4237 original->AddToSubSequence(sequence, element_ids[
id].fNestedIDs->fIDs, element_ids[
id].fNestedIDs->fOffset, create);
4239 if (element_ids[
id].fNestedIDs->fOnfileObject)
4241 new TConfigurationPushDataCache(element_ids[
id].fNestedIDs->fInfo,
nullptr, element_ids[
id].fNestedIDs->fOffset) );
4243 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4244 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4249 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4251 sequence->
AddAction( iter->fAction, conf );
4256 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4257 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4269 if ( iter->fConfiguration->fElemId == (
UInt_t)element_ids[
id].fElemID ) {
4271 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4273 sequence->
AddAction( iter->fAction, conf );
4290 AddToSubSequence(sequence, element_ids, offset, create);
4304 for(
UInt_t id = 0;
id < element_ids.size(); ++
id) {
4305 if ( element_ids[
id] < 0 ) {
4306 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4307 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4312 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4314 sequence->
AddAction( iter->fAction, conf );
4317 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
4318 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
4321 if ( iter->fConfiguration->fElemId == (
UInt_t)element_ids[
id] ) {
4323 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
4325 sequence->
AddAction( iter->fAction, conf );
4333 #if !defined(R__WIN32) && !defined(_AIX)
4342 #if defined(R__WIN32) || defined(__CYGWIN__) || defined(_AIX)
4343 return "not available on this platform";
4345 MEMORY_BASIC_INFORMATION mbi;
4346 if (!VirtualQuery (func, &mbi,
sizeof (mbi)))
4351 HMODULE hMod = (HMODULE) mbi.AllocationBase;
4352 static char moduleName[MAX_PATH];
4354 if (!GetModuleFileNameA (hMod, moduleName,
sizeof (moduleName)))
4362 if (dladdr((
void*)func,&info)==0) {
4364 return "name not found";
4367 return info.dli_sname;
4379 fLoopConfig->Print();
4381 TStreamerInfoActions::ActionContainer_t::const_iterator end = fActions.end();
4382 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = fActions.begin();
4386 iter->fConfiguration->Print();
4387 if (strstr(opt,
"func")) {