39 # define INLINE_TEMPLATE_ARGS 41 # define INLINE_TEMPLATE_ARGS inline 47 template <
typename From>
48 struct WithFactorMarker {
52 template <
typename From>
53 struct NoFactorMarker {
86 printf(
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d," 87 " %s, offset=%d (%s)\n",
100 TString sequenceType;
103 printf(
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d," 104 " %s, bufpos=%d, arr=%p, offset=%d (%s)\n",
114 printf(
"TLoopConfiguration: unconfigured\n");
123 void PrintDebug(
TBuffer &,
void *)
const {
139 void PrintDebug(
TBuffer &,
void *)
const {
142 TString sequenceType;
145 printf(
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d," 146 " %s, offset=%d (%s)\n",
151 void AddToOffset(
Int_t delta)
166 char *obj = (
char*)addr;
167 TGenericConfiguration *conf = (TGenericConfiguration*)config;
173 char *obj = (
char*)addr;
174 TGenericConfiguration *conf = (TGenericConfiguration*)config;
175 return ((
TStreamerInfo*)conf->fInfo)->WriteBufferAux(buf, &obj, &(conf->fCompInfo), 0, 1, 1, config->
fOffset, 2);
178 template <
typename T>
181 T *
x = (
T*)( ((
char*)addr) + config->
fOffset );
188 TBitsConfiguration *conf = (TBitsConfiguration*)config;
200 uid = ( obj->
GetUniqueID() & 0xffffff) + (gpid<<24);
221 template <
typename T>
224 T *
x = (
T*)( ((
char*)addr) + config->
fOffset );
232 void *
x = (
void*)( ((
char*)addr) + config->
fOffset );
240 void *
x = (
void*)( ((
char*)addr) + config->
fOffset );
248 template<
bool kIsTextT>
273 char **contp = (
char **)((
char *)addr + ioffset);
275 char *cont = contp[j];
277 Int_t nobjects = cont ? proxy->
Size() : 0;
292 if (pstreamer == 0) {
294 char **contp = (
char**)((
char *) addr + ioffset);
296 char *cont = contp[j];
312 template<
bool kIsTextT>
329 (*pstreamer)(buf, (
char *) addr + ioffset , *counter);
331 buf.SetByteCount(pos,
kTRUE);
349 fileVersion =
file->GetVersion();
354 if (fileVersion > 51508) {
364 char** pp = (
char**) ((
char *) addr + ioffset );
404 char** pp = (
char**) ((
char *) addr + ioffset );
428 char**
r = (
char**) pp[ndx];
449 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) {};
453 template <
typename T>
459 TConfWithFactor *conf = (TConfWithFactor *)config;
472 template <
typename T>
477 TConfNoFactor *conf = (TConfNoFactor *)config;
478 Int_t nbits = conf->fNbits;
490 ((TString*)(((
char*)addr)+config->
fOffset))->TString::Streamer(buf);
500 ((
TObject*)(((
char*)addr)+config->
fOffset))->TObject::Streamer(buf);
533 const char *fTypeName;
542 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(oldClass), fStreamer(0), fTypeName(type_name), fIsSTLBase(isbase),
543 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
546 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(newClass), fStreamer(0), fTypeName(type_name), fIsSTLBase(isbase),
547 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
550 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(oldClass), fStreamer(streamer), fTypeName(type_name), fIsSTLBase(isbase),
551 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
554 TConfiguration(info,
id,compinfo,offset,length), fOldClass(oldClass), fNewClass(newClass), fStreamer(streamer), fTypeName(type_name), fIsSTLBase(isbase),
555 fCreateIterators(0), fCopyIterator(0), fDeleteIterator(0), fDeleteTwoIterators(0) {
Init(); }
560 class TConfSTLWithFactor :
public TConfigSTL {
565 TConfSTLWithFactor(TConfigSTL *orig,
Double_t factor,
Double_t xmin) : TConfigSTL(*orig),fFactor(factor),fXmin(
xmin) {};
569 class TConfSTLNoFactor :
public TConfigSTL {
573 TConfSTLNoFactor(TConfigSTL *orig,
Int_t nbits) : TConfigSTL(*orig),fNbits(nbits) {};
583 TVectorLoopConfig(
Long_t increment,
Bool_t ) : fIncrement(increment) {};
585 virtual ~TVectorLoopConfig() {};
588 printf(
"TVectorLoopConfig: increment=%ld\n",fIncrement);
591 void* GetFirstAddress(
void *start,
const void * )
const 609 virtual ~TAssocLoopConfig() {};
616 void* GetFirstAddress(
void *start,
const void * )
const 657 virtual ~TGenericLoopConfig() {};
664 void* GetFirstAddress(
void *start_collection,
const void *end_collection)
const 669 void *iter = fCopyIterator(&iterator,start_collection);
670 void *arr0 = fNext(iter,end_collection);
671 if (iter != &iterator[0]) {
672 fDeleteIterator(iter);
682 TConfigSTL *config = (TConfigSTL*)conf;
687 TClass *oldClass = config->fOldClass;
700 void* alternative = oldProxy->
Allocate(nobjects,
true);
706 void *begin = &(startbuf[0]);
707 void *end = &(endbuf[0]);
708 config->fCreateIterators(alternative, &begin, &end, oldProxy);
712 if (begin != &(startbuf[0])) {
714 config->fDeleteTwoIterators(begin,end);
717 oldProxy->
Commit(alternative);
721 TClass *oldClass = config->fOldClass;
732 void* env = oldProxy->
Allocate(nobjects,
true);
734 if (nobjects || vers < 7 ) {
748 TConfigSTL *config = (TConfigSTL*)conf;
753 TClass *oldClass = config->fOldClass;
765 int objectSize = oldClass->
Size();
766 char *obj = (
char*)addr;
767 char *endobj = obj + conf->
fLength*objectSize;
769 for(; obj<endobj; obj+=objectSize) {
773 void* alternative = oldProxy->
Allocate(nobjects,
true);
777 void *begin = &(startbuf[0]);
778 void *end = &(endbuf[0]);
779 config->fCreateIterators(alternative, &begin, &end, oldProxy);
783 if (begin != &(startbuf[0])) {
785 config->fDeleteTwoIterators(begin,end);
788 oldProxy->
Commit(alternative);
793 TClass *oldClass = config->fOldClass;
801 int objectSize = oldClass->
Size();
802 char *obj = (
char*)addr;
803 char *endobj = obj + conf->
fLength*objectSize;
805 for(; obj<endobj; obj+=objectSize) {
809 void* env = oldProxy->
Allocate(nobjects,
true);
811 if (nobjects || vers < 7 ) {
826 TConfigSTL *config = (TConfigSTL*)conf;
830 TClass *newClass = config->fNewClass;
831 TClass *oldClass = config->fOldClass;
834 Error(
"ReadSTLMemberWiseChangedClass",
"Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
846 void* alternative = newProxy->
Allocate(nobjects,
true);
851 void *begin = &(startbuf[0]);
852 void *end = &(endbuf[0]);
853 config->fCreateIterators( alternative, &begin, &end, newProxy);
857 if (begin != &(startbuf[0])) {
859 config->fDeleteTwoIterators(begin,end);
862 newProxy->
Commit(alternative);
870 TConfigSTL *config = (TConfigSTL*)conf;
874 TClass *newClass = config->fNewClass;
875 TClass *oldClass = config->fOldClass;
878 Error(
"ReadSTLMemberWiseChangedClass",
"Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
887 int objectSize = newClass->
Size();
888 char *obj = (
char*)addr;
889 char *endobj = obj + conf->
fLength*objectSize;
891 for(; obj<endobj; obj+=objectSize) {
895 void* alternative = newProxy->
Allocate(nobjects,
true);
900 void *begin = &(startbuf[0]);
901 void *end = &(endbuf[0]);
902 config->fCreateIterators( alternative, &begin, &end, newProxy);
906 if (begin != &(startbuf[0])) {
908 config->fDeleteTwoIterators(begin,end);
911 newProxy->
Commit(alternative);
919 TConfigSTL *config = (TConfigSTL*)conf;
925 TConfigSTL *config = (TConfigSTL*)conf;
926 (*config->fStreamer)(buf,addr,conf->
fLength);
932 TConfigSTL *config = (TConfigSTL*)conf;
935 if (config->fIsSTLBase || vers == 0) {
945 TConfigSTL *config = (TConfigSTL*)conf;
948 if (config->fIsSTLBase || vers == 0) {
951 (*config->fStreamer)(buf,addr,conf->
fLength);
958 TConfigSTL *config = (TConfigSTL*)conf;
962 memberwise(buf,((
char*)addr)+config->fOffset,config, vers);
964 objectwise(buf,((
char*)addr)+config->fOffset,config, vers, start);
970 template <
typename From,
typename To>
971 struct ConvertBasicType {
977 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
982 template <
typename To>
983 struct ConvertBasicType<BitsMarker,To> {
994 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
999 template <
typename From,
typename To>
1000 struct ConvertBasicType<WithFactorMarker<From>,To> {
1004 TConfWithFactor *conf = (TConfWithFactor *)config;
1007 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1012 template <
typename From,
typename To>
1013 struct ConvertBasicType<NoFactorMarker<From>,To> {
1017 TConfNoFactor *conf = (TConfNoFactor *)config;
1020 *(To*)( ((
char*)addr) + config->
fOffset ) = (To)temp;
1033 virtual void PrintDebug(
TBuffer &
b,
void *addr)
const 1039 fprintf(stdout,
"StreamerInfoAction, class:%s, name=%s, fType[%d]=%d," 1040 " %s, bufpos=%d, arr=%p, eoffset=%d, Redirect=%p\n",
1042 aElement->
ClassName(),
b.Length(),addr, 0,
b.PeekDataCache() ?
b.PeekDataCache()->GetObjectAt(0) : 0);
1046 virtual ~TConfigurationUseCache() {};
1048 TConfigurationUseCache *copy =
new TConfigurationUseCache(*
this);
1057 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1059 Int_t bufpos =
b.Length();
1064 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1065 char *ptr = (
char*)addr;
1068 config->fAction(
b, (*cached)[0]);
1071 if (config->fNeedRepeat) {
1072 b.SetBufferOffset(bufpos);
1079 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1080 Int_t bufpos =
b.Length();
1086 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1087 char *ptr = (
char*)start;
1088 UInt_t n = (((
void**)end)-((
void**)start));
1092 void *cached_start = (*cached)[0];
1093 void *cached_end = ((
char*)cached_start) + cached->
fSize * cached_config.fIncrement;
1094 config->fAction(
b,cached_start,cached_end,&cached_config);
1097 if (config->fNeedRepeat) {
1098 b.SetBufferOffset(bufpos);
1105 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1107 Int_t bufpos =
b.Length();
1112 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1113 char *ptr = (
char*)start;
1114 UInt_t n = (((
char*)end)-((
char*)start))/((TVectorLoopConfig*)loopconf)->fIncrement;
1118 void *cached_start = (*cached)[0];
1119 void *cached_end = ((
char*)cached_start) + cached->
fSize * cached_config.fIncrement;
1120 config->fAction(
b,cached_start,cached_end,&cached_config);
1123 if (config->fNeedRepeat) {
1124 b.SetBufferOffset(bufpos);
1131 TConfigurationUseCache *config = (TConfigurationUseCache*)conf;
1133 Int_t bufpos =
b.Length();
1140 Warning(
"ReadBuffer",
"Skipping %s::%s because the cache is missing.",info->
GetName(),aElement->
GetName());
1145 void *cached_start = (*cached)[0];
1146 void *cached_end = ((
char*)cached_start) + cached->
fSize * cached_config.fIncrement;
1147 config->fAction(
b,cached_start,cached_end,&cached_config);
1150 if (config->fNeedRepeat) {
1151 b.SetBufferOffset(bufpos);
1187 struct VectorLooper {
1189 template <
typename T>
1192 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1193 iter = (
char*)iter + config->
fOffset;
1194 end = (
char*)end + config->
fOffset;
1195 for(; iter != end; iter = (
char*)iter + incr ) {
1196 T *
x = (
T*) ((
char*) iter);
1202 template <
typename From,
typename To>
1203 struct ConvertBasicType {
1208 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1209 iter = (
char*)iter + config->
fOffset;
1210 end = (
char*)end + config->
fOffset;
1211 for(; iter != end; iter = (
char*)iter + incr ) {
1213 *(To*)( ((
char*)iter) ) = (To)temp;
1219 template <
typename To>
1220 struct ConvertBasicType<BitsMarker,To> {
1225 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1226 iter = (
char*)iter + config->
fOffset;
1227 end = (
char*)end + config->
fOffset;
1228 for(; iter != end; iter = (
char*)iter + incr ) {
1235 *(To*)( ((
char*)iter) ) = (To)temp;
1241 template <
typename From,
typename To>
1242 struct ConvertBasicType<WithFactorMarker<From>,To> {
1246 TConfWithFactor *conf = (TConfWithFactor *)config;
1248 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1249 iter = (
char*)iter + config->
fOffset;
1250 end = (
char*)end + config->
fOffset;
1251 for(; iter != end; iter = (
char*)iter + incr ) {
1253 *(To*)( ((
char*)iter) ) = (To)temp;
1259 template <
typename From,
typename To>
1260 struct ConvertBasicType<NoFactorMarker<From>,To> {
1264 TConfNoFactor *conf = (TConfNoFactor *)config;
1266 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1267 iter = (
char*)iter + config->
fOffset;
1268 end = (
char*)end + config->
fOffset;
1269 for(; iter != end; iter = (
char*)iter + incr ) {
1271 *(To*)( ((
char*)iter) ) = (To)temp;
1277 template <
typename T>
1280 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1281 iter = (
char*)iter + config->
fOffset;
1282 end = (
char*)end + config->
fOffset;
1283 for(; iter != end; iter = (
char*)iter + incr ) {
1284 T *
x = (
T*) ((
char*) iter);
1290 template <Int_t (*iter_action)(TBuffer&,
void *,const TConfiguration*)>
1293 const Int_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1296 for(
void *iter = start; iter != end; iter = (
char*)iter + incr ) {
1297 iter_action(buf, iter, config);
1307 UInt_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1308 UInt_t n = (((
char*)end)-((
char*)start))/incr;
1309 char **arrptr =
new char*[
n];
1311 for(
void *iter = start; iter != end; iter = (
char*)iter + incr, ++i ) {
1312 arrptr[i] = (
char*)iter;
1344 UInt_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1345 UInt_t n = (((
char*)end)-((
char*)start))/incr;
1346 char **arrptr =
new char*[
n];
1348 for(
void *iter = start; iter != end; iter = (
char*)iter + incr, ++i ) {
1349 arrptr[i] = (
char*)iter;
1360 UInt_t incr = ((TVectorLoopConfig*)loopconfig)->fIncrement;
1361 UInt_t n = (((
char*)end)-((
char*)start))/incr;
1362 char **arrptr =
new char*[
n];
1364 for(
void *iter = start; iter != end; iter = (
char*)iter + incr, ++i ) {
1365 arrptr[i] = (
char*)iter;
1372 template <
typename T>
1377 TConfigSTL *config = (TConfigSTL*)conf;
1379 buf.
ReadVersion(&start, &count, config->fOldClass);
1381 std::vector<T> *
const vec = (std::vector<T>*)(((
char*)addr)+config->fOffset);
1384 vec->resize(nvalues);
1386 #ifdef R__VISUAL_CPLUSPLUS 1392 T *begin = &(*vec->begin());
1403 TConfigSTL *config = (TConfigSTL*)conf;
1405 buf.
ReadVersion(&start, &count, config->fOldClass);
1407 std::vector<bool> *
const vec = (std::vector<bool>*)(((
char*)addr)+config->fOffset);
1410 vec->resize(nvalues);
1412 bool *items =
new bool[nvalues];
1414 for(
Int_t i = 0 ; i < nvalues; ++i) {
1415 (*vec)[i] = items[i];
1434 TConfigSTL *config = (TConfigSTL*)conf;
1436 buf.
ReadVersion(&start, &count, config->fOldClass);
1438 std::vector<float> *
const vec = (std::vector<float>*)(((
char*)addr)+config->fOffset);
1441 vec->resize(nvalues);
1443 #ifdef R__VISUAL_CPLUSPLUS 1449 float *begin = &(*vec->begin());
1460 TConfigSTL *config = (TConfigSTL*)conf;
1462 buf.
ReadVersion(&start, &count, config->fOldClass);
1464 std::vector<double> *
const vec = (std::vector<double>*)(((
char*)addr)+config->fOffset);
1467 vec->resize(nvalues);
1469 #ifdef R__VISUAL_CPLUSPLUS 1475 double *begin = &(*vec->begin());
1482 template <
typename From,
typename To>
1483 struct ConvertCollectionBasicType {
1488 TConfigSTL *config = (TConfigSTL*)conf;
1490 buf.
ReadVersion(&start, &count, config->fOldClass);
1492 std::vector<To> *
const vec = (std::vector<To>*)(((
char*)addr)+config->fOffset);
1495 vec->resize(nvalues);
1497 From *temp =
new From[nvalues];
1499 for(
Int_t ind = 0; ind < nvalues; ++ind) {
1500 (*vec)[ind] = (To)temp[ind];
1509 template <
typename From,
typename To>
1510 struct ConvertCollectionBasicType<NoFactorMarker<From>,To> {
1515 TConfigSTL *config = (TConfigSTL*)conf;
1517 buf.
ReadVersion(&start, &count, config->fOldClass);
1519 std::vector<To> *
const vec = (std::vector<To>*)(((
char*)addr)+config->fOffset);
1522 vec->resize(nvalues);
1524 From *temp =
new From[nvalues];
1526 for(
Int_t ind = 0; ind < nvalues; ++ind) {
1527 (*vec)[ind] = (To)temp[ind];
1536 template <
typename To>
1541 TConfigSTL *config = (TConfigSTL*)conf;
1543 buf.
ReadVersion(&start, &count, config->fOldClass);
1545 std::vector<To> *
const vec = (std::vector<To>*)(((
char*)addr)+config->fOffset);
1548 vec->resize(nvalues);
1552 for(
Int_t ind = 0; ind < nvalues; ++ind) {
1553 (*vec)[ind] = (To)temp[ind];
1563 struct VectorPtrLooper {
1565 template <
typename T>
1570 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
1571 T *
x = (
T*)( ((
char*) (*(
void**)iter) ) + offset );
1577 template <
typename From,
typename To>
1578 struct ConvertBasicType {
1584 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
1586 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
1593 template <
typename To>
1594 struct ConvertBasicType<BitsMarker,To> {
1600 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
1607 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
1614 template <
typename From,
typename To>
1615 struct ConvertBasicType<WithFactorMarker<From>,To> {
1619 TConfWithFactor *conf = (TConfWithFactor *)config;
1622 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
1624 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
1631 template <
typename From,
typename To>
1632 struct ConvertBasicType<NoFactorMarker<From>,To> {
1636 TConfNoFactor *conf = (TConfNoFactor *)config;
1639 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
1641 To *
x = (To*)( ((
char*) (*(
void**)iter) ) + offset );
1648 template <
typename T>
1653 for(; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
1654 T *
x = (
T*)( ((
char*) (*(
void**)iter) ) + offset );
1660 template <Int_t (*action)(TBuffer&,
void *,const TConfiguration*)>
1663 for(
void *iter = start; iter != end; iter = (
char*)iter +
sizeof(
void*) ) {
1664 action(buf, *(
void**)iter, config);
1674 return GenericRead(buf,start,end,config);
1679 Int_t n = ( ((
void**)end) - ((
void**)iter) );
1680 char **arr = (
char**)iter;
1686 Int_t n = ( ((
void**)end) - ((
void**)iter) );
1687 char **arr = (
char**)iter;
1693 struct AssociativeLooper {
1695 template <
typename T>
1711 template <
typename T,
void (*action)(TBuffer&,
void *,Int_t)>
1716 TConfigSTL *config = (TConfigSTL*)conf;
1718 buf.
ReadVersion(&start, &count, config->fOldClass);
1720 TClass *newClass = config->fNewClass;
1726 void* alternative = newProxy->
Allocate(nvalues,
true);
1730 void *begin = &(startbuf[0]);
1731 void *end = &(endbuf[0]);
1732 config->fCreateIterators(alternative, &begin, &end, newProxy);
1736 action(buf,begin,nvalues);
1738 if (begin != &(startbuf[0])) {
1740 config->fDeleteTwoIterators(begin,end);
1743 newProxy->
Commit(alternative);
1751 return ReadNumericalCollection<bool,SimpleRead<bool> >(buf,addr,conf);
1756 return ReadNumericalCollection<Float_t,SimpleReadFloat16 >(buf,addr,conf);
1761 return ReadNumericalCollection<Double_t,SimpleReadDouble32 >(buf,addr,conf);
1764 template <
typename T>
1767 return ReadNumericalCollection<T,SimpleRead<T> >(buf,addr,conf);
1770 template <
typename From,
typename To>
1771 struct ConvertRead {
1774 From *temp =
new From[nvalues];
1776 To *vec = (To*)addr;
1777 for(
Int_t ind = 0; ind < nvalues; ++ind) {
1778 vec[ind] = (To)temp[ind];
1784 template <
typename From,
typename To>
1785 struct ConvertRead<NoFactorMarker<From>,To> {
1788 From *temp =
new From[nvalues];
1790 To *vec = (To*)addr;
1791 for(
Int_t ind = 0; ind < nvalues; ++ind) {
1792 vec[ind] = (To)temp[ind];
1798 template <
typename From,
typename To>
1799 struct ConvertRead<WithFactorMarker<From>,To> {
1802 From *temp =
new From[nvalues];
1805 To *vec = (To*)addr;
1806 for(
Int_t ind = 0; ind < nvalues; ++ind) {
1807 vec[ind] = (To)temp[ind];
1813 template <
typename From,
typename To>
1814 struct ConvertCollectionBasicType {
1817 return ReadNumericalCollection<To,ConvertRead<From,To>::Action >(buf,addr,conf);
1823 struct GenericLooper {
1825 template <
typename T>
1828 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
1830 Next_t next = loopconfig->fNext;
1834 void *iter = loopconfig->fCopyIterator(iterator,start);
1836 while( (addr = next(iter,end)) ) {
1837 T *
x = (
T*)( ((
char*)addr) + offset );
1840 if (iter != &iterator[0]) {
1841 loopconfig->fDeleteIterator(iter);
1846 template <
typename T>
1849 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
1851 Next_t next = loopconfig->fNext;
1855 void *iter = loopconfig->fCopyIterator(iterator,start);
1857 while( (addr = next(iter,end)) ) {
1858 T *
x = (
T*)( ((
char*)addr) + offset );
1861 if (iter != &iterator[0]) {
1862 loopconfig->fDeleteIterator(iter);
1867 template <Int_t (*iter_action)(TBuffer&,
void *,const TConfiguration*)>
1870 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
1873 Next_t next = loopconfig->fNext;
1876 void *iter = loopconfig->fCopyIterator(&iterator,start);
1878 while( (addr = next(iter,end)) ) {
1879 iter_action(buf, addr, config);
1881 if (iter != &iterator[0]) {
1882 loopconfig->fDeleteIterator(iter);
1887 template <
typename From,
typename To>
1891 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
1894 Next_t next = loopconfig->fNext;
1897 void *iter = loopconfig->fCopyIterator(&iterator,start);
1899 while( (addr = next(iter,end)) ) {
1900 To *
x = (To*)( ((
char*)addr) + offset );
1904 if (iter != &iterator[0]) {
1905 loopconfig->fDeleteIterator(iter);
1910 template <
typename From,
typename To>
1917 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
1918 Next_t next = loopconfig->fNext;
1922 while( (addr = next(iter,end)) ) {
1923 To *
x = (To*)(addr);
1930 template <
typename From,
typename To,
template <
typename F,
typename T>
class Converter = Generic >
1931 struct ConvertBasicType {
1936 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
1940 From *items =
new From[nvalues];
1942 Converter<From,To>::ConvertAction(items,start,end,loopconfig,config);
1948 template <
typename To>
1949 struct ConvertBasicType<BitsMarker, To, Generic> {
1954 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
1959 UInt_t *items = items_storage;
1962 Next_t next = loopconfig->fNext;
1965 void *iter = loopconfig->fCopyIterator(&iterator,start);
1967 while( (addr = next(iter,end)) ) {
1972 To *
x = (To*)( ((
char*)addr) + offset );
1976 if (iter != &iterator[0]) {
1977 loopconfig->fDeleteIterator(iter);
1980 delete [] items_storage;
1985 template <
typename From,
typename To,
template <
typename F,
typename T>
class Converter >
1986 struct ConvertBasicType<WithFactorMarker<From>,To,Converter > {
1991 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
1995 TConfSTLWithFactor *conf = (TConfSTLWithFactor *)config;
1997 From *items =
new From[nvalues];
1999 Converter<From,To>::ConvertAction(items,start,end,loopconfig,config);
2005 template <
typename From,
typename To,
template <
typename F,
typename T>
class Converter >
2006 struct ConvertBasicType<NoFactorMarker<From>,To,Converter > {
2011 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2015 TConfSTLNoFactor *conf = (TConfSTLNoFactor *)config;
2017 From *items =
new From[nvalues];
2019 Converter<From,To>::ConvertAction(items,start,end,loopconfig,config);
2030 return GenericRead(buf,start,end,loopconfig, config);
2035 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2042 TGenericLoopConfig *loopconfig = (TGenericLoopConfig*)loopconf;
2047 template <
typename T>
2066 template <
typename ActionHolder>
2071 TConfigSTL *config = (TConfigSTL*)conf;
2073 buf.
ReadVersion(&start, &count, config->fOldClass);
2075 TClass *newClass = config->fNewClass;
2081 void* alternative = newProxy->
Allocate(nvalues,
true);
2085 void *begin = &(startbuf[0]);
2086 void *end = &(endbuf[0]);
2087 config->fCreateIterators(alternative, &begin, &end, newProxy);
2091 TGenericLoopConfig loopconf(newProxy,
kTRUE);
2092 ActionHolder::Action(buf,begin,end,&loopconf,config);
2094 if (begin != &(startbuf[0])) {
2096 config->fDeleteTwoIterators(begin,end);
2099 newProxy->
Commit(alternative);
2107 return ReadNumericalCollection<ConvertBasicType<bool,bool,Numeric > >(buf,addr,conf);
2112 return ReadNumericalCollection<ConvertBasicType<NoFactorMarker<float>,float,Numeric > >(buf,addr,conf);
2117 return ReadNumericalCollection<ConvertBasicType<float,double,Numeric > >(buf,addr,conf);
2122 template <
typename T>
2125 return ReadNumericalCollection<ConvertBasicType<T,T,Numeric > >(buf,addr,conf);
2128 template <
typename From,
typename To>
2129 struct ConvertCollectionBasicType {
2133 return ReadNumericalCollection<ConvertBasicType<From,To,Numeric > >(buf,addr,conf);
2140 template <
typename Looper,
typename From>
2168 template <
class Looper>
2188 case TStreamerInfo::kBits:
Error(
"GetNumericCollectionReadAction",
"There is no support for kBits outside of a TObject.");
break;
2190 TConfigSTL *alternate =
new TConfSTLNoFactor(conf,12);
2203 TConfigSTL *alternate =
new TConfSTLNoFactor(conf,0);
2219 Fatal(
"GetNumericCollectionReadAction",
"Is confused about %d",type);
2224 template <
typename Looper,
typename From>
2251 template <
typename Looper>
2256 return GetConvertCollectionReadActionFrom<Looper,Bool_t>(newtype, conf );
2259 return GetConvertCollectionReadActionFrom<Looper,Char_t>(newtype, conf );
2262 return GetConvertCollectionReadActionFrom<Looper,Short_t>(newtype, conf );
2265 return GetConvertCollectionReadActionFrom<Looper,Int_t>(newtype, conf );
2268 return GetConvertCollectionReadActionFrom<Looper,Long_t>(newtype, conf );
2271 return GetConvertCollectionReadActionFrom<Looper,Long64_t>(newtype, conf );
2274 return GetConvertCollectionReadActionFrom<Looper,Float_t>( newtype, conf );
2277 return GetConvertCollectionReadActionFrom<Looper,Double_t>(newtype, conf );
2280 return GetConvertCollectionReadActionFrom<Looper,UChar_t>(newtype, conf );
2283 return GetConvertCollectionReadActionFrom<Looper,UShort_t>(newtype, conf );
2286 return GetConvertCollectionReadActionFrom<Looper,UInt_t>(newtype, conf );
2289 return GetConvertCollectionReadActionFrom<Looper,ULong_t>(newtype, conf );
2292 return GetConvertCollectionReadActionFrom<Looper,ULong64_t>(newtype, conf );
2295 return GetConvertCollectionReadActionFrom<Looper,NoFactorMarker<Float16_t> >( newtype, conf );
2298 return GetConvertCollectionReadActionFrom<Looper,NoFactorMarker<Double32_t> >( newtype, conf );
2301 Error(
"GetConvertCollectionReadAction",
"There is no support for kBits outside of a TObject.");
2310 template <
class Looper>
2331 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_WithFactor<float> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2334 if (!nbits) nbits = 12;
2335 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_NoFactor<float> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2341 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_WithFactor<double> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2347 return TConfiguredAction( Looper::template ReadAction<ReadBasicType_NoFactor<double> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2365 return GetCollectionReadConvertAction<Looper,Bool_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2368 return GetCollectionReadConvertAction<Looper,Char_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2371 return GetCollectionReadConvertAction<Looper,Short_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2374 return GetCollectionReadConvertAction<Looper,Int_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2377 return GetCollectionReadConvertAction<Looper,Long_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2380 return GetCollectionReadConvertAction<Looper,Long64_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2383 return GetCollectionReadConvertAction<Looper,Float_t>( element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2386 return GetCollectionReadConvertAction<Looper,Double_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2389 return GetCollectionReadConvertAction<Looper,UChar_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2392 return GetCollectionReadConvertAction<Looper,UShort_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2395 return GetCollectionReadConvertAction<Looper,UInt_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2398 return GetCollectionReadConvertAction<Looper,ULong_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2401 return GetCollectionReadConvertAction<Looper,ULong64_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2404 return GetCollectionReadConvertAction<Looper,BitsMarker>(element->
GetNewType(),
new TBitsConfiguration(info,i,compinfo,offset) );
2408 return GetCollectionReadConvertAction<Looper,WithFactorMarker<float> >(element->
GetNewType(),
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2411 if (!nbits) nbits = 12;
2412 return GetCollectionReadConvertAction<Looper,NoFactorMarker<float> >(element->
GetNewType(),
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2418 return GetCollectionReadConvertAction<Looper,WithFactorMarker<double> >(element->
GetNewType(),
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
2422 return GetCollectionReadConvertAction<Looper,Float_t>(element->
GetNewType(),
new TConfiguration(info,i,compinfo,offset) );
2424 return GetCollectionReadConvertAction<Looper,NoFactorMarker<double> >(element->
GetNewType(),
new TConfNoFactor(info,i,compinfo,offset,nbits) );
2430 return TConfiguredAction( Looper::GenericRead,
new TGenericConfiguration(info,i,compinfo) );
2437 template <
class Looper>
2537 fNslots = ndata + ndata/2 + 1;
2556 for (i = 0; i < ndata; ++i) {
2601 if (!previousOptimized) {
2612 if (
fComp[keep].fLength == 0) {
2617 isOptimized =
kTRUE;
2618 previousOptimized =
kTRUE;
2619 }
else if (element->
GetType() < 0) {
2632 previousOptimized =
kFALSE;
2650 Warning(
"Compile",
"Counter %s should not be skipped from class %s", element->
GetName(),
GetName());
2661 if (
fComp[keep].fLength == 0) {
2665 previousOptimized =
kFALSE;
2675 for (i = 0; i <
fNdata; ++i) {
2703 template <
typename From>
2735 switch (compinfo->
fType) {
2753 readSequence->
AddAction( ReadBasicType_WithFactor<float>,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
2756 if (!nbits) nbits = 12;
2757 readSequence->
AddAction( ReadBasicType_NoFactor<float>,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
2763 readSequence->
AddAction( ReadBasicType_WithFactor<double>,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
2769 readSequence->
AddAction( ReadBasicType_NoFactor<double>,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
2786 if (newClass && newClass != oldClass) {
2788 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
2790 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase));
2794 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
2796 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetTypeName(),isSTLbase));
2800 if (newClass && newClass != oldClass) {
2802 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
2805 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseChangedClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase));
2809 readSequence->
AddAction(GetConvertCollectionReadAction<VectorLooper>(oldClass->
GetCollectionProxy()->
GetType(), newClass->
GetCollectionProxy()->
GetType(),
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase)));
2812 readSequence->
AddAction(GetConvertCollectionReadAction<AssociativeLooper>(oldClass->
GetCollectionProxy()->
GetType(), newClass->
GetCollectionProxy()->
GetType(),
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase)));
2818 readSequence->
AddAction(GetConvertCollectionReadAction<GenericLooper>(oldClass->
GetCollectionProxy()->
GetType(), newClass->
GetCollectionProxy()->
GetType(),
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,newClass,element->
GetTypeName(),isSTLbase)));
2825 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
2828 readSequence->
AddAction(ReadSTL<ReadSTLMemberWiseSameClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,1,oldClass,element->
GetTypeName(),isSTLbase));
2850 if (newClass && newClass != oldClass) {
2852 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
2854 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetTypeName(),isSTLbase));
2858 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseStreamerV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
2860 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseFastArrayV2>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetTypeName(),isSTLbase));
2864 if (newClass && newClass != oldClass) {
2866 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
2868 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseChangedClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,newClass,element->
GetTypeName(),isSTLbase));
2872 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseStreamer>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetStreamer(),element->
GetTypeName(),isSTLbase));
2874 readSequence->
AddAction(ReadSTL<ReadArraySTLMemberWiseSameClass,ReadSTLObjectWiseFastArray>,
new TConfigSTL(
this,i,compinfo,compinfo->
fOffset,element->
GetArrayLength(),oldClass,element->
GetTypeName(),isSTLbase));
2922 AddReadConvertAction<BitsMarker>(readSequence, compinfo->
fNewType,
new TBitsConfiguration(
this,i,compinfo,compinfo->
fOffset) );
2926 AddReadConvertAction<WithFactorMarker<float> >(readSequence, compinfo->
fNewType,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
2929 if (!nbits) nbits = 12;
2930 AddReadConvertAction<NoFactorMarker<float> >(readSequence, compinfo->
fNewType,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
2936 AddReadConvertAction<WithFactorMarker<double> >(readSequence, compinfo->
fNewType,
new TConfWithFactor(
this,i,compinfo,compinfo->
fOffset,element->
GetFactor(),element->
GetXmin()) );
2942 AddReadConvertAction<NoFactorMarker<double> >(readSequence, compinfo->
fNewType,
new TConfNoFactor(
this,i,compinfo,compinfo->
fOffset,nbits) );
2948 readSequence->AddAction(
GenericReadAction,
new TGenericConfiguration(
this,i,compinfo) );
2972 readSequence->
AddAction( GetCollectionReadAction<VectorPtrLooper>(
this,element,compinfo->
fType,i,compinfo,compinfo->
fOffset) );
2989 switch (compinfo->
fType) {
3073 #if defined(CDJ_NO_COMPILE) 3076 writeSequence->
fActions.pop_back();
3098 switch (compinfo->
fType) {
3212 #if defined(CDJ_NO_COMPILE) 3215 writeSequence->
fActions.pop_back();
3236 #if defined(CDJ_NO_COMPILE) 3241 writeSequence->Addaction( GetCollectionWriteAction<VectorPtrLooper>(
this,element,compinfo->
fType,i,compinfo,compinfo->
fOffset) );
3244 writeSequence->
AddAction( VectorPtrLooper::GenericWrite,
new TGenericConfiguration(
this,i,compinfo) );
3287 for (
UInt_t i = 0; i < ndata; ++i) {
3311 ::Warning(
"CreateReadMemberWiseActions",
"%s",
3326 if (newType != oldType) {
3344 TConfiguredAction action( GetCollectionReadAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
3347 sequence->
AddAction( GetCollectionReadAction<VectorLooper>(info,element,oldType,i,compinfo,offset));
3354 TConfiguredAction action( GetCollectionReadAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
3357 sequence->
AddAction( GetCollectionReadAction<GenericLooper>(info,element,oldType,i,compinfo,offset) );
3401 for (
UInt_t i = 0; i < ndata; ++i) {
3429 #if defined(CDJ_NO_COMPILE) 3432 if (newType != oldType) {
3448 TConfiguredAction action( GetCollectionWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
3451 sequence->
AddAction(GetCollectionWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset));
3460 TConfiguredAction action( GetWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
3481 sequence->
AddAction( GenericLooper<WriteBasicType_WithFactor<float> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
3484 if (!nbits) nbits = 12;
3485 sequence->
AddAction( GenericLooper<WriteBasicType_NoFactor<float> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
3491 sequence->
AddAction( GenericLooper<WriteBasicType_WithFactor<double> >,
new TConfWithFactor(info,i,compinfo,offset,element->
GetFactor(),element->
GetXmin()) );
3495 sequence->
AddAction( GenericLooper<ConvertBasicType<float,double> >,
new TConfiguration(info,i,compinfo,offset) );
3497 sequence->
AddAction( GenericLooper<WriteBasicType_NoFactor<double> >,
new TConfNoFactor(info,i,compinfo,offset,nbits) );
3518 sequence->
AddAction( GetCollectionWriteAction<VectorLooper>(info,element,oldType,i,compinfo,offset) );
3535 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
3536 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
3540 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
3541 iter->fConfiguration->AddToOffset(delta);
3553 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
3554 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
3559 sequence->
AddAction( iter->fAction, conf );
3573 for(
UInt_t id = 0;
id < element_ids.size(); ++
id) {
3574 if ( element_ids[
id] < 0 ) {
3575 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
3576 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
3581 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
3583 sequence->
AddAction( iter->fAction, conf );
3586 TStreamerInfoActions::ActionContainer_t::iterator end = fActions.end();
3587 for(TStreamerInfoActions::ActionContainer_t::iterator iter = fActions.begin();
3590 if ( iter->fConfiguration->fElemId == (
UInt_t)element_ids[
id] ) {
3592 if (!iter->fConfiguration->fInfo->GetElements()->At(iter->fConfiguration->fElemId)->TestBit(
TStreamerElement::kCache))
3594 sequence->
AddAction( iter->fAction, conf );
3602 #if !defined(R__WIN32) && !defined(_AIX) 3611 #if defined(R__WIN32) || defined(__CYGWIN__) || defined(_AIX) 3612 return "not available on this platform";
3614 MEMORY_BASIC_INFORMATION mbi;
3615 if (!VirtualQuery (func, &mbi,
sizeof (mbi)))
3620 HMODULE hMod = (HMODULE) mbi.AllocationBase;
3621 static char moduleName[MAX_PATH];
3623 if (!GetModuleFileNameA (hMod, moduleName,
sizeof (moduleName)))
3631 if (dladdr((
void*)func,&info)==0) {
3633 return "name not found";
3636 return info.dli_sname;
3648 fLoopConfig->Print();
3650 TStreamerInfoActions::ActionContainer_t::const_iterator end = fActions.end();
3651 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = fActions.begin();
3655 iter->fConfiguration->Print();
3656 if (strstr(opt,
"func")) {
Describe Streamer information for one class version
virtual const char * GetName() const
Returns name of object.
void SetBufferOffset(Int_t offset=0)
virtual Int_t GetCollectionType() const =0
virtual UInt_t GetUniqueID() const
Return the unique object id.
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...
TClass * fNewClass
Not Owned.
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)
Version_t fOldVersion
! Version of the TStreamerInfo object read from the file
virtual void AddToOffset(Int_t delta)
static TConfiguredAction GetConvertCollectionReadActionFrom(Int_t newtype, TConfiguration *conf)
ActionContainer_t fActions
virtual Next_t GetFunctionNext(Bool_t read=kTRUE)=0
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.
TStreamerInfoActions::TActionSequence * fWriteMemberWiseVecPtr
! List of write action resulting from the compilation for use in member wise streaming.
void Fatal(const char *location, const char *msgfmt,...)
INLINE_TEMPLATE_ARGS Int_t ReadSTL(TBuffer &buf, void *addr, const TConfiguration *conf)
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)
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)
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.
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.
Int_t fNdata
!number of optimized elements
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)
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 '...
virtual void ReadInt(Int_t &i)=0
TVirtualCollectionProxy::Next_t Next_t
TActionSequence * CreateSubSequence(const std::vector< Int_t > &element_ids, size_t offset)
void ComputeSize()
Compute total size of all persistent elements of the class.
TStreamerInfoActions::TActionSequence * fReadMemberWise
! List of read action resulting from the compilation for use in member wise streaming.
void(* DeleteIterator_t)(void *iter)
INLINE_TEMPLATE_ARGS void ReadSTLMemberWiseChangedClass(TBuffer &buf, void *addr, const TConfiguration *conf, Version_t vers)
Int_t fSize
!size of the persistent class
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.
virtual TProcessID * ReadProcessID(UShort_t pidf)=0
Return the current Process-ID.
void AddWriteTextAction(TStreamerInfoActions::TActionSequence *writeSequence, Int_t index, TCompInfo *compinfo)
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Int_t WriteLoopInvalid(TBuffer &, void *, const void *, const TConfiguration *config)
TMemberStreamer * fStreamer
Not Owned.
Int_t fNfulldata
!number of elements
TStreamerInfoActions::TActionSequence * fReadObjectWise
! List of read action resulting from the compilation.
virtual TLoopConfiguration * Copy()=0
A TProcessID identifies a ROOT job in a unique way in time and space.
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)
Bool_t IsCompiled() const
TClass * fClass
!pointer to class
TObjArray * fElements
Array of TStreamerElements.
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
TStreamerInfoActions::TActionSequence * fWriteText
! List of write action resulting for text output like JSON or XML.
TClass * GetClass() const
Wrapper around an object and giving indirect access to its content even if the object is not of a cl...
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 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 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)
static Bool_t CanOptimize()
static function returning true if optimization can be on
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)
TCompInfo * fComp
![fNslots with less than fElements->GetEntries()*1.5 used] Compiled info
TStreamerInfoActions::TActionSequence * fWriteMemberWise
! List of write action resulting from the compilation for use in member wise streaming.
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
void HandleReferencedTObject(TBuffer &buf, void *addr, const TConfiguration *config)
void Copy(void *source, void *dest)
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
virtual TObjArray * GetElements() const =0
INLINE_TEMPLATE_ARGS Int_t WriteTextTNamed(TBuffer &buf, void *addr, const TConfiguration *config)
Int_t fNslots
!total numbrer of slots in fComp.
TStreamerInfoActions::TActionSequence * fReadMemberWiseVecPtr
! List of read action resulting from the compilation for use in member wise streaming.
TStreamerInfoActions::TActionSequence * fWriteObjectWise
! List of write action resulting from the compilation.
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.
Int_t fNVirtualInfoLoc
! Number of virtual info location to update.
static void DeleteIterator(void *iter)
#define R__LOCKGUARD(mutex)
static TConfiguredAction GetConvertCollectionReadAction(Int_t oldtype, Int_t newtype, TConfiguration *conf)
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.
void ls(Option_t *option="") const
List the TStreamerElement list and also the precomputed tables if option contains the string "incOrig...
virtual UInt_t Size() const =0
typedef void((*Func_t)())
Int_t fNumber
!Unique identifier
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
virtual TConfiguration * Copy()
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)
TCompInfo ** fCompOpt
![fNdata]
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
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)
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)
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
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.
void AddToOffset(Int_t delta)
TCompInfo_t * fCompInfo
Access to compiled information (for legacy code)