FairRoot/PandaRoot
Public Member Functions | Protected Attributes | Private Attributes | List of all members
RhoStringColumn Class Reference

#include <RhoColumn.h>

Inheritance diagram for RhoStringColumn:
RhoColumn

Public Member Functions

 RhoStringColumn (const TString &, const TString &, const TString &, TTree *)
 
virtual ~RhoStringColumn ()
 
virtual void SetDefValue ()
 
virtual void SetValue (const void *, RhoColumn *cp=0)
 
const TStringGetLabel () const
 
TBranch * GetBrPointer ()
 
void * GetPointer ()
 
void SetPointer (void *p)
 
void SetUseDefValue (Int_t b)
 
const Int_t & GetUseDefValue () const
 

Protected Attributes

TString fLabel
 
Int_t fUseDefValue
 
void * fPointer
 
TBranch * fBranch
 

Private Attributes

TString fDefValue
 

Detailed Description

Definition at line 360 of file RhoColumn.h.

Constructor & Destructor Documentation

RhoStringColumn::RhoStringColumn ( const TString lb,
const TString v,
const TString d,
TTree *  tp 
)

Definition at line 438 of file RhoColumn.cxx.

References RhoColumn::fBranch, RhoColumn::fPointer, and TString.

438  :
439  RhoColumn ( lb ),fDefValue ( d )
440 {
441  // Create a new branch:
442  Int_t l = v.Length();
443  char* cp = new char[l+1];
444  fPointer = cp;
445  strcpy ( cp,&*v );
446  TString leafs ( lb );
447  leafs += "/C";
448  fBranch = tp->Branch ( lb, ( void* ) cp,&*leafs,8000 );
449 }
TObjArray * d
RhoColumn(const char *l)
Definition: RhoColumn.h:125
TBranch * fBranch
Definition: RhoColumn.h:152
__m128 v
Definition: P4_F32vec4.h:4
TString fDefValue
Definition: RhoColumn.h:371
void * fPointer
Definition: RhoColumn.h:151
virtual RhoStringColumn::~RhoStringColumn ( )
inlinevirtual

Definition at line 365 of file RhoColumn.h.

References RhoColumn::fPointer, and TString.

365  {
366  delete[] ( TString* ) fPointer;
367  }
void * fPointer
Definition: RhoColumn.h:151

Member Function Documentation

TBranch* RhoColumn::GetBrPointer ( )
inlineinherited

Definition at line 131 of file RhoColumn.h.

References RhoColumn::fBranch.

131  {
132  return fBranch;
133  }
TBranch * fBranch
Definition: RhoColumn.h:152
const TString& RhoColumn::GetLabel ( ) const
inlineinherited
void* RhoColumn::GetPointer ( )
inlineinherited
const Int_t& RhoColumn::GetUseDefValue ( ) const
inlineinherited

Definition at line 143 of file RhoColumn.h.

References RhoColumn::fUseDefValue.

Referenced by RhoTuple::DumpData().

143  {
144  return fUseDefValue;
145  }
Int_t fUseDefValue
Definition: RhoColumn.h:150
void RhoStringColumn::SetDefValue ( )
virtual

Implements RhoColumn.

Definition at line 451 of file RhoColumn.cxx.

References RhoColumn::fBranch, fDefValue, RhoColumn::fPointer, and TString.

452 {
453  if ( fPointer ) { delete[] ( TString* ) fPointer; }
454  Int_t l = fDefValue.Length();
455  char* cp = new char[l+1];
456  fPointer = cp;
457  strcpy ( cp,&*fDefValue );
458  fBranch->SetAddress ( &cp[0] );
459 }
TBranch * fBranch
Definition: RhoColumn.h:152
TString fDefValue
Definition: RhoColumn.h:371
void * fPointer
Definition: RhoColumn.h:151
void RhoColumn::SetPointer ( void *  p)
inlineinherited

Definition at line 137 of file RhoColumn.h.

References RhoColumn::fPointer, and p.

137  {
138  fPointer = p;
139  }
Double_t p
Definition: anasim.C:58
void * fPointer
Definition: RhoColumn.h:151
void RhoColumn::SetUseDefValue ( Int_t  b)
inlineinherited

Definition at line 140 of file RhoColumn.h.

References b, and RhoColumn::fUseDefValue.

Referenced by RhoTuple::ClearData(), RhoTuple::Column(), and RhoTuple::DumpData().

140  {
141  fUseDefValue = b;
142  }
TTree * b
Int_t fUseDefValue
Definition: RhoColumn.h:150
void RhoStringColumn::SetValue ( const void *  p,
RhoColumn cp = 0 
)
virtual

Implements RhoColumn.

Definition at line 461 of file RhoColumn.cxx.

References RhoColumn::fBranch, RhoColumn::fPointer, and TString.

462 {
463  const char* cpin = ( const char* ) p;
464  if ( fPointer ) { delete[] ( TString* ) fPointer; }
465  Int_t l = strlen ( cpin );
466  char* chp = new char[l+1];
467  fPointer = chp;
468  strcpy ( chp,cpin );
469  fBranch->SetAddress ( &chp[0] );
470 }
Double_t p
Definition: anasim.C:58
TBranch * fBranch
Definition: RhoColumn.h:152
void * fPointer
Definition: RhoColumn.h:151

Member Data Documentation

TBranch* RhoColumn::fBranch
protectedinherited
TString RhoStringColumn::fDefValue
private

Definition at line 371 of file RhoColumn.h.

Referenced by SetDefValue().

TString RhoColumn::fLabel
protectedinherited
void* RhoColumn::fPointer
protectedinherited

Definition at line 151 of file RhoColumn.h.

Referenced by RhoColumn::GetPointer(), RhoBoolArrColumn::RhoBoolArrColumn(), RhoBoolColumn::RhoBoolColumn(), RhoBoolDynArrColumn::RhoBoolDynArrColumn(), RhoDoubleArrColumn::RhoDoubleArrColumn(), RhoDoubleColumn::RhoDoubleColumn(), RhoDoubleDynArrColumn::RhoDoubleDynArrColumn(), RhoFloatArrColumn::RhoFloatArrColumn(), RhoFloatColumn::RhoFloatColumn(), RhoFloatDynArrColumn::RhoFloatDynArrColumn(), RhoIntArrColumn::RhoIntArrColumn(), RhoIntColumn::RhoIntColumn(), RhoIntDynArrColumn::RhoIntDynArrColumn(), RhoStringColumn(), RhoBoolColumn::SetDefValue(), RhoBoolArrColumn::SetDefValue(), RhoBoolDynArrColumn::SetDefValue(), RhoIntColumn::SetDefValue(), RhoIntArrColumn::SetDefValue(), RhoIntDynArrColumn::SetDefValue(), RhoFloatColumn::SetDefValue(), RhoFloatArrColumn::SetDefValue(), RhoFloatDynArrColumn::SetDefValue(), RhoDoubleColumn::SetDefValue(), RhoDoubleArrColumn::SetDefValue(), RhoDoubleDynArrColumn::SetDefValue(), SetDefValue(), RhoColumn::SetPointer(), RhoBoolColumn::SetValue(), RhoBoolArrColumn::SetValue(), RhoBoolDynArrColumn::SetValue(), RhoIntColumn::SetValue(), RhoIntArrColumn::SetValue(), RhoIntDynArrColumn::SetValue(), RhoFloatColumn::SetValue(), RhoFloatArrColumn::SetValue(), RhoFloatDynArrColumn::SetValue(), RhoDoubleColumn::SetValue(), RhoDoubleArrColumn::SetValue(), RhoDoubleDynArrColumn::SetValue(), SetValue(), RhoBoolArrColumn::~RhoBoolArrColumn(), RhoBoolColumn::~RhoBoolColumn(), RhoBoolDynArrColumn::~RhoBoolDynArrColumn(), RhoDoubleArrColumn::~RhoDoubleArrColumn(), RhoDoubleColumn::~RhoDoubleColumn(), RhoDoubleDynArrColumn::~RhoDoubleDynArrColumn(), RhoFloatArrColumn::~RhoFloatArrColumn(), RhoFloatColumn::~RhoFloatColumn(), RhoFloatDynArrColumn::~RhoFloatDynArrColumn(), RhoIntArrColumn::~RhoIntArrColumn(), RhoIntColumn::~RhoIntColumn(), RhoIntDynArrColumn::~RhoIntDynArrColumn(), and ~RhoStringColumn().

Int_t RhoColumn::fUseDefValue
protectedinherited

Definition at line 150 of file RhoColumn.h.

Referenced by RhoColumn::GetUseDefValue(), and RhoColumn::SetUseDefValue().


The documentation for this class was generated from the following files: