Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4d04281
Revert "io actions: Remove redundant code in TextWriting."
pcanal Dec 13, 2024
818e2b8
Revert "io actions: Simplify Read/Write kSTLp for text buffer"
pcanal Dec 13, 2024
2f86766
Revert "io: Swith ReadBuffer's kSTL and kSTp to call actions sequence"
pcanal Dec 13, 2024
17b1223
Revert "io actions: add ability to write zero for missing field"
pcanal Dec 13, 2024
968f714
Revert "io actions: Remove unreachable break statement"
pcanal Dec 13, 2024
30ee3d6
Revert "io actions: memberwise write add support for conv and missing"
pcanal Dec 13, 2024
31c2256
Revert "io actions: add kAny to write memberwise streaming"
pcanal Dec 13, 2024
28f77bc
Revert "io actions: add kStreamLoop to write memberwise streaming"
pcanal Dec 13, 2024
ba4a94b
Revert "io actions: add kStreamer to write memberwise streaming"
pcanal Dec 13, 2024
d30677e
Revert "io actions: add kBase to write memberwise streaming"
pcanal Dec 13, 2024
a10fe54
Revert " io actions: Add creation of write subsequence."
pcanal Dec 13, 2024
0f236de
Revert "NFC: Correct indentation"
pcanal Dec 13, 2024
85c917d
Revert "io actions: Remove unused comments"
pcanal Dec 13, 2024
e8f2134
Revert "io actions: Rename CreateActionSquence to CreateReadActionSqu…
pcanal Dec 13, 2024
b091d42
Revert "io actions: add kBase to memberwise streaming"
pcanal Dec 13, 2024
81348ab
Revert "io actions: Add creation of subsequence."
pcanal Dec 13, 2024
2228a1f
Revert "NFC: remove trailing semi colon"
pcanal Dec 13, 2024
7f37757
Revert "io actions: Add kStreamLoop to memberwise streaming"
pcanal Dec 13, 2024
f6ce75b
Revert "io actions: Correct class used for StreamerLoop version read"
pcanal Dec 13, 2024
eaff006
Revert "io actions: Move StreamerLooper from global to Looper"
pcanal Dec 13, 2024
00238b0
Revert "io actions: Add kAny to memberwise streaming"
pcanal Dec 13, 2024
ffd6c3a
Revert "io actions: Add kStreamer to memberwise streaming"
pcanal Dec 13, 2024
0581142
Revert "io actions: Add ScalarLooper"
pcanal Dec 13, 2024
1dd5b90
Revert "io actions: Add GenericLooper."
pcanal Dec 13, 2024
f4c07db
Revert "io actions: Add EMode to distinguish read and write instantia…
pcanal Dec 13, 2024
3888e00
Revert "io actions: Remove unreachable break statement"
pcanal Dec 13, 2024
68e3d8a
Revert "io actions: Add looper write actions for kTObject, kTNamed an…
pcanal Dec 13, 2024
cd20975
Revert "io actions: rename Looper's ReadAction to LoopOverCollection"
pcanal Dec 13, 2024
d8992e9
Revert "io actions: Remove unused sketch/comment"
pcanal Dec 13, 2024
21a0993
Revert "io actions: Add write action for kStreamer"
pcanal Dec 13, 2024
6438598
Revert "io actions: Add write action for kAny"
pcanal Dec 13, 2024
bff22cf
Revert "io actions: Add write action for kStreamLoop"
pcanal Dec 13, 2024
db30946
Revert "io actions: Add write action for kBase"
pcanal Dec 13, 2024
7840171
Revert "io actions: Remove implemented sketch/comment for kSTL"
pcanal Dec 13, 2024
4dad5f4
Revert "io actions: Add write case kObject, kTNamed, kTString"
pcanal Dec 13, 2024
ab2fde7
Revert "io actions: Add read actions for kAny"
pcanal Dec 13, 2024
1fa2e1c
Revert "io actions: Add read actions for kBase"
pcanal Dec 13, 2024
ce69675
Revert "io actions: Add binary read action for kStreamerLoop"
pcanal Dec 13, 2024
4aa7be3
Revert "io actions: Add binary read action for kStreamer."
pcanal Dec 13, 2024
639f1d2
Revert "io actions: Add TConfObject"
pcanal Dec 13, 2024
fa5b30b
Revert "io actions: Add support for writing collections, including si…
pcanal Dec 13, 2024
88a71e4
Revert "io actions: Delete unused TActionSequence default ctor"
pcanal Dec 13, 2024
3df020b
Revert "io: TStreamerSTL: set fNewClass/fClassObject for collection o…
pcanal Dec 13, 2024
b9b617f
Revert "io: Correct the class used for ReadVersion for kStreamer case."
pcanal Dec 13, 2024
faf2f0c
Revert "io: Correct setting of element's fNewType for pointer to STL …
pcanal Dec 13, 2024
a921e4f
Revert "meta: Add TClass::HasDirectStreamerInfoUse"
pcanal Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/meta/inc/TClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ friend class TStreamerInfo;
void ForceReload (TClass* oldcl);
Bool_t HasDataMemberInfo() const { return fIsSyntheticPair || fHasRootPcmInfo || HasInterpreterInfo(); }
Bool_t HasDefaultConstructor(Bool_t testio = kFALSE) const;
Bool_t HasDirectStreamerInfoUse() const { return fStreamerImpl == &TClass::StreamerStreamerInfo; }
Bool_t HasInterpreterInfoInMemory() const { return nullptr != fClassInfo; }
Bool_t HasInterpreterInfo() const { return fCanLoadClassInfo || fClassInfo; }
UInt_t GetCheckSum(ECheckSum code = kCurrentCheckSum) const;
Expand Down
3 changes: 0 additions & 3 deletions core/meta/inc/TStreamerElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class TStreamerElement : public TNamed {
Double_t fXmax; //!Maximum of data member if a range is specified [xmin,xmax,nbits]
Double_t fFactor; //!Conversion factor if a range is specified fFactor = (1<<nbits/(xmax-xmin)

friend class TStreamerSTL;

public:

enum ESTLtype {
Expand Down Expand Up @@ -411,7 +409,6 @@ class TStreamerSTL : public TStreamerElement {
Bool_t CannotSplit() const override;
Bool_t IsaPointer() const override;
Bool_t IsBase() const override;
TClass *GetClassPointer() const override;
Int_t GetSTLtype() const {return fSTLtype;}
Int_t GetCtype() const {return fCtype;}
const char *GetInclude() const override;
Expand Down
70 changes: 8 additions & 62 deletions core/meta/src/TStreamerElement.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "TBaseClass.h"
#include "TDataMember.h"
#include "TDataType.h"
#include "TEnum.h"
#include "TRealData.h"
#include "ThreadLocalStorage.h"
#include "TList.h"
Expand Down Expand Up @@ -481,10 +480,8 @@ void TStreamerElement::ls(Option_t *) const
void TStreamerElement::SetArrayDim(Int_t dim)
{
fArrayDim = dim;
if (dim) {
fType += TVirtualStreamerInfo::kOffsetL;
fNewType += TVirtualStreamerInfo::kOffsetL;
}
if (dim) fType += TVirtualStreamerInfo::kOffsetL;
fNewType = fType;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1686,7 +1683,7 @@ ClassImp(TStreamerSTL);
////////////////////////////////////////////////////////////////////////////////
/// Default ctor.

TStreamerSTL::TStreamerSTL() : fSTLtype(0), fCtype(0)
TStreamerSTL::TStreamerSTL() : fSTLtype(0),fCtype(0)
{
}

Expand All @@ -1697,10 +1694,7 @@ TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
const char *typeName, const TVirtualCollectionProxy &proxy, Bool_t dmPointer)
: TStreamerElement(name,title,offset,ROOT::kSTLany,typeName)
{
std::string answer;
TClassEdit::TSplitType arglist(fTypeName, TClassEdit::kDropStlDefault);
arglist.ShortType(answer, TClassEdit::kDropStlDefault);
fTypeName = answer;
fTypeName = TClassEdit::ShortType(fTypeName,TClassEdit::kDropStlDefault).c_str();

if (name==typeName /* intentional pointer comparison */
|| strcmp(name,typeName)==0) {
Expand All @@ -1720,15 +1714,8 @@ TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
} else {
fCtype = proxy.GetType();
if (proxy.HasPointers()) fCtype += TVirtualStreamerInfo::kOffsetP;
auto enumdesc = TEnum::GetEnum(arglist.fElements[1].c_str());
if (enumdesc || gCling->ClassInfo_IsEnum(arglist.fElements[1].c_str())) {
fCtype = enumdesc ? enumdesc->GetUnderlyingType() : 3;
}
}
if (TStreamerSTL::IsaPointer()) {
fType = TVirtualStreamerInfo::kSTLp;
fNewType = fType;
}
if (TStreamerSTL::IsaPointer()) fType = TVirtualStreamerInfo::kSTLp;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1789,11 +1776,8 @@ TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
if (isPointer) fCtype = TVirtualStreamerInfo::kObjectp;
else fCtype = TVirtualStreamerInfo::kObject;
} else {
auto enumdesc = TEnum::GetEnum(intype.c_str());
if (enumdesc || gCling->ClassInfo_IsEnum(intype.c_str())) {
fCtype = enumdesc ? enumdesc->GetUnderlyingType() : 3;
if (isPointer)
fCtype += TVirtualStreamerInfo::kOffsetP;
if (gCling->ClassInfo_IsEnum(intype.c_str())) {
if (isPointer) fCtype += TVirtualStreamerInfo::kOffsetP;
} else {
if (intype != "string") {
// This case can happens when 'this' is a TStreamerElement for
Expand All @@ -1810,10 +1794,7 @@ TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
}
}

if (TStreamerSTL::IsaPointer()) {
fType = TVirtualStreamerInfo::kSTLp;
fNewType = fType;
}
if (TStreamerSTL::IsaPointer()) fType = TVirtualStreamerInfo::kSTLp;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1863,41 +1844,6 @@ Bool_t TStreamerSTL::IsBase() const
if (strcmp(ts.Data(),GetTypeNameBasic())==0) return kTRUE;
return kFALSE;
}

////////////////////////////////////////////////////////////////////////////////
/// Returns a pointer to the TClass of this element.

TClass *TStreamerSTL::GetClassPointer() const
{
if (fClassObject!=(TClass*)(-1))
return fClassObject;

bool quiet = (fType == TVirtualStreamerInfo::kArtificial);

TString className(ExtractClassName(fTypeName));
TClass *cl = TClass::GetClass(className, kTRUE, quiet);

auto proxy = cl->GetCollectionProxy();
if (fNewClass && proxy->GetValueClass() == nullptr) {
// Collection of numerical type, let check if it is an enum.
TClassEdit::TSplitType arglist(fTypeName, TClassEdit::kDropStlDefault);
if ( arglist.fElements[1].size() >= 2 ) {
auto enumdesc = TEnum::GetEnum(arglist.fElements[1].c_str());
if (enumdesc || gCling->ClassInfo_IsEnum(arglist.fElements[1].c_str())) {
if (fNewClass == nullptr) {
((TStreamerElement*)this)->fNewClass = cl;
if (proxy->HasPointers())
cl = TClass::GetClass("vector<Int_t*>");
else
cl = TClass::GetClass("vector<Int_t>");
}
}
}
}
((TStreamerElement*)this)->fClassObject = cl;
return fClassObject;
}

////////////////////////////////////////////////////////////////////////////////
/// Returns size of STL container in bytes.

Expand Down
4 changes: 1 addition & 3 deletions io/io/inc/TStreamerInfoActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ namespace TStreamerInfoActions {

typedef std::vector<TConfiguredAction> ActionContainer_t;
class TActionSequence : public TObject {
TActionSequence() = delete;
TActionSequence() {};
public:
enum class EStatusBits {
kVectorPtrLooper = BIT(14)
Expand Down Expand Up @@ -216,9 +216,7 @@ namespace TStreamerInfoActions {

TActionSequence *CreateCopy();
static TActionSequence *CreateReadMemberWiseActions(TVirtualStreamerInfo *info, TVirtualCollectionProxy &proxy);
static TActionSequence *CreateReadMemberWiseActions(TVirtualStreamerInfo &info, TLoopConfiguration *loopConfig); // 2nd arg should be unique_ptr
static TActionSequence *CreateWriteMemberWiseActions(TVirtualStreamerInfo *info, TVirtualCollectionProxy &proxy);
static TActionSequence *CreateWriteMemberWiseActions(TVirtualStreamerInfo &info, TLoopConfiguration *loopConfig); // 2nd arg should be unique_ptr
TActionSequence *CreateSubSequence(const std::vector<Int_t> &element_ids, size_t offset);

TActionSequence *CreateSubSequence(const TIDs &element_ids, size_t offset, SequenceGetter_t create);
Expand Down
6 changes: 2 additions & 4 deletions io/io/src/TStreamerInfo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,8 @@ void TStreamerInfo::Build(Bool_t isTransient)
element = new TStreamerSTLstring(dmName, dmTitle, offset, dmFull, dmIsPtr);
} else if (dm->IsSTLContainer()) {
TVirtualCollectionProxy *proxy = TClass::GetClass(dmType /* the underlying type */)->GetCollectionProxy();
if (proxy)
element = new TStreamerSTL(dmName, dmTitle, offset, dmFull, *proxy, dmIsPtr);
else
element = new TStreamerSTL(dmName, dmTitle, offset, dmFull, dmFull, dmIsPtr);
if (proxy) element = new TStreamerSTL(dmName, dmTitle, offset, dmFull, *proxy, dmIsPtr);
else element = new TStreamerSTL(dmName, dmTitle, offset, dmFull, dmFull, dmIsPtr);
bool hasCustomAlloc = proxy ? proxy->GetProperties() & TVirtualCollectionProxy::kCustomAlloc : kFALSE;
if (((TStreamerSTL*)element)->GetSTLtype() != ROOT::kSTLvector || hasCustomAlloc) {
auto printErrorMsg = [&](const char* category)
Expand Down
Loading