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

#include <RhoColumn.h>

Inheritance diagram for RhoDoubleDynArrColumn:
RhoColumn

Public Member Functions

 RhoDoubleDynArrColumn (const char *, const RhoHTAbsValVector< Double_t > &, const Double_t &, RhoColumn *, TTree *)
 
virtual ~RhoDoubleDynArrColumn ()
 
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

Double_t fDefValue
 
RhoColumnfIndexPtr
 

Detailed Description

Definition at line 344 of file RhoColumn.h.

Constructor & Destructor Documentation

RhoDoubleDynArrColumn::RhoDoubleDynArrColumn ( const char *  l,
const RhoHTAbsValVector< Double_t > &  v,
const Double_t d,
RhoColumn ip,
TTree *  tp 
)

Definition at line 391 of file RhoColumn.cxx.

References Double_t, RhoColumn::fBranch, fIndexPtr, RhoColumn::fLabel, RhoColumn::fPointer, RhoColumn::GetLabel(), RhoColumn::GetPointer(), i, TString, and v.

394  :
395  RhoColumn ( l ),fDefValue ( d ),fIndexPtr ( ip )
396 {
397  // Make a new branch:
398  Int_t* np = ( Int_t* ) ( fIndexPtr->GetPointer() );
399  Double_t* dp = new Double_t[*np];
400  fPointer = dp;
401  for ( Int_t i = 0; i < *np; ++i ) { dp[i] = v ( i ); }
402  TString leafs ( fLabel );
403  leafs += "[";
404  leafs += fIndexPtr->GetLabel();
405  leafs += "]/D";
406  fBranch = tp->Branch ( fLabel,&dp[0],&*leafs,8000 );
407 }
TObjArray * d
RhoColumn(const char *l)
Definition: RhoColumn.h:125
Int_t i
Definition: run_full.C:25
TBranch * fBranch
Definition: RhoColumn.h:152
__m128 v
Definition: P4_F32vec4.h:4
const TString & GetLabel() const
Definition: RhoColumn.h:128
Double_t
void * GetPointer()
Definition: RhoColumn.h:134
TString fLabel
Definition: RhoColumn.h:149
void * fPointer
Definition: RhoColumn.h:151
RhoColumn * fIndexPtr
Definition: RhoColumn.h:356
virtual RhoDoubleDynArrColumn::~RhoDoubleDynArrColumn ( )
inlinevirtual

Definition at line 349 of file RhoColumn.h.

References Double_t, and RhoColumn::fPointer.

349  {
350  delete[] ( Double_t* ) fPointer;
351  }
Double_t
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 RhoDoubleDynArrColumn::SetDefValue ( )
virtual

Implements RhoColumn.

Definition at line 409 of file RhoColumn.cxx.

References Double_t, RhoColumn::fBranch, fDefValue, fIndexPtr, RhoColumn::fPointer, RhoColumn::GetPointer(), and i.

Referenced by SetValue().

410 {
411  if ( fPointer ) { delete [] ( Double_t* ) fPointer; }
412  Int_t fMax = * ( ( Int_t* ) ( fIndexPtr->GetPointer() ) );
413  Double_t* dp = new Double_t[fMax];
414  fPointer = dp;
415  for ( Int_t i = 0; i < fMax; ++i ) { dp[i] = fDefValue; }
416  fBranch->SetAddress ( &dp[0] );
417 }
Int_t i
Definition: run_full.C:25
TBranch * fBranch
Definition: RhoColumn.h:152
Double_t
void * GetPointer()
Definition: RhoColumn.h:134
void * fPointer
Definition: RhoColumn.h:151
RhoColumn * fIndexPtr
Definition: RhoColumn.h:356
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 RhoDoubleDynArrColumn::SetValue ( const void *  p,
RhoColumn cp = 0 
)
virtual

Implements RhoColumn.

Definition at line 419 of file RhoColumn.cxx.

References Double_t, RhoColumn::fBranch, RhoColumn::fPointer, RhoColumn::GetPointer(), i, RhoHTAbsValVector< T >::length(), and SetDefValue().

420 {
422  Int_t* np = ( Int_t* ) cp->GetPointer();
423  if ( *np > (int)vp->length() ) {
424  cerr << "IntDynArrColumn::SetValue: input vector too short,"
425  << "use default values" << endl;
426  SetDefValue();
427  } else {
428  Double_t* dp = new Double_t[*np];
429  if ( fPointer ) { delete[] ( Double_t* ) fPointer; }
430  fPointer = dp;
431  for ( Int_t i = 0; i < *np; ++i ) { dp[i] = ( *vp ) ( i ); }
432  fBranch->SetAddress ( &dp[0] );
433  }
434 }
Int_t i
Definition: run_full.C:25
virtual size_t length() const =0
TBranch * fBranch
Definition: RhoColumn.h:152
Double_t p
Definition: anasim.C:58
Double_t
void * GetPointer()
Definition: RhoColumn.h:134
virtual void SetDefValue()
Definition: RhoColumn.cxx:409
void * fPointer
Definition: RhoColumn.h:151

Member Data Documentation

TBranch* RhoColumn::fBranch
protectedinherited
Double_t RhoDoubleDynArrColumn::fDefValue
private

Definition at line 355 of file RhoColumn.h.

Referenced by SetDefValue().

RhoColumn* RhoDoubleDynArrColumn::fIndexPtr
private

Definition at line 356 of file RhoColumn.h.

Referenced by RhoDoubleDynArrColumn(), and 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(), RhoFloatArrColumn::RhoFloatArrColumn(), RhoFloatColumn::RhoFloatColumn(), RhoFloatDynArrColumn::RhoFloatDynArrColumn(), RhoIntArrColumn::RhoIntArrColumn(), RhoIntColumn::RhoIntColumn(), RhoIntDynArrColumn::RhoIntDynArrColumn(), RhoStringColumn::RhoStringColumn(), RhoBoolColumn::SetDefValue(), RhoBoolArrColumn::SetDefValue(), RhoBoolDynArrColumn::SetDefValue(), RhoIntColumn::SetDefValue(), RhoIntArrColumn::SetDefValue(), RhoIntDynArrColumn::SetDefValue(), RhoFloatColumn::SetDefValue(), RhoFloatArrColumn::SetDefValue(), RhoFloatDynArrColumn::SetDefValue(), RhoDoubleColumn::SetDefValue(), RhoDoubleArrColumn::SetDefValue(), SetDefValue(), RhoStringColumn::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(), SetValue(), RhoStringColumn::SetValue(), RhoBoolArrColumn::~RhoBoolArrColumn(), RhoBoolColumn::~RhoBoolColumn(), RhoBoolDynArrColumn::~RhoBoolDynArrColumn(), RhoDoubleArrColumn::~RhoDoubleArrColumn(), RhoDoubleColumn::~RhoDoubleColumn(), ~RhoDoubleDynArrColumn(), RhoFloatArrColumn::~RhoFloatArrColumn(), RhoFloatColumn::~RhoFloatColumn(), RhoFloatDynArrColumn::~RhoFloatDynArrColumn(), RhoIntArrColumn::~RhoIntArrColumn(), RhoIntColumn::~RhoIntColumn(), RhoIntDynArrColumn::~RhoIntDynArrColumn(), and RhoStringColumn::~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: