BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/RootCnvSvc/include/RootCnvSvc/RootAddress.h
Go to the documentation of this file.
1#ifndef RootAddress_H
2#define RootAddress_H 1
3
4#include "GaudiKernel/GenericAddress.h"
5#include "GaudiKernel/StatusCode.h"
6#include <string>
7#include <vector>
8
9#include "TObject.h"
10
11extern const long int ROOT_StorageType;
12
13/** @class RootAddress
14 * @brief Definition of a Root address, derived from IOpaqueAddress.
15 *
16 * Based on SICb's Address class.
17 * Contains Root Treenames and branchnames and nr of entry
18 * to be able to retrieve the object.
19 *Based on the RootAddress of Glast.
20 */
21class RootAddress : public GenericAddress {
22
23public:
25 RootAddress( unsigned char svc, const CLID& clid, const std::string path = "",
26 const std::string treename = "", const std::string branchname = "",
27 int entry = -1 );
28 virtual ~RootAddress() {}
29 std::string getTreename() const { return m_treename; }
30 virtual void setTreename( std::string treename ) { m_treename = treename; }
31 std::string getBranchname( int i ) const;
32 std::string getPath() const { return m_path; }
33 Int_t getEntryNr() const { return m_entrynr; }
34 Short_t getNrBranches() const { return m_nrBranches; }
35 void setEntryNr( int entry ) { m_entrynr = entry; }
36 void Print() const;
37
38private:
39 /// name of TTree
40 std::string m_treename;
41 /// name of TBranch
42 std::string m_branchname;
43 /// path in TDS
44 std::string m_path;
45 /// entry number
46 Int_t m_entrynr;
47 /// nr of branches associated (m_branchname may contain cvoncatenation)
48 Short_t m_nrBranches;
49};
50
51#endif // RootAddress_H
const long int ROOT_StorageType
std::string getBranchname(int i) const
void Print() const
virtual void setTreename(std::string treename)