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

Public Member Functions

virtual const std::string & store_cls () const
 
virtual bool stream (buffer &a_buffer) const
 
virtual void out (std::ostream &a_out) const
 
 streamer_info (const std::string &a_cls_store_name, int a_cls_vers, unsigned int a_cls_check_sum)
 
virtual ~streamer_info ()
 
void add (streamer_element *a_elem)
 
- Public Member Functions inherited from tools::wroot::ibo
virtual ~ibo ()
 

Protected Member Functions

 streamer_info (const streamer_info &a_from)
 
streamer_infooperator= (const streamer_info &a_from)
 

Protected Attributes

std::string fName
 
std::string fTitle
 
unsigned int fCheckSum
 
int fStreamedClassVersion
 
obj_array< streamer_elementfElements
 

Detailed Description

Definition at line 21 of file info.

Constructor & Destructor Documentation

◆ streamer_info() [1/2]

tools::wroot::streamer_info::streamer_info ( const std::string &  a_cls_store_name,
int  a_cls_vers,
unsigned int  a_cls_check_sum 
)
inline

Definition at line 54 of file info.

55  :fName(a_cls_store_name)
56  ,fTitle("")
57  ,fCheckSum(a_cls_check_sum)
58  ,fStreamedClassVersion(a_cls_vers)
59  {
60 #ifdef TOOLS_MEM
61  mem::increment(s_class().c_str());
62 #endif
63  }

◆ ~streamer_info()

virtual tools::wroot::streamer_info::~streamer_info ( )
inlinevirtual

Definition at line 64 of file info.

64  {
65 #ifdef TOOLS_MEM
66  mem::decrement(s_class().c_str());
67 #endif
68  }

◆ streamer_info() [2/2]

tools::wroot::streamer_info::streamer_info ( const streamer_info a_from)
inlineprotected

Definition at line 70 of file info.

71  :ibo(a_from)
72  ,fName(a_from.fName)
73  ,fTitle(a_from.fName)
74  ,fCheckSum(a_from.fCheckSum)
75  ,fStreamedClassVersion(a_from.fStreamedClassVersion)
76  ,fElements(a_from.fElements)
77  {
78 #ifdef TOOLS_MEM
79  mem::increment(s_class().c_str());
80 #endif
81  }

Member Function Documentation

◆ add()

void tools::wroot::streamer_info::add ( streamer_element a_elem)
inline

Definition at line 91 of file info.

91 {fElements.push_back(a_elem);}

◆ operator=()

streamer_info& tools::wroot::streamer_info::operator= ( const streamer_info a_from)
inlineprotected

Definition at line 82 of file info.

82  {
83  fName = a_from.fName;
84  fTitle = a_from.fName;
85  fCheckSum = a_from.fCheckSum;
86  fStreamedClassVersion = a_from.fStreamedClassVersion;
87  fElements = a_from.fElements;
88  return *this;
89  }

◆ out()

virtual void tools::wroot::streamer_info::out ( std::ostream &  a_out) const
inlinevirtual

Definition at line 47 of file info.

47  {
48  a_out << "streamer_info for class :"
49  << " " << fName << ", version=" << fStreamedClassVersion
50  << std::endl;
51  tools_vforcit(streamer_element*,fElements,it) (*it)->out(a_out);
52  }

◆ store_cls()

virtual const std::string& tools::wroot::streamer_info::store_cls ( ) const
inlinevirtual

Implements tools::wroot::ibo.

Definition at line 27 of file info.

27  {
28  static const std::string s_v("TStreamerInfo");
29  return s_v;
30  }

◆ stream()

virtual bool tools::wroot::streamer_info::stream ( buffer a_buffer) const
inlinevirtual

Implements tools::wroot::ibo.

Definition at line 31 of file info.

31  {
32  unsigned int c;
33  if(!a_buffer.write_version(2,c)) return false;
34 
35  if(!Named_stream(a_buffer,fName,fTitle)) return false;
36  if(!a_buffer.write(fCheckSum)) return false;
37  if(!a_buffer.write(fStreamedClassVersion)) return false;
38 
39  //ObjArray
40  if(!a_buffer.write_object(fElements)) return false;
41 
42  if(!a_buffer.set_byte_count(c)) return false;
43 
44  return true;
45  }

Member Data Documentation

◆ fCheckSum

unsigned int tools::wroot::streamer_info::fCheckSum
protected

Definition at line 96 of file info.

◆ fElements

obj_array<streamer_element> tools::wroot::streamer_info::fElements
protected

Definition at line 99 of file info.

◆ fName

std::string tools::wroot::streamer_info::fName
protected

Definition at line 93 of file info.

◆ fStreamedClassVersion

int tools::wroot::streamer_info::fStreamedClassVersion
protected

Definition at line 97 of file info.

◆ fTitle

std::string tools::wroot::streamer_info::fTitle
protected

Definition at line 94 of file info.


The documentation for this class was generated from the following file:
tools::wroot::streamer_info::fElements
obj_array< streamer_element > fElements
Definition: info:99
tools::wroot::streamer_info::fTitle
std::string fTitle
Definition: info:94
tools::wroot::Named_stream
bool Named_stream(buffer &a_buffer, const std::string &a_name, const std::string &a_title)
Definition: named:23
tools::wroot::streamer_info::fCheckSum
unsigned int fCheckSum
Definition: info:96
tools_vforcit
#define tools_vforcit(a__T, a__v, a__it)
Definition: forit:7
tools::wroot::streamer_info::fName
std::string fName
Definition: info:93
tools::wroot::streamer_info::fStreamedClassVersion
int fStreamedClassVersion
Definition: info:97