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

#include <RhoColumn.h>

Inheritance diagram for RhoIntArrColumn:
RhoColumn

Public Member Functions

 RhoIntArrColumn (const char *, const RhoHTAbsValVector< Int_t > &, const Int_t &, TTree *)
 
virtual ~RhoIntArrColumn ()
 
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

Int_t fDefValue
 
Int_t fMax
 

Detailed Description

Definition at line 223 of file RhoColumn.h.

Constructor & Destructor Documentation

RhoIntArrColumn::RhoIntArrColumn ( const char *  l,
const RhoHTAbsValVector< Int_t > &  v,
const Int_t &  d,
TTree *  tp 
)

Definition at line 124 of file RhoColumn.cxx.

References buf, RhoColumn::fBranch, RhoColumn::fLabel, fMax, RhoColumn::fPointer, i, RhoHTAbsValVector< T >::length(), TString, and v.

126  :
127  RhoColumn ( l ),fDefValue ( d )
128 {
129  // Create a new branch:
130  fMax = v.length();
131  Int_t* ip = new Int_t[fMax];
132  fPointer = ip;
133  for ( Int_t i = 0; i < fMax; ++i ) { ip[i] = v ( i ); }
134  TString leafs ( fLabel );
135  leafs += "[";
136  char buf[33];
137  sprintf ( buf,"%i",fMax );
138  leafs += buf;
139  leafs += "]/I";
140  fBranch = tp->Branch ( fLabel,&ip[0],&*leafs,8000 );
141 }
TObjArray * d
RhoColumn(const char *l)
Definition: RhoColumn.h:125
Int_t i
Definition: run_full.C:25
virtual size_t length() const =0
TBranch * fBranch
Definition: RhoColumn.h:152
__m128 v
Definition: P4_F32vec4.h:4
TString fLabel
Definition: RhoColumn.h:149
void * fPointer
Definition: RhoColumn.h:151
return buf
virtual RhoIntArrColumn::~RhoIntArrColumn ( )
inlinevirtual

Definition at line 228 of file RhoColumn.h.

References RhoColumn::fPointer.

228  {
229  delete[] ( Int_t* ) fPointer;
230  }
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
virtual void RhoIntArrColumn::SetDefValue ( )
inlinevirtual

Implements RhoColumn.

Definition at line 231 of file RhoColumn.h.

References fDefValue, fMax, RhoColumn::fPointer, and i.

Referenced by SetValue().

231  {
232  for ( Int_t i = 0; i < fMax; ++i ) { ( ( Int_t* ) fPointer ) [i] = fDefValue; }
233  }
Int_t i
Definition: run_full.C:25
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 RhoIntArrColumn::SetValue ( const void *  p,
RhoColumn cp = 0 
)
virtual

Implements RhoColumn.

Definition at line 143 of file RhoColumn.cxx.

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

144 {
145  const RhoHTAbsValVector<Int_t>* vp = ( const RhoHTAbsValVector<Int_t>* ) p;
146  if ( (Int_t)vp->length() < fMax ) {
147  cerr << "IntArrColumn::SetValue: input vector too short,"
148  << "use default values" << endl;
149  SetDefValue();
150  } else {
151  for ( Int_t i = 0; i < fMax; ++i ) { ( ( Int_t* ) fPointer ) [i] = ( *vp ) ( i ); }
152  }
153 }
Int_t i
Definition: run_full.C:25
virtual size_t length() const =0
Double_t p
Definition: anasim.C:58
virtual void SetDefValue()
Definition: RhoColumn.h:231
void * fPointer
Definition: RhoColumn.h:151

Member Data Documentation

TBranch* RhoColumn::fBranch
protectedinherited
Int_t RhoIntArrColumn::fDefValue
private

Definition at line 236 of file RhoColumn.h.

Referenced by SetDefValue().

TString RhoColumn::fLabel
protectedinherited
Int_t RhoIntArrColumn::fMax
private

Definition at line 237 of file RhoColumn.h.

Referenced by RhoIntArrColumn(), SetDefValue(), and SetValue().

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