Skip to content
Snippets Groups Projects
Commit 5b2bc099 authored by Simon Spies's avatar Simon Spies Committed by Philippe Canal
Browse files

Fixed bug with with specifying range

parent b67acdfa
No related branches found
No related tags found
No related merge requests found
......@@ -40,9 +40,9 @@
#pragma link C++ class TLeafB+;
#pragma link C++ class TLeafC+;
#pragma link C++ class TLeafD+;
#pragma link C++ class TLeafD32+;
#pragma link C++ class TLeafD32-;
#pragma link C++ class TLeafF+;
#pragma link C++ class TLeafF16+;
#pragma link C++ class TLeafF16-;
#pragma link C++ class TLeafI+;
#pragma link C++ class TLeafS+;
#pragma link C++ class TLeafL+;
......
......@@ -30,7 +30,7 @@ protected:
Double32_t fMaximum; ///< Maximum value if leaf range is specified
Double32_t *fValue; ///<! Pointer to data buffer
Double32_t **fPointer; ///<! Address of pointer to data buffer
TStreamerElement *tseDouble32; ///< StreamerElement used for TBuffer read / write
TStreamerElement *tseDouble32; ///<! StreamerElement used for TBuffer read / write
public:
TLeafD32();
......
......@@ -30,7 +30,7 @@ protected:
Float16_t fMaximum; ///< Maximum value if leaf range is specified
Float16_t *fValue; ///<! Pointer to data buffer
Float16_t **fPointer; ///<! Address of pointer to data buffer!
TStreamerElement *tseFloat16; ///< StreamerElement used for TBuffer read / write
TStreamerElement *tseFloat16; ///<! StreamerElement used for TBuffer read / write
public:
TLeafF16();
......
......@@ -47,9 +47,10 @@ TLeafD32::TLeafD32(TBranch *parent, const char *name, const char *type) : TLeaf(
fValue = nullptr;
fPointer = nullptr;
tseDouble32 = nullptr;
fTitle = type;
if (strchr(type, '['))
tseDouble32 = new TStreamerElement(Form("%s_tseDouble32", name), type, 0, 0, "");
tseDouble32 = new TStreamerElement(Form("%s_tseDouble32", name), type, 0, 0, "Double32_t");
}
////////////////////////////////////////////////////////////////////////////////
......@@ -194,3 +195,18 @@ void TLeafD32::SetAddress(void *add)
fValue[0] = 0;
}
}
////////////////////////////////////////////////////////////////////////////////
/// Stream an object of class TLeafD32.
void TLeafD32::Streamer(TBuffer &R__b)
{
if (R__b.IsReading()) {
R__b.ReadClassBuffer(TLeafD32::Class(), this);
if (fTitle.Contains("["))
tseDouble32 = new TStreamerElement(Form("%s_tseDouble32", fName.Data()), fTitle.Data(), 0, 0, "Double32_t");
} else {
R__b.WriteClassBuffer(TLeafD32::Class(), this);
}
}
......@@ -47,9 +47,10 @@ TLeafF16::TLeafF16(TBranch *parent, const char *name, const char *type) : TLeaf(
fValue = nullptr;
fPointer = nullptr;
tseFloat16 = nullptr;
fTitle = type;
if (strchr(type, '['))
tseFloat16 = new TStreamerElement(Form("%s_tseFloat16", name), type, 0, 0, "");
tseFloat16 = new TStreamerElement(Form("%s_tseFloat16", name), type, 0, 0, "Float16_t");
}
////////////////////////////////////////////////////////////////////////////////
......@@ -207,3 +208,18 @@ void TLeafF16::SetAddress(void *add)
fValue[0] = 0;
}
}
////////////////////////////////////////////////////////////////////////////////
/// Stream an object of class TLeafF16.
void TLeafF16::Streamer(TBuffer &R__b)
{
if (R__b.IsReading()) {
R__b.ReadClassBuffer(TLeafF16::Class(), this);
if (fTitle.Contains("["))
tseFloat16 = new TStreamerElement(Form("%s_tseFloat16", fName.Data()), fTitle.Data(), 0, 0, "Float16_t");
} else {
R__b.WriteClassBuffer(TLeafF16::Class(), this);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment