g4tools  5.4.0
Public Member Functions | Protected Attributes | List of all members
tools::rroot::fac Class Reference
Inheritance diagram for tools::rroot::fac:
Inheritance graph
[legend]
Collaboration diagram for tools::rroot::fac:
Collaboration graph
[legend]

Public Member Functions

virtual std::ostream & out () const
 
virtual irocreate (const std::string &a_class, const args &)
 
 fac (std::ostream &a_out)
 
virtual ~fac ()
 
 fac (const fac &a_from)
 
facoperator= (const fac &)
 
- Public Member Functions inherited from tools::rroot::ifac
virtual ~ifac ()
 

Protected Attributes

std::ostream & m_out
 

Additional Inherited Members

- Public Types inherited from tools::rroot::ifac
typedef std::map< char, void * > args
 
- Static Public Member Functions inherited from tools::rroot::ifac
static void * find_args (const args &a_args, char a_key)
 
static char arg_class ()
 
static std::string * arg_class (const args &a_args)
 

Detailed Description

Definition at line 28 of file fac.

Constructor & Destructor Documentation

◆ fac() [1/2]

tools::rroot::fac::fac ( std::ostream &  a_out)
inline

Definition at line 132 of file fac.

132  :m_out(a_out){
133 #ifdef TOOLS_MEM
134  mem::increment(s_class().c_str());
135 #endif
136  }

◆ ~fac()

virtual tools::rroot::fac::~fac ( )
inlinevirtual

Definition at line 137 of file fac.

137  {
138 #ifdef TOOLS_MEM
139  mem::decrement(s_class().c_str());
140 #endif
141  }

◆ fac() [2/2]

tools::rroot::fac::fac ( const fac a_from)
inline

Definition at line 143 of file fac.

143  :ifac(a_from),m_out(a_from.m_out){
144 #ifdef TOOLS_MEM
145  mem::increment(s_class().c_str());
146 #endif
147  }

Member Function Documentation

◆ create()

virtual iro* tools::rroot::fac::create ( const std::string &  a_class,
const args  
)
inlinevirtual

Implements tools::rroot::ifac.

Definition at line 33 of file fac.

33  {
34  //m_out << "tools::rroot::fac::create :"
35  // << " create object of class " << a_class << "..."
36  // << std::endl;
37  if(a_class=="TBranch") {
38  return new branch(m_out,*this);
39  } else if(a_class=="TBranchElement") {
40  return new branch_element(m_out,*this);
41  } else if(a_class=="TBranchObject") {
42  return new branch_object(m_out,*this);
43 
44  } else if(a_class=="TLeafB") {
45  return new leaf<char>(m_out,*this);
46 
47  } else if(a_class=="TLeafS") {
48  return new leaf<short>(m_out,*this);
49 
50  } else if(a_class=="TLeafI") {
51  return new leaf<int>(m_out,*this);
52 
53  } else if(a_class=="TLeafF") {
54  return new leaf<float>(m_out,*this);
55 
56  } else if(a_class=="TLeafD") {
57  return new leaf<double>(m_out,*this);
58 
59  } else if(a_class=="TLeafO") {
60  return new leaf<bool>(m_out,*this);
61 
62  } else if(a_class=="TLeafC") {
63  return new leaf_string(m_out,*this);
64 
65  } else if(a_class=="TLeafElement") {
66  return new leaf_element(m_out,*this);
67 
68  } else if(a_class=="TLeafObject") {
69  return new leaf_object(m_out,*this);
70 
71  } else if(a_class=="TBasket") {
72  return new basket(m_out);
73 
74  // L.Duflot ATLAS file :
75  } else if(a_class=="TTreeIndex") {
76  return new tree_index();
77 
78  } else if(a_class=="TList") {
79  return new obj_list(*this);
80  } else if(a_class=="TVector3") {
81  return new vector3();
82  } else if(a_class=="TMatrix") {
83  return new matrix();
84 
85  } else if(a_class=="TNamed") {
86  return new named();
87 
88  } else if(a_class=="vector<unsigned short>") {
89  return new stl_vector<unsigned short>();
90  } else if(a_class=="vector<short>") {
91  return new stl_vector<short>();
92  } else if(a_class=="vector<unsigned int>") {
93  return new stl_vector<unsigned int>();
94  } else if(a_class=="vector<int>") {
95  return new stl_vector<int>();
96  } else if(a_class=="vector<float>") {
97  return new stl_vector<float>();
98  } else if(a_class=="vector<double>") {
99  return new stl_vector<double>();
100 
101  } else if(a_class=="vector<unsigned long>") { //beurk
102  return new stl_vector<uint64>(); //is it ok to map to an uint64 ?
103 
104  } else if(a_class=="vector<string>") {
105  return new stl_vector_string();
106 
107  } else if(a_class=="vector<vector<unsigned short> >") {
108  return new stl_vector_vector<unsigned short>();
109  } else if(a_class=="vector<vector<short> >") {
110  return new stl_vector_vector<short>();
111  } else if(a_class=="vector<vector<unsigned int> >") {
112  return new stl_vector_vector<unsigned int>();
113  } else if(a_class=="vector<vector<int> >") {
114  return new stl_vector_vector<int>();
115  } else if(a_class=="vector<vector<float> >") {
116  return new stl_vector_vector<float>();
117  } else if(a_class=="vector<vector<double> >") {
118  return new stl_vector_vector<double>();
119 
120  } else if(a_class=="TBranchRef") {
121  return new dummy();
122 
123  } else {
124  m_out << "tools::rroot::fac::create :"
125  << " unknown class " << sout(a_class) << "."
126  << " Create a tools::rroot::dummy object."
127  << std::endl;
128  return new dummy();
129  }
130  }

◆ operator=()

fac& tools::rroot::fac::operator= ( const fac )
inline

Definition at line 148 of file fac.

148 {return *this;}

◆ out()

virtual std::ostream& tools::rroot::fac::out ( ) const
inlinevirtual

Implements tools::rroot::ifac.

Definition at line 32 of file fac.

32 {return m_out;}

Member Data Documentation

◆ m_out

std::ostream& tools::rroot::fac::m_out
protected

Definition at line 163 of file fac.


The documentation for this class was generated from the following file:
tools::rroot::fac::m_out
std::ostream & m_out
Definition: fac:163