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

Public Member Functions

virtual void * cast (const std::string &a_class) const
 
virtual const std::string & s_cls () const
 
virtual irocopy () const
 
virtual void * cast (cid a_class) const
 
virtual bool stream (buffer &a_buffer)
 
 matrix ()
 
virtual ~matrix ()
 
- Public Member Functions inherited from tools::rroot::iro
virtual ~iro ()
 

Static Public Member Functions

static const std::string & s_class ()
 
static cid id_class ()
 

Protected Member Functions

 matrix (const matrix &a_from)
 
matrixoperator= (const matrix &)
 

Detailed Description

Definition at line 16 of file matrix.

Constructor & Destructor Documentation

◆ matrix() [1/2]

tools::rroot::matrix::matrix ( )
inline

Definition at line 71 of file matrix.

71  {
72 #ifdef TOOLS_MEM
73  mem::increment(s_class().c_str());
74 #endif
75  }

◆ ~matrix()

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

Definition at line 76 of file matrix.

76  {
77 #ifdef TOOLS_MEM
78  mem::decrement(s_class().c_str());
79 #endif
80  }

◆ matrix() [2/2]

tools::rroot::matrix::matrix ( const matrix a_from)
inlineprotected

Definition at line 82 of file matrix.

82 : iro(a_from){}

Member Function Documentation

◆ cast() [1/2]

virtual void* tools::rroot::matrix::cast ( cid  a_class) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 35 of file matrix.

35  {
36  if(void* p = cmp_cast<matrix>(this,a_class)) {return p;}
37  else return 0;
38  }

◆ cast() [2/2]

virtual void* tools::rroot::matrix::cast ( const std::string &  a_class) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 27 of file matrix.

27  {
28  if(void* p = cmp_cast<matrix>(this,a_class)) return p;
29  return 0;
30  }

◆ copy()

virtual iro* tools::rroot::matrix::copy ( ) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 32 of file matrix.

32 {return new matrix(*this);}

◆ id_class()

static cid tools::rroot::matrix::id_class ( )
inlinestatic

Definition at line 34 of file matrix.

34 {return matrix_cid();}

◆ operator=()

matrix& tools::rroot::matrix::operator= ( const matrix )
inlineprotected

Definition at line 83 of file matrix.

83 {return *this;}

◆ s_class()

static const std::string& tools::rroot::matrix::s_class ( )
inlinestatic

Definition at line 22 of file matrix.

22  {
23  static const std::string s_v("tools::rroot::matrix");
24  return s_v;
25  }

◆ s_cls()

virtual const std::string& tools::rroot::matrix::s_cls ( ) const
inlinevirtual

Implements tools::rroot::iro.

Definition at line 31 of file matrix.

31 {return s_class();}

◆ stream()

virtual bool tools::rroot::matrix::stream ( buffer a_buffer)
inlinevirtual

Implements tools::rroot::iro.

Definition at line 40 of file matrix.

40  {
41  unsigned int s, c;
42  short v;
43  if(!a_buffer.read_version(v,s,c)) return false;
44 
45  //printf("debug : tools::rroot::matrix::stream : version %d\n",v);
46 
47  // Version 2 streaming (ROOT/v3-00-6).
48 
49  {uint32 id,bits;
50  if(!Object_stream(a_buffer,id,bits)) return false;}
51 
52  int Nrows;
53  if(!a_buffer.read(Nrows)) return false;
54  int Ncols;
55  if(!a_buffer.read(Ncols)) return false;
56  int Nelems;
57  if(!a_buffer.read(Nelems)) return false;
58  int RowLwb;
59  if(!a_buffer.read(RowLwb)) return false;
60  int ColLwb;
61  if(!a_buffer.read(ColLwb)) return false;
62 
63  //Real_t* Elements; //[fNelems]
64  if(!dummy_array_stream<float>(a_buffer,Nelems)) return false;
65 
66  if(!a_buffer.check_byte_count(s,c,s_store_class())) return false;
67  return true;
68  }

The documentation for this class was generated from the following file:
tools::rroot::matrix::s_class
static const std::string & s_class()
Definition: matrix:22
tools::rroot::Object_stream
bool Object_stream(buffer &a_buffer, uint32 &a_id, uint32 &a_bits)
Definition: object:12
tools::rroot::matrix_cid
cid matrix_cid()
Definition: cids:29
tools::rroot::matrix::matrix
matrix()
Definition: matrix:71
tools::uint32
unsigned int uint32
Definition: typedefs:71