Jpp  15.0.1-rc.2-highQE
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
JROOT::JChainReader< T > Class Template Reference

Auxiliary class for template TChain reading. More...

#include <JChainReader.hh>

Inheritance diagram for JROOT::JChainReader< T >:
JROOT::JRootAddress< T > JROOT::JTreeParameters

Public Member Functions

 JChainReader ()
 Default constructor. More...
 
 JChainReader (const JTreeParameters &parameters)
 Constructor. More...
 
 JChainReader (const JChainReader< T > &reader)
 Copy constructor. More...
 
void Reset (Option_t *option=NULL)
 Reset this TChain. More...
 
void release ()
 Release memory. More...
 
TgetAddress () const
 Get address. More...
 
const JTreeParametersgetTreeParameters () const
 Get TTree parameters. More...
 
const TString & getTreeName () const
 Get TTree name. More...
 
const TString & getTreeTitle () const
 Get TTree title. More...
 
const TString & getBranchName () const
 Get TBranch name. More...
 
int getCompressionLevel () const
 Get compression level. More...
 
int getBasketSize () const
 Get basket size. More...
 
int getSplitLevel () const
 Get split level. More...
 

Protected Member Functions

void configure ()
 Configure this TChain. More...
 

Protected Attributes

Taddress
 
TString treeName
 TTree name. More...
 
TString treeTitle
 TTree title. More...
 
TString branchName
 TBranch name. More...
 
int compressionLevel
 TBranch compression level. More...
 
int basketSize
 TBranch basket size. More...
 
int splitLevel
 TBranch split level. More...
 

Detailed Description

template<class T>
class JROOT::JChainReader< T >

Auxiliary class for template TChain reading.

Definition at line 24 of file JChainReader.hh.

Constructor & Destructor Documentation

template<class T>
JROOT::JChainReader< T >::JChainReader ( )
inline

Default constructor.

Note that the default TTree parameters are obtained using template method JROOT::getTreeParameters.

Definition at line 35 of file JChainReader.hh.

35  :
36  JTreeParameters(JROOT::getTreeParameters<T>())
37  {
38  configure();
39  }
JTreeParameters(const TString &treeName, const TString &treeTitle, const TString &branchName="", const int compressionLevel=1, const int basketSize=65536, const int splitLevel=1)
Constructor.
void configure()
Configure this TChain.
Definition: JChainReader.hh:92
template<class T>
JROOT::JChainReader< T >::JChainReader ( const JTreeParameters parameters)
inline

Constructor.

Parameters
parametersparameters of TTree

Definition at line 47 of file JChainReader.hh.

47  :
48  JTreeParameters(parameters)
49  {
50  configure();
51  }
JTreeParameters(const TString &treeName, const TString &treeTitle, const TString &branchName="", const int compressionLevel=1, const int basketSize=65536, const int splitLevel=1)
Constructor.
void configure()
Configure this TChain.
Definition: JChainReader.hh:92
template<class T>
JROOT::JChainReader< T >::JChainReader ( const JChainReader< T > &  reader)
inline

Copy constructor.

Note that the TTree parameters are copied but not the contents.

Parameters
readerTChain reader

Definition at line 61 of file JChainReader.hh.

61  :
63  {
64  configure();
65  }
JTreeParameters(const TString &treeName, const TString &treeTitle, const TString &branchName="", const int compressionLevel=1, const int basketSize=65536, const int splitLevel=1)
Constructor.
const JTreeParameters & getTreeParameters() const
Get TTree parameters.
void configure()
Configure this TChain.
Definition: JChainReader.hh:92

Member Function Documentation

template<class T>
void JROOT::JChainReader< T >::Reset ( Option_t *  option = NULL)
inline

Reset this TChain.

This method executes the following steps:

  1. TChain::Reset();
  2. releases the allocated memory and resets the internal pointer;
  3. SetBranchAddress();
Parameters
optionoption

Definition at line 78 of file JChainReader.hh.

79  {
80  TChain::Reset(option);
81 
82  this->release();
83 
84  this->SetBranchAddress(this->getBranchName(), &this->address);
85  }
void release()
Release memory.
Definition: JRootAddress.hh:42
const TString & getBranchName() const
Get TBranch name.
template<class T>
void JROOT::JChainReader< T >::configure ( )
inlineprotected

Configure this TChain.

Definition at line 92 of file JChainReader.hh.

93  {
94  this->SetNameTitle(this->getTreeName(), this->getTreeTitle());
95 
96  this->SetBranchAddress(this->getBranchName(), &this->address);
97  }
const TString & getBranchName() const
Get TBranch name.
const TString & getTreeTitle() const
Get TTree title.
const TString & getTreeName() const
Get TTree name.
template<class T>
void JROOT::JRootAddress< T >::release ( )
inlineinherited

Release memory.

Definition at line 42 of file JRootAddress.hh.

43  {
44  if (address != NULL) {
45 
46  delete address;
47 
48  address = NULL;
49  }
50  }
template<class T>
T* JROOT::JRootAddress< T >::getAddress ( ) const
inlineinherited

Get address.

Returns
address

Definition at line 58 of file JRootAddress.hh.

59  {
60  return address;
61  }
const JTreeParameters& JROOT::JTreeParameters::getTreeParameters ( ) const
inlineinherited

Get TTree parameters.

Returns
TTree parameters

Definition at line 63 of file JTreeParameters.hh.

64  {
65  return static_cast<const JTreeParameters&>(*this);
66  }
Data structure for TTree parameters.
const TString& JROOT::JTreeParameters::getTreeName ( ) const
inlineinherited

Get TTree name.

Returns
TTree name

Definition at line 74 of file JTreeParameters.hh.

75  {
76  return treeName;
77  }
TString treeName
TTree name.
const TString& JROOT::JTreeParameters::getTreeTitle ( ) const
inlineinherited

Get TTree title.

Returns
TTree title

Definition at line 85 of file JTreeParameters.hh.

86  {
87  return treeTitle;
88  }
TString treeTitle
TTree title.
const TString& JROOT::JTreeParameters::getBranchName ( ) const
inlineinherited

Get TBranch name.

Returns
TBranch name

Definition at line 96 of file JTreeParameters.hh.

97  {
98  return (branchName != "" ? branchName : treeName);
99  }
TString treeName
TTree name.
TString branchName
TBranch name.
int JROOT::JTreeParameters::getCompressionLevel ( ) const
inlineinherited

Get compression level.

Returns
compression level

Definition at line 107 of file JTreeParameters.hh.

108  {
109  return compressionLevel;
110  }
int compressionLevel
TBranch compression level.
int JROOT::JTreeParameters::getBasketSize ( ) const
inlineinherited

Get basket size.

Returns
basket size

Definition at line 118 of file JTreeParameters.hh.

119  {
120  return basketSize;
121  }
int basketSize
TBranch basket size.
int JROOT::JTreeParameters::getSplitLevel ( ) const
inlineinherited

Get split level.

Returns
split level

Definition at line 129 of file JTreeParameters.hh.

130  {
131  return splitLevel;
132  }
int splitLevel
TBranch split level.

Member Data Documentation

template<class T>
T* JROOT::JRootAddress< T >::address
protectedinherited

Definition at line 64 of file JRootAddress.hh.

TString JROOT::JTreeParameters::treeName
protectedinherited

TTree name.

Definition at line 155 of file JTreeParameters.hh.

TString JROOT::JTreeParameters::treeTitle
protectedinherited

TTree title.

Definition at line 156 of file JTreeParameters.hh.

TString JROOT::JTreeParameters::branchName
protectedinherited

TBranch name.

Definition at line 157 of file JTreeParameters.hh.

int JROOT::JTreeParameters::compressionLevel
protectedinherited

TBranch compression level.

Definition at line 158 of file JTreeParameters.hh.

int JROOT::JTreeParameters::basketSize
protectedinherited

TBranch basket size.

Definition at line 159 of file JTreeParameters.hh.

int JROOT::JTreeParameters::splitLevel
protectedinherited

TBranch split level.

Definition at line 160 of file JTreeParameters.hh.


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