CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
RootAddress Class Reference

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

#include <RootAddress.h>

+ Inheritance diagram for RootAddress:

Public Member Functions

 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 ()
 
std::string getTreename () const
 
virtual void setTreename (std::string treename)
 
std::string getBranchname (int i) const
 
std::string getPath () const
 
Int_t getEntryNr () const
 
Short_t getNrBranches () const
 
void setEntryNr (int entry)
 
void Print () const
 

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.

Definition at line 21 of file RootAddress.h.

Constructor & Destructor Documentation

◆ RootAddress() [1/2]

RootAddress::RootAddress ( )
inline

Definition at line 24 of file RootAddress.h.

24{;}

◆ RootAddress() [2/2]

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

Definition at line 7 of file RootAddress.cxx.

8 : GenericAddress(svc, clid, path, "", 0, 0)
9{
10 // parse branchname and store what has to be read
11 m_branchname = branchname;
12 int s=branchname.size();
13 m_nrBranches=0;
14 if (branchname.size()) {
15 int pos=0,where=1;
16 while (where!=std::string::npos) {
17 m_nrBranches++;
18 where=branchname.find(":",pos);
19 pos=where+1;
20 }
21 }
22
23 m_treename = treename;
24 m_path=path;
25 m_entrynr=entry;
26}
XmlRpcServer s

◆ ~RootAddress()

virtual RootAddress::~RootAddress ( )
inlinevirtual

Definition at line 26 of file RootAddress.h.

26{}

Member Function Documentation

◆ getBranchname()

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

Definition at line 31 of file RootAddress.cxx.

31 {
32 int pos,where=-1;
33 int i=0;
34 while (i<=nb) {
35 pos=where+1;
36 where=m_branchname.find(":",pos);
37 i++;
38 }
39 if (where==std::string::npos) where=m_branchname.size();
40
41 return m_branchname.substr(pos,where-pos);
42}

Referenced by RootEventBaseCnv::createObj().

◆ getEntryNr()

Int_t RootAddress::getEntryNr ( ) const
inline

Definition at line 31 of file RootAddress.h.

31{return m_entrynr;}

Referenced by RootEventBaseCnv::createObj().

◆ getNrBranches()

Short_t RootAddress::getNrBranches ( ) const
inline

Definition at line 32 of file RootAddress.h.

32{return m_nrBranches;}

Referenced by RootEventBaseCnv::createObj().

◆ getPath()

std::string RootAddress::getPath ( ) const
inline

Definition at line 30 of file RootAddress.h.

30{return m_path;}

Referenced by RootEventBaseCnv::createObj().

◆ getTreename()

◆ Print()

void RootAddress::Print ( ) const

Definition at line 27 of file RootAddress.cxx.

27 {
28 std::cout << "RootAddress: path "<<m_path<< ", treename "<<m_treename <<" branchname "<<m_branchname<<" entry "<<m_entrynr<<std::endl;
29}

◆ setEntryNr()

void RootAddress::setEntryNr ( int entry)
inline

Definition at line 33 of file RootAddress.h.

33{m_entrynr=entry;}

Referenced by RootEventBaseCnv::createObj().

◆ setTreename()

virtual void RootAddress::setTreename ( std::string treename)
inlinevirtual

Definition at line 28 of file RootAddress.h.

28{m_treename=treename;}

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