Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RootAddress Class Reference

Definition of a Root address, derived from IOpaqueAddress. More...

#include <RootAddress.h>

List of all members.

Public Member Functions

std::string getBranchname (int i) const
std::string getBranchname (int i) const
Int_t getEntryNr () const
Int_t getEntryNr () const
Short_t getNrBranches () const
Short_t getNrBranches () const
std::string getPath () const
std::string getPath () const
std::string getTreename () const
std::string getTreename () const
void Print () const
void Print () const
 RootAddress (unsigned char svc, const CLID &clid, const std::string path="", const std::string treename="", const std::string branchname="", int entry=-1)
 RootAddress ()
 RootAddress (unsigned char svc, const CLID &clid, const std::string path="", const std::string treename="", const std::string branchname="", int entry=-1)
 RootAddress ()
void setEntryNr (int entry)
void setEntryNr (int entry)
virtual void setTreename (std::string treename)
virtual void setTreename (std::string treename)
virtual ~RootAddress ()
virtual ~RootAddress ()

Private Attributes

std::string m_branchname
 name of TBranch
Int_t m_entrynr
 entry number
Short_t m_nrBranches
 nr of branches associated (m_branchname may contain cvoncatenation)
std::string m_path
 path in TDS
std::string m_treename
 name of TTree


Detailed Description

Definition of a Root address, derived from IOpaqueAddress.

Based on SICb's Address class. Contains Root Treenames and branchnames and nr of entry to be able to retrieve the object. Based on the RootAddress of Glast.


Constructor & Destructor Documentation

RootAddress::RootAddress  )  [inline]
 

00024 {;}

RootAddress::RootAddress unsigned char  svc,
const CLID &  clid,
const std::string  path = "",
const std::string  treename = "",
const std::string  branchname = "",
int  entry = -1
 

00008   : GenericAddress(svc, clid, path, "", 0, 0) 
00009 {
00010   // parse branchname and store what has to be read
00011   m_branchname = branchname;
00012   int s=branchname.size();
00013   m_nrBranches=0;
00014   if (branchname.size()) {
00015     int pos=0,where=1;
00016     while (where!=std::string::npos) {
00017       m_nrBranches++;
00018       where=branchname.find(":",pos);
00019       pos=where+1;
00020     }
00021   }
00022 
00023   m_treename = treename;
00024   m_path=path; 
00025   m_entrynr=entry;
00026 }

virtual RootAddress::~RootAddress  )  [inline, virtual]
 

00026 {}

RootAddress::RootAddress  )  [inline]
 

00024 {;}

RootAddress::RootAddress unsigned char  svc,
const CLID &  clid,
const std::string  path = "",
const std::string  treename = "",
const std::string  branchname = "",
int  entry = -1
 

virtual RootAddress::~RootAddress  )  [inline, virtual]
 

00026 {}


Member Function Documentation

std::string RootAddress::getBranchname int  i  )  const
 

std::string RootAddress::getBranchname int  i  )  const
 

00031                                                  {
00032   int pos,where=-1;
00033   int i=0;
00034   while (i<=nb) {
00035     pos=where+1;
00036     where=m_branchname.find(":",pos);
00037     i++;
00038   }
00039   if (where==std::string::npos) where=m_branchname.size();
00040  
00041   return m_branchname.substr(pos,where-pos);
00042 }

Int_t RootAddress::getEntryNr  )  const [inline]
 

00031 {return m_entrynr;}

Int_t RootAddress::getEntryNr  )  const [inline]
 

00031 {return m_entrynr;}

Short_t RootAddress::getNrBranches  )  const [inline]
 

00032 {return  m_nrBranches;}

Short_t RootAddress::getNrBranches  )  const [inline]
 

00032 {return  m_nrBranches;}

std::string RootAddress::getPath  )  const [inline]
 

00030 {return m_path;}

std::string RootAddress::getPath  )  const [inline]
 

00030 {return m_path;}

std::string RootAddress::getTreename  )  const [inline]
 

00027 {return m_treename;}

std::string RootAddress::getTreename  )  const [inline]
 

00027 {return m_treename;}

void RootAddress::Print  )  const
 

void RootAddress::Print  )  const
 

00027                               {
00028   std::cout << "RootAddress: path "<<m_path<< ", treename "<<m_treename <<" branchname "<<m_branchname<<" entry "<<m_entrynr<<std::endl;
00029 }

void RootAddress::setEntryNr int  entry  )  [inline]
 

00033 {m_entrynr=entry;}

void RootAddress::setEntryNr int  entry  )  [inline]
 

00033 {m_entrynr=entry;}

virtual void RootAddress::setTreename std::string  treename  )  [inline, virtual]
 

00028 {m_treename=treename;}

virtual void RootAddress::setTreename std::string  treename  )  [inline, virtual]
 

00028 {m_treename=treename;}


Member Data Documentation

std::string RootAddress::m_branchname [private]
 

name of TBranch

Int_t RootAddress::m_entrynr [private]
 

entry number

Short_t RootAddress::m_nrBranches [private]
 

nr of branches associated (m_branchname may contain cvoncatenation)

std::string RootAddress::m_path [private]
 

path in TDS

std::string RootAddress::m_treename [private]
 

name of TTree


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:48:50 2011 for BOSS6.5.5 by  doxygen 1.3.9.1