g4tools  5.4.0
Classes | Typedefs | Functions
tools::rroot Namespace Reference

Classes

class  base_leaf
 
class  basket
 
class  branch
 
class  branch_element
 
class  branch_object
 
class  buffer
 
class  directory
 
class  dummy
 
class  dummy_fac
 
class  dummy_streamer_element
 
class  fac
 
class  fac_tree_holder
 
class  fac_tree_ntuple
 
class  file
 
class  graph
 
class  ifac
 
class  ifile
 
class  iobject
 
class  iro
 
class  iros
 
class  key
 
class  leaf
 
class  leaf_element
 
class  leaf_object
 
class  leaf_string
 
class  matrix
 
class  member_reader
 
class  named
 
class  ntuple
 
class  obj_array
 
class  obj_list
 
class  rbuf
 
class  stl_vector
 
class  stl_vector_string
 
class  stl_vector_vector
 
class  streamer_element
 
class  streamer_fac
 
class  streamer_info
 
class  TDirectory
 
class  tree
 
class  tree_index
 
class  vector3
 

Typedefs

typedef unsigned int date
 
typedef int64 seek
 
typedef int seek32
 
typedef histo::histo_data< double, unsigned int, unsigned int, double > hd_data
 
typedef histo::profile_data< double, unsigned int, unsigned int, double, double > pd_data
 
typedef histo::profile_data< double, unsigned int, unsigned int, double, double > pd_data_t
 
typedef histo::axis< double, unsigned int > axis_t
 
typedef std::map< std::string, std::string > annotations_t
 

Functions

bool dummy_TXxx_pointer_stream (buffer &a_buffer, ifac &a_fac)
 
template<class T >
bool pointer_stream (buffer &a_buffer, ifac &a_fac, ifac::args &a_args, const std::string &a_T_class, T *&a_obj, bool &a_created)
 
template<class T >
bool pointer_stream (buffer &a_buffer, ifac &a_fac, ifac::args &a_args, cid a_T_class, T *&a_obj, bool &a_created)
 
template<class T >
bool pointer_stream (buffer &a_buffer, ifac &a_fac, ifac::args &a_args, T *&a_obj, bool &a_created)
 
template<class T >
bool fixed_array_stream (buffer &a_buffer, int a_n, T *&a_v)
 
cid base_cid ()
 
cid iros_cid ()
 
cid obj_list_cid ()
 
cid hash_list_cid ()
 
cid obj_array_cid ()
 
cid dummy_cid ()
 
cid basket_cid ()
 
cid branch_cid ()
 
cid branch_element_cid ()
 
cid graph_cid ()
 
cid matrix_cid ()
 
cid leaf_string_cid ()
 
cid leaf_element_cid ()
 
cid streamer_info_cid ()
 
cid streamer_element_cid ()
 
cid stl_vector_string_cid ()
 
cid named_cid ()
 
cid leaf_object_cid ()
 
cid branch_object_cid ()
 
cid base_leaf_cid ()
 
cid stl_vector_cid ()
 
cid stl_vector_vector_cid ()
 
cid clones_array_cid ()
 
cid vector3_cid ()
 
cid stl_vector_obj_cid ()
 
const std::string & TH1F_cls ()
 
const std::string & TH1D_cls ()
 
const std::string & TH2F_cls ()
 
const std::string & TH2D_cls ()
 
const std::string & TH3D_cls ()
 
const std::string & TProfile_cls ()
 
const std::string & TProfile2D_cls ()
 
const std::string & TDirectory_cls ()
 
const std::string & TGeoManager_cls ()
 
const std::string & TList_cls ()
 
const std::string & TNamed_cls ()
 
const std::string & leaf_store_class (char)
 
const std::string & leaf_store_class (short)
 
const std::string & leaf_store_class (int)
 
const std::string & leaf_store_class (float)
 
const std::string & leaf_store_class (double)
 
const std::string & leaf_store_class (bool)
 
const std::string & leaf_float_cls ()
 
const std::string & leaf_double_cls ()
 
const std::string & leaf_int_cls ()
 
const std::string & leaf_bool_cls ()
 
leaf< int > * cast_leaf_int (base_leaf &a_leaf)
 
leaf< float > * cast_leaf_float (base_leaf &a_leaf)
 
leaf< double > * cast_leaf_double (base_leaf &a_leaf)
 
bool Named_stream (buffer &a_buffer, std::string &a_name, std::string &a_title)
 
bool AttLine_stream (buffer &a_buffer, short &a_color, short &a_style, short &a_width)
 
bool AttFill_stream (buffer &a_buffer, short &a_color, short &a_style)
 
bool AttMarker_stream (buffer &a_buffer)
 
bool GeoAtt_stream (buffer &a_buffer)
 
bool Att3D_stream (buffer &a_buffer)
 
template<class T >
bool Array_stream (buffer &a_buffer, std::vector< T > &a_v)
 
template<class T >
bool dummy_array_stream (buffer &a_buffer, int a_n)
 
bool Object_stream (buffer &a_buffer, uint32 &a_id, uint32 &a_bits)
 
TDirectoryfind_dir (directory &a_dir, const std::string &a_name)
 
directoryfind_path_dir (directory &a_from, const std::string &a_path)
 
bool read_key (std::ostream &a_out, ifile &a_file, key &a_key, bool a_dump)
 
bool key_to_annotations (ifile &a_file, key &a_key, std::map< std::string, std::string > &a_annotations, bool a_warn=true)
 
histo::h1dkey_to_h1d (ifile &a_file, key &a_key, bool a_warn=true)
 
histo::h2dkey_to_h2d (ifile &a_file, key &a_key, bool a_warn=true)
 
histo::h3dkey_to_h3d (ifile &a_file, key &a_key)
 
histo::p1dkey_to_p1d (ifile &a_file, key &a_key)
 
histo::p2dkey_to_p2d (ifile &a_file, key &a_key)
 
treekey_to_tree (ifile &a_file, ifac &a_fac, key &a_key, bool a_warn=true)
 
void read (std::ostream &a_out, ifile &a_file, const std::vector< key * > &a_keys, bool a_recursive, bool a_ls, bool a_dump, unsigned int a_spaces)
 
uint32 big_file_version_tag ()
 
bool AttAxis_stream (buffer &a_buffer)
 
bool Axis_stream (buffer &a_buffer, histo::axis< double, unsigned int > &a_fAxis)
 
bool null_epsil (double a_1, double a_2, double a_prec=-5)
 
bool TH_read_1D (buffer &a_buffer, hd_data &a_data, double &a_entries, double &a_Sw, double &a_Sw2, double &a_Sxw, double &a_Sx2w)
 
bool TH_read_2D (buffer &a_buffer, hd_data &a_data, double &a_entries, double &a_Sw, double &a_Sw2, double &a_Sxw, double &a_Sx2w, double &a_Syw, double &a_Sy2w)
 
bool TH_read_3D (buffer &a_buffer, hd_data &a_data, double &a_entries, double &a_Sw, double &a_Sw2, double &a_Sxw, double &a_Sx2w, double &a_Syw, double &a_Sy2w, double &a_Szw, double &a_Sz2w)
 
histo::h1dTH1F_stream (buffer &a_buffer)
 
histo::h1dTH1D_stream (buffer &a_buffer)
 
histo::h2dTH2F_stream (buffer &a_buffer)
 
histo::h2dTH2D_stream (buffer &a_buffer)
 
histo::h3dTH3D_stream (buffer &a_buffer)
 
histo::p1dTProfile_stream (buffer &a_buffer)
 
histo::p2dTProfile2D_stream (buffer &a_buffer)
 
void dump (std::ostream &a_out, ifile &a_file, const std::vector< key * > &a_keys, bool a_recursive, unsigned int a_spaces=0)
 
bool Axis_read_v0_v3 (buffer &a_buffer, axis_t &a_axis)
 
bool Axis_read_v4_v6 (buffer &a_buffer, axis_t &a_axis)
 
bool Axis_read_v7 (buffer &a_buffer, axis_t &a_axis)
 
unsigned int new_bin_number (const std::vector< axis_t > &aAxes)
 
template<class T >
void add_outflow (const std::vector< axis_t > &aAxes, std::vector< T > &aVector)
 
void add_outflow (std::vector< axis_t > &aAxes)
 
bool read_v0 (buffer &a_buffer, pd_data_t &a_data)
 
bool read_v1 (buffer &a_buffer, pd_data_t &a_data)
 
bool read_v2 (buffer &a_buffer, pd_data_t &a_data)
 
bool read_v3 (buffer &a_buffer, pd_data_t &a_data)
 
bool read_v4 (buffer &a_buffer, pd_data_t &a_data)
 
bool read_v5 (buffer &a_buffer, pd_data_t &a_data)
 
bool read_v6 (buffer &a_buffer, pd_data_t &a_data)
 
bool read_v7 (buffer &a_buffer, pd_data_t &a_data)
 
bool read_annotations (buffer &a_buffer, annotations_t &a_annotations)
 
bool read_THistogram (buffer &a_buffer, pd_data_t &a_data, annotations_t &a_annotations)
 
const std::string & THistogram_cls ()
 
bool read_key_THistogram (ifile &a_file, key &a_key, pd_data_t &a_data, annotations_t &a_annotations, bool a_warn=true)
 
histo::h1dTHistogram_to_h1d (const pd_data_t &a_data)
 
histo::h2dTHistogram_to_h2d (const pd_data_t &a_data)
 
histo::p1dTHistogram_to_p1d (const pd_data_t &a_data)
 
histo::p2dTHistogram_to_p2d (const pd_data_t &a_data)
 
const std::string & TTree_cls ()
 
treefind_tree (file &a_file, ifac &a_fac, const std::string &a_name, bool a_map_objs=false)
 
branch_elementfind_be (tree &a_tree, const std::string &a_name)
 
template<class T >
stl_vector< T > * find_vec (ifile &a_file, branch_element &a_be, uint64 a_event)
 
template<class LEAF >
bool find_leaf (tree &a_tree, const std::string &a_name, branch *&a_branch, LEAF *&a_leaf)
 
branch_elementfind_branch_element (tree &a_tree, const std::string &a_name)
 
template<class TYPE >
bool read_leaf (ifile &a_file, branch &a_branch, leaf< TYPE > &a_leaf, uint64 a_event, TYPE &a_value)
 
bool read_leaf_object (ifile &a_file, branch &a_branch, leaf_object &a_leaf, uint64 a_event)
 
template<class TYPE >
stl_vector< TYPE > * read_std_vec (ifile &a_file, branch_element &a_branch, uint64 a_event)
 

Typedef Documentation

◆ annotations_t

typedef std::map<std::string,std::string> tools::rroot::annotations_t

Definition at line 20 of file THistogram.

◆ axis_t

typedef histo::axis<double,unsigned int> tools::rroot::axis_t

Definition at line 19 of file THistogram.

◆ date

typedef unsigned int tools::rroot::date

Definition at line 10 of file date.

◆ hd_data

typedef histo::histo_data<double,unsigned int,unsigned int,double> tools::rroot::hd_data

Definition at line 36 of file streamers.

◆ pd_data

typedef histo::profile_data<double,unsigned int,unsigned int,double,double> tools::rroot::pd_data

Definition at line 37 of file streamers.

◆ pd_data_t

typedef histo::profile_data<double,unsigned int,unsigned int,double,double> tools::rroot::pd_data_t

Definition at line 18 of file THistogram.

◆ seek

Definition at line 16 of file seek.

◆ seek32

typedef int tools::rroot::seek32

Definition at line 17 of file seek.

Function Documentation

◆ add_outflow() [1/2]

template<class T >
void tools::rroot::add_outflow ( const std::vector< axis_t > &  aAxes,
std::vector< T > &  aVector 
)
inline

Definition at line 87 of file THistogram.

87  {
88  // aAxes[].m_offset contains the offset without outflow.
89  unsigned int dim = aAxes.size();
90  // new size and offsets :
91  std::vector<int> aoff(dim);
92 
93  int newn = 1;
94  {for(unsigned iaxis=0;iaxis<dim;iaxis++) newn *= (aAxes[iaxis].bins()+2);}
95 
96  aoff[0] = 1;
97  {for(unsigned iaxis=1;iaxis<dim;iaxis++) {
98  aoff[iaxis] = aoff[iaxis-1] * (aAxes[iaxis-1].bins()+2);
99  }}
100  // copy :
101  std::vector<T> tmp = aVector;
102  int oldn = (int)tmp.size();
103  aVector.resize(newn,0);
104  // Copy :
105  std::vector<int> is(dim);
106  int offset;
107  for(int index=0;index<oldn;index++) {
108  // Get new offset of index :
109  offset = index;
110  {for(int iaxis=dim-1;iaxis>=0;iaxis--) {
111  is[iaxis] = offset/aAxes[iaxis].m_offset;
112  offset -= is[iaxis] * aAxes[iaxis].m_offset;
113  }}
114  // new offset :
115  offset = 0;
116  {for(unsigned iaxis=0;iaxis<dim;iaxis++) offset += is[iaxis] * aoff[iaxis];}
117  aVector[offset] = tmp[index];
118  }
119 }

◆ add_outflow() [2/2]

void tools::rroot::add_outflow ( std::vector< axis_t > &  aAxes)
inline

Definition at line 121 of file THistogram.

121  {
122  // Restore new offsets :
123  aAxes[0].m_offset = 1;
124  for(unsigned int iaxis=1;iaxis<aAxes.size();iaxis++)
125  aAxes[iaxis].m_offset = aAxes[iaxis-1].m_offset * (aAxes[iaxis-1].bins()+2);
126 }

◆ Array_stream()

template<class T >
bool tools::rroot::Array_stream ( buffer a_buffer,
std::vector< T > &  a_v 
)
inline

Definition at line 81 of file named.

81  {
82  a_v.clear();
83  int sz;
84  if(!a_buffer.read(sz)) return false;
85  //check sz is not crazy :
86  if(!a_buffer.check_eob(sz)) return false;
87  a_v.resize(sz);
88  if(!a_buffer.read_fast_array<T>(vec_data(a_v),sz)) return false;
89  return true;
90 }

◆ Att3D_stream()

bool tools::rroot::Att3D_stream ( buffer a_buffer)
inline

Definition at line 72 of file named.

72  {
73  short v;
74  unsigned int s, c;
75  if(!a_buffer.read_version(v,s,c)) return false;
76  if(!a_buffer.check_byte_count(s,c,"TAtt3D")) return false;
77  return true;
78 }

◆ AttAxis_stream()

bool tools::rroot::AttAxis_stream ( buffer a_buffer)
inline

Definition at line 39 of file streamers.

39  {
40  int fNdivisions = 510; //Number of divisions(10000*n3 + 100*n2 + n1)
41  short fAxisColor = 1; //color of the line axis
42  short fLabelColor = 1; //color of labels
43  short fLabelFont = 62; //font for labels
44  float fLabelOffset = 0.005F; //offset of labels
45  float fLabelSize = 0.04F; //size of labels
46  float fTickLength = 0.03F; //length of tick marks
47  float fTitleOffset = 1; //offset of axis title
48  float fTitleSize = 0.04F; //size of axis title
49  short fTitleColor = 1; //color of axis title
50  short fTitleFont = 62; //font for axis title
51 
52  // Version 4 streaming (ROOT/v3-00-6).
53  short v;
54  unsigned int s, c;
55  if(!a_buffer.read_version(v,s,c)) return false;
56 
57  if(!a_buffer.read(fNdivisions)) return false;
58  if(!a_buffer.read(fAxisColor)) return false;
59  if(!a_buffer.read(fLabelColor)) return false;
60  if(!a_buffer.read(fLabelFont)) return false;
61  if(!a_buffer.read(fLabelOffset)) return false;
62  if(!a_buffer.read(fLabelSize)) return false;
63  if(!a_buffer.read(fTickLength)) return false;
64  if(!a_buffer.read(fTitleOffset)) return false;
65  if(!a_buffer.read(fTitleSize)) return false;
66  if(!a_buffer.read(fTitleColor)) return false;
67  if(!a_buffer.read(fTitleFont)) return false;
68 
69  if(!a_buffer.check_byte_count(s, c,"TAttAxis")) return false;
70  return true;
71 }

◆ AttFill_stream()

bool tools::rroot::AttFill_stream ( buffer a_buffer,
short &  a_color,
short &  a_style 
)
inline

Definition at line 38 of file named.

38  {
39  short v;
40  unsigned int s, c;
41  if(!a_buffer.read_version(v,s,c)) return false;
42  if(!a_buffer.read(a_color)) return false;
43  if(!a_buffer.read(a_style)) return false;
44  if(!a_buffer.check_byte_count(s,c,"TAttFill")) return false;
45  return true;
46 }

◆ AttLine_stream()

bool tools::rroot::AttLine_stream ( buffer a_buffer,
short &  a_color,
short &  a_style,
short &  a_width 
)
inline

Definition at line 27 of file named.

27  {
28  short v;
29  unsigned int s, c;
30  if(!a_buffer.read_version(v,s,c)) return false;
31  if(!a_buffer.read(a_color)) return false;
32  if(!a_buffer.read(a_style)) return false;
33  if(!a_buffer.read(a_width)) return false;
34  if(!a_buffer.check_byte_count(s,c,"TAttLine")) return false;
35  return true;
36 }

◆ AttMarker_stream()

bool tools::rroot::AttMarker_stream ( buffer a_buffer)
inline

Definition at line 48 of file named.

48  {
49  short fMarkerColor;
50  short fMarkerStyle;
51  float fMarkerWidth;
52  short v;
53  unsigned int s, c;
54  if(!a_buffer.read_version(v,s,c)) return false;
55  if(!a_buffer.read(fMarkerColor)) return false;
56  if(!a_buffer.read(fMarkerStyle)) return false;
57  if(!a_buffer.read(fMarkerWidth)) return false;
58  if(!a_buffer.check_byte_count(s,c,"TAttMarker")) return false;
59  return true;
60 }

◆ Axis_read_v0_v3()

bool tools::rroot::Axis_read_v0_v3 ( buffer a_buffer,
axis_t a_axis 
)
inline

Definition at line 22 of file THistogram.

22  {
23  int idummy;
24  double ddummy;
25  if(!a_buffer.read(a_axis.m_minimum_value)) return false;
26  if(!a_buffer.read(a_axis.m_maximum_value)) return false;
27  if(!a_buffer.read(a_axis.m_offset)) return false;
28  if(!a_buffer.read(a_axis.m_number_of_bins)) return false;
29  if(!a_buffer.read(idummy)) return false; //fOverFlow
30  if(!a_buffer.read(idummy)) return false; //fUnderFlow
31  if(!a_buffer.read(a_axis.m_bin_width)) return false;
32  if(!a_buffer.read(ddummy)) return false; //fSxw
33  if(!a_buffer.read(ddummy)) return false; //fSx2w
34  a_axis.m_fixed = true;
35  a_axis.m_edges.clear();
36  return true;
37 }

◆ Axis_read_v4_v6()

bool tools::rroot::Axis_read_v4_v6 ( buffer a_buffer,
axis_t a_axis 
)
inline

Definition at line 39 of file THistogram.

39  {
40  int idummy;
41  double ddummy;
42  if(!a_buffer.read(a_axis.m_offset)) return false;
43  if(!a_buffer.read(idummy)) return false; //fOverFlow
44  if(!a_buffer.read(idummy)) return false; //fUnderFlow
45  if(!a_buffer.read(ddummy)) return false; //fSxw
46  if(!a_buffer.read(ddummy)) return false; //fSx2w
47  if(!a_buffer.read(a_axis.m_number_of_bins)) return false;
48  if(!a_buffer.read(a_axis.m_minimum_value)) return false;
49  if(!a_buffer.read(a_axis.m_maximum_value)) return false;
50  if(!a_buffer.read(a_axis.m_fixed)) return false;
51  if(!a_buffer.read(a_axis.m_bin_width)) return false;
52  int edgen;
53  if(!a_buffer.read(edgen)) return false;
54  for(int count=0;count<edgen;count++) {
55  double value;
56  if(!a_buffer.read(value)) return false;
57  a_axis.m_edges.push_back(value);
58  }
59  return true;
60 }

◆ Axis_read_v7()

bool tools::rroot::Axis_read_v7 ( buffer a_buffer,
axis_t a_axis 
)
inline

Definition at line 62 of file THistogram.

62  {
63  if(!a_buffer.read(a_axis.m_offset)) return false;
64  if(!a_buffer.read(a_axis.m_number_of_bins)) return false;
65  if(!a_buffer.read(a_axis.m_minimum_value)) return false;
66  if(!a_buffer.read(a_axis.m_maximum_value)) return false;
67  if(!a_buffer.read(a_axis.m_fixed)) return false;
68  if(!a_buffer.read(a_axis.m_bin_width)) return false;
69  int edgen;
70  if(!a_buffer.read(edgen)) return false;
71  for(int count=0;count<edgen;count++) {
72  double value;
73  if(!a_buffer.read(value)) return false;
74  a_axis.m_edges.push_back(value);
75  }
76  return true;
77 }

◆ Axis_stream()

bool tools::rroot::Axis_stream ( buffer a_buffer,
histo::axis< double, unsigned int > &  a_fAxis 
)
inline

Definition at line 73 of file streamers.

73  {
74  // Version 6 streaming (ROOT/v3-00-6).
75  short v;
76  unsigned int s, c;
77  if(!a_buffer.read_version(v,s,c)) return false;
78 
79  std::string name;
80  std::string title;
81  if(!Named_stream(a_buffer,name,title)) return false;
82 
83  if(!AttAxis_stream(a_buffer)) return false;
84 
85  int number;
86  if(!a_buffer.read(number)) return false;
87  double min;
88  if(!a_buffer.read(min)) return false;
89  double max;
90  if(!a_buffer.read(max)) return false;
91 
92  std::vector<double> edges;
93  if(!Array_stream<double>(a_buffer,edges)) return false; //fXbins TArrayD
94 
95  size_t edgen = edges.size();
96  if(!edgen) {
97  a_fAxis.configure(number,min,max);
98  } else {
99  std::vector<double> vedges;
100  for(size_t index=0;index<edgen;index++) {
101  vedges.push_back(edges[index]);
102  }
103  a_fAxis.configure(vedges);
104  }
105 
106  int First;
107  if(!a_buffer.read(First)) return false;
108  int Last;
109  if(!a_buffer.read(Last)) return false;
110 
111  if(v>=8) { //fBits2.
112  unsigned short dummy;
113  if(!a_buffer.read(dummy)) return false;
114  }
115 
116  //Bool_t
117  unsigned char TimeDisplay;
118  if(!a_buffer.read(TimeDisplay)) return false;
119 
120  //TString
121  std::string TimeFormat;
122  if(!a_buffer.read(TimeFormat)) return false;
123 
124  if(v>=7) {
125  //THashList*
126  dummy_fac fac(a_buffer.out());
127  if(!dummy_TXxx_pointer_stream(a_buffer,fac)) return false;
128  }
129 
130  if(!a_buffer.check_byte_count(s,c,"TAxis")) return false;
131  return true;
132 }

◆ base_cid()

cid tools::rroot::base_cid ( )
inline

Definition at line 14 of file cids.

14 {return 100;} //must be > cids in ../cids.

◆ base_leaf_cid()

cid tools::rroot::base_leaf_cid ( )
inline

Definition at line 45 of file cids.

45 {return base_cid()+20;} //+12=32

◆ basket_cid()

cid tools::rroot::basket_cid ( )
inline

Definition at line 23 of file cids.

23 {return base_cid()+5;}

◆ big_file_version_tag()

uint32 tools::rroot::big_file_version_tag ( )
inline

Definition at line 19 of file seek.

19 {return 1000;}

◆ branch_cid()

cid tools::rroot::branch_cid ( )
inline

Definition at line 24 of file cids.

24 {return base_cid()+6;}

◆ branch_element_cid()

cid tools::rroot::branch_element_cid ( )
inline

Definition at line 25 of file cids.

25 {return base_cid()+7;}

◆ branch_object_cid()

cid tools::rroot::branch_object_cid ( )
inline

Definition at line 42 of file cids.

42 {return base_cid()+19;}

◆ cast_leaf_double()

leaf<double>* tools::rroot::cast_leaf_double ( base_leaf a_leaf)
inline

Definition at line 484 of file leaf.

484 {return safe_cast<base_leaf, leaf<double> >(a_leaf);}

◆ cast_leaf_float()

leaf<float>* tools::rroot::cast_leaf_float ( base_leaf a_leaf)
inline

Definition at line 483 of file leaf.

483 {return safe_cast<base_leaf, leaf<float> >(a_leaf);}

◆ cast_leaf_int()

leaf<int>* tools::rroot::cast_leaf_int ( base_leaf a_leaf)
inline

Definition at line 482 of file leaf.

482 {return safe_cast<base_leaf, leaf<int> >(a_leaf);}

◆ clones_array_cid()

cid tools::rroot::clones_array_cid ( )
inline

Definition at line 50 of file cids.

50 {return base_cid()+60;}

◆ dummy_array_stream()

template<class T >
bool tools::rroot::dummy_array_stream ( buffer a_buffer,
int  a_n 
)
inline

Definition at line 93 of file named.

93  {
94  char is_array;
95  if(!a_buffer.read(is_array)) return false;
96  if(!is_array) return true;
97  if(!a_n) return true;
98  T* v = new T[a_n];
99  bool status = a_buffer.read_fast_array<T>(v,a_n);
100  delete [] v;
101  return status;
102 }

◆ dummy_cid()

cid tools::rroot::dummy_cid ( )
inline

Definition at line 21 of file cids.

21 {return base_cid()+4;}

◆ dummy_TXxx_pointer_stream()

bool tools::rroot::dummy_TXxx_pointer_stream ( buffer a_buffer,
ifac a_fac 
)
inline

Definition at line 631 of file buffer.

631  {
632  ifac::args args;
633  iro* obj;
634  bool created;
635  bool status = a_buffer.read_object(a_fac,args,obj,created);
636  if(obj) {
637  if(created) {
638  if(a_buffer.map_objs()) a_buffer.remove_in_map(obj);
639  delete obj;
640  }
641  }
642  return status;
643 }

◆ dump()

void tools::rroot::dump ( std::ostream &  a_out,
ifile a_file,
const std::vector< key * > &  a_keys,
bool  a_recursive,
unsigned int  a_spaces = 0 
)
inline

Definition at line 846 of file streamers.

850  {
851 
852  // dump non directory objects :
853  {std::vector<key*>::const_iterator it;
854  for(it=a_keys.begin();it!=a_keys.end();++it) {
855  key& k = *(*it);
856  if(k.object_class()==TDirectory_cls()) continue;
857  {for(unsigned int index=0;index<a_spaces;index++) a_out << " ";}
858  k.dump(a_out);
859  }}
860 
861  // dump directories :
862  {std::vector<key*>::const_iterator it;
863  for(it=a_keys.begin();it!=a_keys.end();++it) {
864  key& k = *(*it);
865  if(k.object_class()!=TDirectory_cls()) continue;
866 
867  std::string label = k.object_name();
868  {for(unsigned int index=0;index<a_spaces;index++) a_out << " ";}
869  a_out << "directory : " << label << std::endl;
870 
871  if(!a_recursive) continue;
872 
873  uint32 sz;
874  char* buf = k.get_object_buffer(a_file,sz);
875  //we don't have ownership of buf.
876  if(!buf) {
877  a_out << "tools::rroot::dump :"
878  << " can't get directory data buffer."
879  << std::endl;
880  } else {
881  buffer b(a_out,a_file.byte_swap(),sz,buf,k.key_length(),false);
882  TDirectory tdir(a_file);
883  if(!tdir.stream(b)) {
884  a_out << "tools::rroot::dump :"
885  << " can't stream TDirectory."
886  << std::endl;
887  } else {
888  const std::vector<key*>& keys = tdir.keys();
889  dump(a_out,a_file,keys,a_recursive,a_spaces+1);
890  }
891  }
892  }}
893 }

◆ find_be()

branch_element* tools::rroot::find_be ( tree a_tree,
const std::string &  a_name 
)
inline

Definition at line 64 of file tree_manip.

64  {
65  std::ostream& out = a_tree.file().out();
66 
67  branch* _branch = a_tree.find_branch(a_name,true);
68  if(!_branch) {
69  out << "tools::rroot::find_be :"
70  << " branch not found."
71  << std::endl;
72  return 0;
73  }
74 
75  branch_element* be = id_cast<branch,branch_element>(*_branch);
76  if(!be) {
77  out << "tools::rroot::find_be :"
78  << " branch not a branch_element."
79  << std::endl;
80  return 0;
81  }
82 
83  return be;
84 }

◆ find_branch_element()

branch_element* tools::rroot::find_branch_element ( tree a_tree,
const std::string &  a_name 
)
inline

Definition at line 140 of file tree_manip.

140  {
141  branch* _branch = a_tree.find_branch(a_name);
142  if(!_branch) {
143  a_tree.out() << "tools::rroot::find_branch_element : branch " << sout(a_name) << " not found." << std::endl;
144  return 0;
145  }
146  branch_element* be = safe_cast<branch,branch_element>(*_branch);
147  if(!be) {
148  a_tree.out() << "tools::rroot::find_branch_element : branch " << sout(a_name) << " not a branch_element."
149  << " It is a " << sout(_branch->s_cls()) << "."
150  << std::endl;
151  return 0;
152  }
153  return be;
154 }

◆ find_dir()

TDirectory* tools::rroot::find_dir ( directory a_dir,
const std::string &  a_name 
)
inline

Definition at line 23 of file rall.

23  {
24  std::ostream& out = a_dir.file().out();
25  key* k = a_dir.find_key(a_name);
26  if(!k) {
27  //out << "tools::rroot::find_dir :"
28  // << " " << a_name << " not a key."
29  // << std::endl;
30  return 0;
31  }
32 
33  if(k->object_class()!=TDirectory_cls()) {
34  out << "tools::rroot::find_dir :"
35  << " key " << a_name << " not a TDirectory."
36  << std::endl;
37  return 0;
38  }
39  uint32 sz;
40  char* buf = k->get_object_buffer(a_dir.file(),sz); //we don't have ownership of buf.
41  if(!buf) {
42  out << "tools::rroot::find_dir :"
43  << " can't get directory data buffer."
44  << std::endl;
45  return 0;
46  }
47  buffer b(out,a_dir.file().byte_swap(),sz,buf,k->key_length(),false);
48  TDirectory* tdir = new TDirectory(a_dir.file());
49  if(!tdir) return 0;
50  if(!tdir->stream(b)) {
51  out << "tools::rroot::find_dir :"
52  << " can't stream TDirectory."
53  << std::endl;
54  return 0;
55  }
56  return tdir;
57 }

◆ find_leaf()

template<class LEAF >
bool tools::rroot::find_leaf ( tree a_tree,
const std::string &  a_name,
branch *&  a_branch,
LEAF *&  a_leaf 
)
inline

Definition at line 114 of file tree_manip.

114  {
115  //used in MEMPHYS sim.
116  base_leaf* _base_leaf = a_tree.find_leaf(a_name);
117  if(!_base_leaf) {
118  a_tree.out() << "tools::rroot::find_leaf : base_leaf " << sout(a_name) << " not found." << std::endl;
119  a_branch = 0;
120  a_leaf = 0;
121  return false;
122  }
123  a_branch = a_tree.find_leaf_branch(*_base_leaf);
124  if(!a_branch) {
125  a_tree.out() << "tools::rroot::find_leaf : branch of base_leaf " << sout(a_name) << " not found." << std::endl;
126  a_branch = 0;
127  a_leaf = 0;
128  return false;
129  }
130  a_leaf = safe_cast<base_leaf,LEAF>(*_base_leaf);
131  if(!a_leaf) {
132  a_tree.out() << "tools::rroot::find_leaf : base_leaf " << sout(a_name) << " is not a LEAF." << std::endl;
133  a_branch = 0;
134  a_leaf = 0;
135  return false;
136  }
137  return true;
138 }

◆ find_path_dir()

directory* tools::rroot::find_path_dir ( directory a_from,
const std::string &  a_path 
)
inline

Definition at line 59 of file rall.

59  {
60  if(a_path.empty()) return 0;
61  std::vector<std::string> ws;
62  words(a_path,"/",false,ws);
63  directory* cur_dir = &a_from;
64  for(unsigned int index=0;index<ws.size();index++) {
65  TDirectory* _dir = find_dir(*cur_dir,ws[index]);
66  if(!_dir) return 0;
67  if(index==(ws.size()-1)) return _dir;
68  if(index) delete cur_dir;
69  cur_dir = _dir;
70  }
71  return 0;
72 }

◆ find_tree()

tree* tools::rroot::find_tree ( file a_file,
ifac a_fac,
const std::string &  a_name,
bool  a_map_objs = false 
)
inline

Definition at line 14 of file tree_manip.

14  {
15  std::ostream& out = a_file.out();
16  //out << "tools::rroot::find_tree : name : " << file << std::endl;
17 
18  key* key = a_file.dir().find_key(a_name);
19  if(!key) {
20  out << "tools::rroot::find_tree :"
21  << " key " << sout(a_name) << " not found."
22  << std::endl;
23  return 0;
24  }
25 
26  unsigned int sz;
27  char* buf = key->get_object_buffer(a_file,sz); //we don't have ownership of buf.
28  if(!buf) {
29  out << "tools::rroot::find_tree :"
30  << " can't get data buffer of "
31  << sout(key->object_name()) << "."
32  << std::endl;
33  return 0;
34  }
35 
36  //out << "tools::rroot::find_tree :"
37  // << " get data buffer size " << sz << "."
38  // << std::endl;
39 
40  if(key->object_class()!=TTree_cls()) {
41  out << "tools::rroot::find_tree :"
42  << " key object class "
43  << sout(key->object_class())
44  << " is not a TTree."
45  << std::endl;
46  return 0;
47  }
48 
49  buffer b(out,a_file.byte_swap(),sz,buf,key->key_length(),false);
50  b.set_map_objs(a_map_objs);
51 
52  tree* _tree = new tree(a_file,a_fac);
53  if(!_tree->stream(b)) {
54  out << "tools::rroot::find_tree :"
55  << " TTree streaming failed"
56  << std::endl;
57  delete _tree;
58  return 0;
59  }
60 
61  return _tree;
62 }

◆ find_vec()

template<class T >
stl_vector<T>* tools::rroot::find_vec ( ifile a_file,
branch_element a_be,
uint64  a_event 
)
inline

Definition at line 87 of file tree_manip.

87  {
88  std::ostream& out = a_file.out();
89 
90  unsigned int n;
91  if(!a_be.find_entry(a_file,a_event,n)) {
92  out << "tools::rroot::find_vec : branch_element.find_entry() failed." << std::endl;
93  return 0;
94  }
95 
96  iro* o = a_be.object();
97  stl_vector<T>* od = id_cast<iro, stl_vector<T> >(*o);
98  if(!od) {
99  out << "tools::rroot::find_vec : object not a tools::rroot::stl_vector<T>." << std::endl;
100  return 0;
101  }
102 
103  return od; //WARNING : we are not owner.
104 }

◆ fixed_array_stream()

template<class T >
bool tools::rroot::fixed_array_stream ( buffer a_buffer,
int  a_n,
T *&  a_v 
)
inline

Definition at line 712 of file buffer.

712  {
713  delete [] a_v;
714  a_v = 0;
715  char is_array;
716  if(!a_buffer.read(is_array)) return false;
717  if(!is_array) return true;
718  if(!a_n) return true;
719  a_v = new T[a_n];
720  if(!a_buffer.read_fast_array<T>(a_v,a_n)) {
721  delete [] a_v;
722  a_v = 0;
723  return false;
724  }
725  return true;
726 }

◆ GeoAtt_stream()

bool tools::rroot::GeoAtt_stream ( buffer a_buffer)
inline

Definition at line 62 of file named.

62  {
63  unsigned int fGeoAtt; // option flags
64  short v;
65  unsigned int s, c;
66  if(!a_buffer.read_version(v,s,c)) return false;
67  if(!a_buffer.read(fGeoAtt)) return false;
68  if(!a_buffer.check_byte_count(s,c,"TGeoAtt")) return false;
69  return true;
70 }

◆ graph_cid()

cid tools::rroot::graph_cid ( )
inline

Definition at line 28 of file cids.

28 {return base_cid()+9;}

◆ hash_list_cid()

cid tools::rroot::hash_list_cid ( )
inline

Definition at line 18 of file cids.

18 {return base_cid()+2;}

◆ iros_cid()

cid tools::rroot::iros_cid ( )
inline

Definition at line 16 of file cids.

16 {return base_cid()+0;}

◆ key_to_annotations()

bool tools::rroot::key_to_annotations ( ifile a_file,
key a_key,
std::map< std::string, std::string > &  a_annotations,
bool  a_warn = true 
)
inline

Definition at line 311 of file rall.

311  {
312  a_annotations.clear();
313  std::ostream& out = a_key.out();
314  if(a_key.object_class()!=TNamed_cls()) {
315  if(a_warn) out << "tools::rroot::key_to_annotations : key not a TNamed." << std::endl;
316  return false;
317  }
318  unsigned int sz;
319  char* buf = a_key.get_object_buffer(a_file,sz); //we don't have ownership of buf.
320  if(!buf) {
321  out << "tools::rroot::key_to_annotations : can't get data buffer of " << a_key.object_name() << "." << std::endl;
322  return false;
323  }
324  buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),false);
325  std::string histo_name;
326  std::string sas;
327  if(!Named_stream(b,histo_name,sas)) return false;
328  std::vector<std::string> ws;
329  words(sas,"\n",true,ws);
330  size_t wordn = ws.size();
331  if(2*(wordn/2)!=wordn) {
332  out << "tools::rroot::key_to_annotations : wordn should be even in " << sout(sas) << "." << std::endl;
333  return false;
334  }
335  std::vector<std::string>::const_iterator it;
336  for(it=ws.begin();it!=ws.end();) {
337  const std::string& key = *it;it++;
338  const std::string& value = *it;it++;
339  a_annotations[key] = value;
340  }
341  return true;
342 }

◆ key_to_h1d()

histo::h1d* tools::rroot::key_to_h1d ( ifile a_file,
key a_key,
bool  a_warn = true 
)
inline

Definition at line 344 of file rall.

344  {
345  std::ostream& out = a_key.out();
346  if( (a_key.object_class()!=TH1D_cls()) && (a_key.object_class()!=TH1F_cls()) ) {
347  if(a_warn) out << "tools::rroot::key_to_h1d : key not a TH1D and not a TH1F." << std::endl;
348  return 0;
349  }
350  unsigned int sz;
351  char* buf = a_key.get_object_buffer(a_file,sz); //we don't have ownership of buf.
352  if(!buf) {
353  out << "tools::rroot::key_to_h1d : can't get data buffer of " << a_key.object_name() << "." << std::endl;
354  return 0;
355  }
356  buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),false);
357  if(a_key.object_class()==TH1D_cls()) {
358  return TH1D_stream(b);
359  } else {
360  return TH1F_stream(b);
361  }
362 }

◆ key_to_h2d()

histo::h2d* tools::rroot::key_to_h2d ( ifile a_file,
key a_key,
bool  a_warn = true 
)
inline

Definition at line 364 of file rall.

364  {
365  std::ostream& out = a_key.out();
366  if( (a_key.object_class()!=TH2D_cls()) && (a_key.object_class()!=TH2F_cls()) ) {
367  if(a_warn) out << "tools::rroot::key_to_h2d : key not a TH2D and not a TH2F." << std::endl;
368  return 0;
369  }
370  unsigned int sz;
371  char* buf = a_key.get_object_buffer(a_file,sz); //we don't have ownership of buf.
372  if(!buf) {
373  out << "tools::rroot::key_to_h2d : can't get data buffer of " << a_key.object_name() << "." << std::endl;
374  return 0;
375  }
376  buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),false);
377  if(a_key.object_class()==TH2D_cls()) {
378  return TH2D_stream(b);
379  } else {
380  return TH2F_stream(b);
381  }
382 }

◆ key_to_h3d()

histo::h3d* tools::rroot::key_to_h3d ( ifile a_file,
key a_key 
)
inline

Definition at line 384 of file rall.

384  {
385  std::ostream& out = a_key.out();
386  if(a_key.object_class()!=TH3D_cls()) {
387  out << "tools::rroot::key_to_h3d :"
388  << " key not a TH3D."
389  << std::endl;
390  return 0;
391  }
392  unsigned int sz;
393  char* buf = a_key.get_object_buffer(a_file,sz); //we don't have ownership of buf.
394  if(!buf) {
395  out << "tools::rroot::key_to_h3d :"
396  << " can't get data buffer of " << a_key.object_name() << "."
397  << std::endl;
398  return 0;
399  }
400  buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),false);
401  return TH3D_stream(b);
402 }

◆ key_to_p1d()

histo::p1d* tools::rroot::key_to_p1d ( ifile a_file,
key a_key 
)
inline

Definition at line 404 of file rall.

404  {
405  std::ostream& out = a_key.out();
406  if(a_key.object_class()!=TProfile_cls()) {
407  out << "tools::rroot::key_to_p1d :"
408  << " key not a TProfile."
409  << std::endl;
410  return 0;
411  }
412  unsigned int sz;
413  char* buf = a_key.get_object_buffer(a_file,sz); //we don't have ownership of buf.
414  if(!buf) {
415  out << "tools::rroot::key_to_p1d :"
416  << " can't get data buffer of " << a_key.object_name() << "."
417  << std::endl;
418  return 0;
419  }
420  buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),false);
421  return TProfile_stream(b);
422 }

◆ key_to_p2d()

histo::p2d* tools::rroot::key_to_p2d ( ifile a_file,
key a_key 
)
inline

Definition at line 424 of file rall.

424  {
425  std::ostream& out = a_key.out();
426  if(a_key.object_class()!=TProfile2D_cls()) {
427  out << "tools::rroot::key_to_p2d :"
428  << " key not a TProfile2D."
429  << std::endl;
430  return 0;
431  }
432  unsigned int sz;
433  char* buf = a_key.get_object_buffer(a_file,sz); //we don't have ownership of buf.
434  if(!buf) {
435  out << "tools::rroot::key_to_p2d :"
436  << " can't get data buffer of " << a_key.object_name() << "."
437  << std::endl;
438  return 0;
439  }
440  buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),false);
441  return TProfile2D_stream(b);
442 }

◆ key_to_tree()

tree* tools::rroot::key_to_tree ( ifile a_file,
ifac a_fac,
key a_key,
bool  a_warn = true 
)
inline

Definition at line 444 of file rall.

444  {
445  std::ostream& out = a_key.out();
446  if(a_key.object_class()!=TTree_cls()) {
447  if(a_warn) out << "tools::rroot::key_to_tree : key not a TTree." << std::endl;
448  return 0;
449  }
450  unsigned int sz;
451  char* buf = a_key.get_object_buffer(a_file,sz); //we don't have ownership of buf.
452  if(!buf) {
453  out << "tools::rroot::key_to_tree : can't get data buffer of " << a_key.object_name() << "." << std::endl;
454  return 0;
455  }
456  buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),false);
457  b.set_map_objs(true); //for ioda/comres/tree.py, tree.lua.
458  tree* _tree = new tree(a_file,a_fac);
459  if(!_tree->stream(b)) {
460  out << "tools::rroot::key_to_tree : TTree streaming failed" << std::endl;
461  delete _tree;
462  return 0;
463  }
464  return _tree;
465 }

◆ leaf_bool_cls()

const std::string& tools::rroot::leaf_bool_cls ( )
inline

Definition at line 51 of file leaf.

51  {
52  static const std::string s_v("tools::rroot::leaf<bool>");
53  return s_v;
54 }

◆ leaf_double_cls()

const std::string& tools::rroot::leaf_double_cls ( )
inline

Definition at line 43 of file leaf.

43  {
44  static const std::string s_v("tools::rroot::leaf<double>");
45  return s_v;
46 }

◆ leaf_element_cid()

cid tools::rroot::leaf_element_cid ( )
inline

Definition at line 32 of file cids.

32 {return base_cid()+12;}

◆ leaf_float_cls()

const std::string& tools::rroot::leaf_float_cls ( )
inline

Definition at line 39 of file leaf.

39  {
40  static const std::string s_v("tools::rroot::leaf<float>");
41  return s_v;
42 }

◆ leaf_int_cls()

const std::string& tools::rroot::leaf_int_cls ( )
inline

Definition at line 47 of file leaf.

47  {
48  static const std::string s_v("tools::rroot::leaf<int>");
49  return s_v;
50 }

◆ leaf_object_cid()

cid tools::rroot::leaf_object_cid ( )
inline

Definition at line 41 of file cids.

41 {return base_cid()+18;}

◆ leaf_store_class() [1/6]

const std::string& tools::rroot::leaf_store_class ( bool  )
inline

Definition at line 34 of file leaf.

34  {
35  static const std::string s_v("TLeafO");
36  return s_v;
37 }

◆ leaf_store_class() [2/6]

const std::string& tools::rroot::leaf_store_class ( char  )
inline

Definition at line 14 of file leaf.

14  {
15  static const std::string s_v("TLeafB");
16  return s_v;
17 }

◆ leaf_store_class() [3/6]

const std::string& tools::rroot::leaf_store_class ( double  )
inline

Definition at line 30 of file leaf.

30  {
31  static const std::string s_v("TLeafD");
32  return s_v;
33 }

◆ leaf_store_class() [4/6]

const std::string& tools::rroot::leaf_store_class ( float  )
inline

Definition at line 26 of file leaf.

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

◆ leaf_store_class() [5/6]

const std::string& tools::rroot::leaf_store_class ( int  )
inline

Definition at line 22 of file leaf.

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

◆ leaf_store_class() [6/6]

const std::string& tools::rroot::leaf_store_class ( short  )
inline

Definition at line 18 of file leaf.

18  {
19  static const std::string s_v("TLeafS");
20  return s_v;
21 }

◆ leaf_string_cid()

cid tools::rroot::leaf_string_cid ( )
inline

Definition at line 31 of file cids.

31 {return base_cid()+11;}

◆ matrix_cid()

cid tools::rroot::matrix_cid ( )
inline

Definition at line 29 of file cids.

29 {return base_cid()+10;}

◆ named_cid()

cid tools::rroot::named_cid ( )
inline

Definition at line 39 of file cids.

39 {return base_cid()+17;}

◆ Named_stream()

bool tools::rroot::Named_stream ( buffer a_buffer,
std::string &  a_name,
std::string &  a_title 
)
inline

Definition at line 15 of file named.

15  {
16  short v;
17  unsigned int s, c;
18  if(!a_buffer.read_version(v,s,c)) return false;
19  {uint32 id,bits;
20  if(!Object_stream(a_buffer,id,bits)) return false;}
21  if(!a_buffer.read(a_name)) return false;
22  if(!a_buffer.read(a_title)) return false;
23  if(!a_buffer.check_byte_count(s,c,"TNamed")) return false;
24  return true;
25 }

◆ new_bin_number()

unsigned int tools::rroot::new_bin_number ( const std::vector< axis_t > &  aAxes)
inline

Definition at line 79 of file THistogram.

79  {
80  unsigned int number = 1;
81  for(unsigned int iaxis=0;iaxis<aAxes.size();iaxis++)
82  number *= (aAxes[iaxis].bins()+2);
83  return number;
84 }

◆ null_epsil()

bool tools::rroot::null_epsil ( double  a_1,
double  a_2,
double  a_prec = -5 
)
inline

Definition at line 134 of file streamers.

134  {
135  return (::log10(::fabs(a_1-a_2))<a_prec?true:false);
136 }

◆ obj_array_cid()

cid tools::rroot::obj_array_cid ( )
inline

Definition at line 19 of file cids.

19 {return base_cid()+3;}

◆ obj_list_cid()

cid tools::rroot::obj_list_cid ( )
inline

Definition at line 17 of file cids.

17 {return base_cid()+1;}

◆ Object_stream()

bool tools::rroot::Object_stream ( buffer a_buffer,
uint32 a_id,
uint32 a_bits 
)
inline

Definition at line 12 of file object.

12  {
13  short v;
14  if(!a_buffer.read_version(v)) return false;
15  if(!a_buffer.read(a_id)) return false;
16  if(!a_buffer.read(a_bits)) return false;
17  return true;
18 }

◆ pointer_stream() [1/3]

template<class T >
bool tools::rroot::pointer_stream ( buffer a_buffer,
ifac a_fac,
ifac::args a_args,
cid  a_T_class,
T *&  a_obj,
bool &  a_created 
)
inline

Definition at line 676 of file buffer.

679  {
680  iro* obj;
681  if(!a_buffer.read_object(a_fac,a_args,obj,a_created)) {
682  a_buffer.out() << "tools::rroot::pointer_stream : read_object failed." << std::endl;
683  a_obj = 0;
684  a_created = false;
685  return false;
686  }
687  if(!obj) {
688  a_obj = 0;
689  a_created = false;
690  } else {
691  a_obj = (T*)obj->cast(a_T_class);
692  if(!a_obj) {
693  a_buffer.out() << "tools::rroot::pointer_stream : "
694  << " inlib::cast to " << a_T_class << " failed."
695  << ". Object is a " << obj->s_cls() << "."
696  << std::endl;
697  if(a_created) delete obj;
698  a_created = false;
699  return false;
700  }
701  }
702  return true;
703 }

◆ pointer_stream() [2/3]

template<class T >
bool tools::rroot::pointer_stream ( buffer a_buffer,
ifac a_fac,
ifac::args a_args,
const std::string &  a_T_class,
T *&  a_obj,
bool &  a_created 
)
inline

Definition at line 646 of file buffer.

649  {
650  iro* obj;
651  if(!a_buffer.read_object(a_fac,a_args,obj,a_created)) {
652  a_buffer.out() << "tools::rroot::pointer_stream : read_object failed." << std::endl;
653  a_obj = 0;
654  a_created = false;
655  return false;
656  }
657  if(!obj) {
658  a_obj = 0;
659  a_created = false;
660  } else {
661  a_obj = (T*)obj->cast(a_T_class);
662  if(!a_obj) {
663  a_buffer.out() << "tools::rroot::pointer_stream : "
664  << " inlib::cast to " << a_T_class << " failed."
665  << ". Object is a " << obj->s_cls() << "."
666  << std::endl;
667  if(a_created) delete obj;
668  a_created = false;
669  return false;
670  }
671  }
672  return true;
673 }

◆ pointer_stream() [3/3]

template<class T >
bool tools::rroot::pointer_stream ( buffer a_buffer,
ifac a_fac,
ifac::args a_args,
T *&  a_obj,
bool &  a_created 
)
inline

Definition at line 706 of file buffer.

706  {
707  //return pointer_stream(a_buffer,a_fac,a_args,T::s_class(),a_obj,a_created);
708  return pointer_stream(a_buffer,a_fac,a_args,T::id_class(),a_obj,a_created);
709 }

◆ read()

void tools::rroot::read ( std::ostream &  a_out,
ifile a_file,
const std::vector< key * > &  a_keys,
bool  a_recursive,
bool  a_ls,
bool  a_dump,
unsigned int  a_spaces 
)
inline

Definition at line 467 of file rall.

473  {
474 
475  {std::vector<key*>::const_iterator it;
476  for(it=a_keys.begin();it!=a_keys.end();++it) {
477  key& k = *(*it);
478  if(k.object_class()!=TDirectory_cls()) {
479  if(a_ls||a_dump) {
480  {for(unsigned int index=0;index<a_spaces;index++) a_out << " ";}
481  std::string label = k.object_name();
482  a_out << "object : " << sout(label)
483  << ", class : " << k.object_class()
484  << std::endl;
485  //k.dump(a_out);
486  }
487  if(!read_key(a_out,a_file,k,a_dump)) return;
488  }
489  }}
490 
491  {std::vector<key*>::const_iterator it;
492  for(it=a_keys.begin();it!=a_keys.end();++it) {
493  key& k = *(*it);
494  if(k.object_class()==TDirectory_cls()) {
495 
496  if(a_ls||a_dump) {
497  {for(unsigned int index=0;index<a_spaces;index++) a_out << " ";}
498  std::string label = k.object_name();
499  a_out << "directory : " << label << std::endl;
500  }
501 
502  if(!a_recursive) continue;
503 
504  uint32 sz;
505  char* buf = k.get_object_buffer(a_file,sz);
506  if(!buf) {
507  a_out << "read :"
508  << " can't get directory data buffer."
509  << std::endl;
510  } else {
511  buffer b(a_out,a_file.byte_swap(),sz,buf,k.key_length(),false);
512  TDirectory dir(a_file);
513  if(!dir.stream(b)) {
514  a_out << "read :"
515  << " can't stream TDirectory."
516  << std::endl;
517  } else {
518  const std::vector<key*>& keys = dir.keys();
519  read(a_out,a_file,keys,a_recursive,a_ls,a_dump,a_spaces+1);
520  }
521  }
522  }
523  }}
524 }

◆ read_annotations()

bool tools::rroot::read_annotations ( buffer a_buffer,
annotations_t a_annotations 
)
inline

Definition at line 594 of file THistogram.

594  {
595  a_annotations.clear(); //reset() does not remove sticky items.
596  int number;
597  if(!a_buffer.read(number)) return false;
598  for(int index=0;index<number;index++) {
599  std::string key;
600  if(!a_buffer.read(key)) return false;
601  std::string value;
602  if(!a_buffer.read(value)) return false;
603  bool sticky;
604  if(!a_buffer.read(sticky)) return false;
605  //if(!a_annotations.addItem(key,value,sticky)) return false; //FIXME : handle sticky ?
606  a_annotations[key] = value;
607  }
608  return true;
609 }

◆ read_key()

bool tools::rroot::read_key ( std::ostream &  a_out,
ifile a_file,
key a_key,
bool  a_dump 
)
inline

Definition at line 74 of file rall.

74  {
75  unsigned int sz;
76  char* buf = a_key.get_object_buffer(a_file,sz); //we don't have ownership of buf.
77  if(!buf) {
78  a_out << "tools::rroot::read_key : can't get data buffer of " << a_key.object_name() << "." << std::endl;
79  return false;
80  }
81 
82  //a_out << "tools::rroot::read_key :"
83  // << " get data buffer size " << sz << "."
84  // << std::endl;
85 
86  buffer b(a_out,a_file.byte_swap(),sz,buf,a_key.key_length(),false);
87 
88  if(a_key.object_class()==TNamed_cls()) {
89  std::string name,title;
90  if(!Named_stream(b,name,title)) {
91  a_out << "tools::rroot::read_key : TNamed streaming failed" << std::endl;
92  } else {
93  if(a_dump) {
94  a_out << "Named : name = " << sout(name) << ", title = " << sout(title) << std::endl;
95  }
96  }
97 
98  } else if(a_key.object_class()==TH1F_cls()) {
99  histo::h1d* h = TH1F_stream(b);
100  if(!h) {
101  a_out << "tools::rroot::read_key : TH1F streaming failed" << std::endl;
102  } else {
103  if(a_dump) h->hprint(a_out);
104  }
105  delete h;
106 
107  } else if(a_key.object_class()==TH1D_cls()) {
108  histo::h1d* h = TH1D_stream(b);
109  if(!h) {
110  a_out << "tools::rroot::read_key :"
111  << " TH1D streaming failed"
112  << std::endl;
113  } else {
114  if(a_dump) h->hprint(a_out);
115  }
116  delete h;
117 
118  } else if(a_key.object_class()==TH2F_cls()) {
119  histo::h2d* h = TH2F_stream(b);
120  if(!h) {
121  a_out << "tools::rroot::read_key :"
122  << " TH2F streaming failed"
123  << std::endl;
124  } else {
125  if(a_dump) h->hprint(a_out);
126  }
127  delete h;
128 
129  } else if(a_key.object_class()==TH2D_cls()) {
130  histo::h2d* h = TH2D_stream(b); //we get ownership of h.
131  if(!h) {
132  a_out << "tools::rroot::read_key :"
133  << " TH2D streaming failed"
134  << std::endl;
135  } else {
136  if(a_dump) h->hprint(a_out);
137  }
138  delete h;
139 
140  } else if(a_key.object_class()==TH3D_cls()) {
141  histo::h3d* h = TH3D_stream(b); //we get ownership of h.
142  if(!h) {
143  a_out << "tools::rroot::read_key :"
144  << " TH3D streaming failed"
145  << std::endl;
146  } else {
147  if(a_dump) h->hprint(a_out);
148  }
149  delete h;
150 
151  } else if(a_key.object_class()==TProfile_cls()) {
152  histo::p1d* p = TProfile_stream(b);
153  if(!p) {
154  a_out << "tools::rroot::read_key :"
155  << " TProfile streaming failed"
156  << std::endl;
157  } else {
158  if(a_dump) p->hprint(a_out);
159  }
160  delete p;
161 
162  } else if(a_key.object_class()==TProfile2D_cls()) {
163  histo::p2d* p = TProfile2D_stream(b);
164  if(!p) {
165  a_out << "tools::rroot::read_key :"
166  << " TProfile2D streaming failed"
167  << std::endl;
168  } else {
169  if(a_dump) p->hprint(a_out);
170  }
171  delete p;
172 
173  } else if(a_key.object_class()==TTree_cls()) {
174  b.set_map_objs(true); //for "root_ls -ls" on esb evetest.root files.
175  fac _fac(a_out);
176  tree tree(a_file,_fac);
177  if(!tree.stream(b)) {
178  a_out << "tools::rroot::read_key :"
179  << " TTree streaming failed"
180  << std::endl;
181  } else {
182  //tree->dump(a_out);
183  if(a_dump) {
184  tree.dump(a_out,""," ");
185 
186  uint64 entries = tree.entries();
187 
188  /*
189  {for(uint32 j=0;j<10;j++){ //to test memory.
190  for(uint32 i=0;i<entries;i++){
191  uint32 n;
192  if(!tree.find_entry(i,n)) {
193  a_out << " can't find entry " << i
194  << std::endl;
195  }
196  }
197  }}
198  */
199 
200  {for(uint32 i=0;i<5;i++){
201  if(!tree.show(a_out,i)) {
202  a_out << " show failed for entry " << i
203  << std::endl;
204  }
205  }}
206  {for(uint64 i=mx<int64>(5,entries-5);i<entries;i++){
207  if(!tree.show(a_out,(uint32)i)) {
208  a_out << " show failed for entry " << i
209  << std::endl;
210  }
211  }}
212 
213  }
214  }
215 
216 #ifndef TOOLS_RROOT_NOT_OSC
217  } else if(a_key.object_class()==osc::s_h1d()) {
218 
219  histo::h1d h("",10,0,1);
220  if(!from_osc(b,osc::s_h1d(),h)) {
221  a_out << "tools::rroot::read_key :"
222  << " " << osc::s_h1d() << " streaming failed"
223  << std::endl;
224  } else {
225  if(a_dump) h.hprint(a_out);
226  }
227 
228  } else if(a_key.object_class()==osc::s_h2d()) {
229 
230  histo::h2d h("",10,0,1,10,0,1);
231  if(!from_osc(b,osc::s_h2d(),h)) {
232  a_out << "tools::rroot::read_key :"
233  << " " << osc::s_h2d() << " streaming failed"
234  << std::endl;
235  } else {
236  if(a_dump) h.hprint(a_out);
237  }
238 
239  } else if(a_key.object_class()==osc::s_h3d()) {
240 
241  histo::h3d h("",10,0,1,10,0,1,10,0,1);
242  if(!from_osc(b,osc::s_h3d(),h)) {
243  a_out << "tools::rroot::read_key :"
244  << " " << osc::s_h3d() << " streaming failed"
245  << std::endl;
246  } else {
247  if(a_dump) h.hprint(a_out);
248  }
249 
250  } else if(a_key.object_class()==osc::s_p1d()) {
251 
252  histo::p1d h("",10,0,1);
253  if(!from_osc(b,osc::s_p1d(),h)) {
254  a_out << "tools::rroot::read_key :"
255  << " " << osc::s_p1d() << " streaming failed"
256  << std::endl;
257  } else {
258  if(a_dump) h.hprint(a_out);
259  }
260 
261  } else if(a_key.object_class()==osc::s_p2d()) {
262 
263  histo::p2d h("",10,0,1,10,0,1);
264  if(!from_osc(b,osc::s_p2d(),h)) {
265  a_out << "tools::rroot::read_key :"
266  << " " << osc::s_p2d() << " streaming failed"
267  << std::endl;
268  } else {
269  if(a_dump) h.hprint(a_out);
270  }
271 #endif
272 
273  } else if(a_key.object_class()==THistogram_cls()) { //produced with osc/AIDA through BatchLab/Rio/THistogram.
274 
275  pd_data_t data;
276  annotations_t annotations;
277  if(!read_THistogram(b,data,annotations)) {
278  a_out << "tools::rroot::read_key : read_THistogram() failed." << std::endl;
279  } else {
280  if(histo::h1d* _h1d = THistogram_to_h1d(data)) {
281  if(a_dump) _h1d->hprint(a_out);
282  delete _h1d;
283  } else if(histo::h2d* _h2d = THistogram_to_h2d(data)) {
284  if(a_dump) _h2d->hprint(a_out);
285  delete _h2d;
286  } else if(histo::p1d* _p1d = THistogram_to_p1d(data)) {
287  if(a_dump) _p1d->hprint(a_out);
288  delete _p1d;
289  } else if(histo::p2d* _p2d = THistogram_to_p2d(data)) {
290  if(a_dump) _p2d->hprint(a_out);
291  delete _p2d;
292  } else {
293  a_out << "tools::rroot::read_key : can't convert THistogram dat to h1d,h2d,p1d or p2d." << std::endl;
294  }
295  }
296 
297  } else if(a_key.object_class()==TDirectory_cls()) {
298 
299  //we should not pass here.
300 
301  } else {
302  a_out << "tools::rroot::read_key :"
303  << " dont't know how to read key with object class "
304  << sout(a_key.object_class())
305  << std::endl;
306  }
307  return true;
308 }

◆ read_key_THistogram()

bool tools::rroot::read_key_THistogram ( ifile a_file,
key a_key,
pd_data_t a_data,
annotations_t a_annotations,
bool  a_warn = true 
)
inline

Definition at line 662 of file THistogram.

662  {
663  std::ostream& out = a_key.out();
664  if(a_key.object_class()!=THistogram_cls()) {
665  if(a_warn) out << "tools::rroot::read_key_THisogram : key not a THistogram." << std::endl;
666  return 0;
667  }
668  unsigned int sz;
669  char* buf = a_key.get_object_buffer(a_file,sz); //we don't have ownership of buf.
670  if(!buf) {
671  out << "tools::rroot::read_key_THisogram : can't get data buffer of " << a_key.object_name() << "." << std::endl;
672  return 0;
673  }
674  buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),false);
675  return read_THistogram(b,a_data,a_annotations);
676 }

◆ read_leaf()

template<class TYPE >
bool tools::rroot::read_leaf ( ifile a_file,
branch a_branch,
leaf< TYPE > &  a_leaf,
uint64  a_event,
TYPE &  a_value 
)
inline

Definition at line 157 of file tree_manip.

157  {
158  unsigned int n;
159  if(!a_branch.find_entry(a_file,a_event,n)) {
160  a_file.out() << "tools::rroot::read_leaf : a_branch.find_entry() failed." << std::endl;
161  a_value = TYPE(0);
162  return false;
163  }
164  return a_leaf.value(0,a_value);
165 }

◆ read_leaf_object()

bool tools::rroot::read_leaf_object ( ifile a_file,
branch a_branch,
leaf_object a_leaf,
uint64  a_event 
)
inline

Definition at line 167 of file tree_manip.

167  {
168  unsigned int n;
169  if(!a_branch.find_entry(a_file,a_event,n)) {
170  a_file.out() << "tools::rroot::read_leaf_object : a_branch.find_entry() failed." << std::endl;
171  return false;
172  }
173  return true;
174 }

◆ read_std_vec()

template<class TYPE >
stl_vector<TYPE>* tools::rroot::read_std_vec ( ifile a_file,
branch_element a_branch,
uint64  a_event 
)
inline

Definition at line 177 of file tree_manip.

177  {
178  unsigned int n;
179  if(!a_branch.find_entry(a_file,a_event,n)) {
180  a_file.out() << "tools::rroot::read_std_vec : a_branch.find_entry() failed." << std::endl;
181  return 0;
182  }
183  iro* obj = a_branch.object(); //Not owner.
184  if(!obj) return 0;
185  return id_cast<iro, stl_vector<TYPE> >(*obj);
186 }

◆ read_THistogram()

bool tools::rroot::read_THistogram ( buffer a_buffer,
pd_data_t a_data,
annotations_t a_annotations 
)
inline

Definition at line 611 of file THistogram.

611  {
612 
613  short v;
614  if(!a_buffer.read_version(v)) return false;
615 
616  {std::string name,title;
617  if(!Named_stream(a_buffer,name,title)) return false;}
618 
619  if(v==0) {
620  if(!read_v0(a_buffer,a_data)) return false;
621  } else if(v==1) {
622  if(!read_v1(a_buffer,a_data)) return false;
623  } else if(v==2) {
624  if(!read_v2(a_buffer,a_data)) return false;
625  } else if(v==3) {
626  if(!read_v3(a_buffer,a_data)) return false;
627  } else if(v==4) {
628  if(!read_v4(a_buffer,a_data)) return false;
629  } else if(v==5) {
630  if(!read_v5(a_buffer,a_data)) return false;
631  } else if(v==6) {
632  if(!read_v6(a_buffer,a_data)) return false;
633  } else if(v==7) {
634  if(!read_v7(a_buffer,a_data)) return false;
635  } else if(v==8) {
636  if(!read_annotations(a_buffer,a_annotations)) return false;
637  if(!read_v7(a_buffer,a_data)) return false;
638  } else {
639  return false;
640  }
641 
642  //data.m_coords.resize(data.m_dimension,0);
643  //data.m_ints.resize(data.m_dimension,0);
644 
645  a_data.update_fast_getters();
646 
647  return true;
648 }

◆ read_v0()

bool tools::rroot::read_v0 ( buffer a_buffer,
pd_data_t a_data 
)
inline

Definition at line 128 of file THistogram.

128  {
129  int idummy;
130  double ddummy;
131  std::string sdummy;
132  if(!a_buffer.read(sdummy)) return false;
133  if(!a_buffer.read(a_data.m_title)) return false;
134 
135  {int dim;
136  if(!a_buffer.read(dim)) return false;
137  a_data.m_dimension = dim;}
138 
139  {int nbin;
140  if(!a_buffer.read(nbin)) return false;
141  a_data.m_bin_number = nbin;}
142 
143  if(!a_buffer.read(idummy)) return false; //fEntries
144  if(!a_buffer.read(idummy)) return false; //fOutFlow
145  if(!a_buffer.read(ddummy)) return false; //fSw
146 
147  std::vector<int> vec;
148  if(!a_buffer.read_array<int>(vec)) return false;
149  convert<int,unsigned int>(vec,a_data.m_bin_entries);
150 
151  if(a_data.m_bin_entries.size()!=a_data.m_bin_number) return false;
152  if(!a_buffer.read_array<double>(a_data.m_bin_Sw)) return false;
153  if(a_data.m_bin_Sw.size()!=a_data.m_bin_number) return false;
154  if(!a_buffer.read_array<double>(a_data.m_bin_Sw2)) return false;
155  if(a_data.m_bin_Sw2.size()!=a_data.m_bin_number) return false;
156  if(a_data.m_dimension>0) {
157  a_data.m_axes.resize(a_data.m_dimension);
158  for(unsigned int iaxis=0;iaxis<a_data.m_dimension;iaxis++) {
159  if(!Axis_read_v0_v3(a_buffer,a_data.m_axes[iaxis])) return false;
160  }
161  }
162  axis_t axisOfValues;
163  if(!Axis_read_v0_v3(a_buffer,axisOfValues)) return false;
164  {int dummy;
165  if(!a_buffer.read(dummy)) return false;} //m_mode
166 
167  // Add outflow :
168  a_data.m_bin_number = new_bin_number(a_data.m_axes);
169  add_outflow<unsigned int>(a_data.m_axes,a_data.m_bin_entries);
170  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw);
171  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw2);
172  add_outflow(a_data.m_axes);
173 
174  // Not here in v0 :
175  std::vector<double> empty;
176  empty.resize(a_data.m_dimension,0);
177  a_data.m_bin_Sxw.resize(a_data.m_bin_number,empty);
178  a_data.m_bin_Sx2w.resize(a_data.m_bin_number,empty);
179  a_data.m_is_profile = false;
180  a_data.m_bin_Svw.clear();
181  a_data.m_bin_Sv2w.clear();
182 
183  return true;
184 }

◆ read_v1()

bool tools::rroot::read_v1 ( buffer a_buffer,
pd_data_t a_data 
)
inline

Definition at line 186 of file THistogram.

186  {
187  int idummy;
188  double ddummy;
189  if(!a_buffer.read(a_data.m_title)) return false;
190 
191  {int dim;
192  if(!a_buffer.read(dim)) return false;
193  a_data.m_dimension = dim;}
194 
195  {int nbin;
196  if(!a_buffer.read(nbin)) return false;
197  a_data.m_bin_number = nbin;}
198 
199  if(!a_buffer.read(idummy)) return false; //fEntries
200  if(!a_buffer.read(idummy)) return false; //fOutFlow
201  if(!a_buffer.read(ddummy)) return false; //fSw
202 
203  std::vector<int> vec;
204  if(!a_buffer.read_array<int>(vec)) return false;
205  convert<int,unsigned int>(vec,a_data.m_bin_entries);
206 
207  if(a_data.m_bin_entries.size()!=a_data.m_bin_number) return false;
208  if(!a_buffer.read_array<double>(a_data.m_bin_Sw)) return false;
209  if(a_data.m_bin_Sw.size()!=a_data.m_bin_number) return false;
210  if(!a_buffer.read_array<double>(a_data.m_bin_Sw2)) return false;
211  if(a_data.m_bin_Sw2.size()!=a_data.m_bin_number) return false;
212  if(a_data.m_dimension>0) {
213  a_data.m_axes.resize(a_data.m_dimension);
214  for(unsigned int iaxis=0;iaxis<a_data.m_dimension;iaxis++) {
215  if(!Axis_read_v0_v3(a_buffer,a_data.m_axes[iaxis])) return false;
216  }
217  }
218  axis_t axisOfValues;
219  if(!Axis_read_v0_v3(a_buffer,axisOfValues)) return false;
220  {int dummy;
221  if(!a_buffer.read(dummy)) return false;} //m_mode
222 
223  // Add outflow :
224  a_data.m_bin_number = new_bin_number(a_data.m_axes);
225  add_outflow<unsigned int>(a_data.m_axes,a_data.m_bin_entries);
226  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw);
227  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw2);
228  add_outflow(a_data.m_axes);
229 
230  // Not here in v1 :
231  std::vector<double> empty;
232  empty.resize(a_data.m_dimension,0);
233  a_data.m_bin_Sxw.resize(a_data.m_bin_number,empty);
234  a_data.m_bin_Sx2w.resize(a_data.m_bin_number,empty);
235  a_data.m_is_profile = false;
236  a_data.m_bin_Svw.clear();
237  a_data.m_bin_Sv2w.clear();
238 
239  return true;
240 }

◆ read_v2()

bool tools::rroot::read_v2 ( buffer a_buffer,
pd_data_t a_data 
)
inline

Definition at line 242 of file THistogram.

242  {
243  int idummy;
244  double ddummy;
245  std::string sdummy;
246  if(!a_buffer.read(a_data.m_title)) return false;
247  if(!a_buffer.read(sdummy)) return false;
248 
249  {int dim;
250  if(!a_buffer.read(dim)) return false;
251  a_data.m_dimension = dim;}
252 
253  {int nbin;
254  if(!a_buffer.read(nbin)) return false;
255  a_data.m_bin_number = nbin;}
256 
257  if(!a_buffer.read(idummy)) return false; //fEntries
258  if(!a_buffer.read(idummy)) return false; //fOutFlow
259  if(!a_buffer.read(ddummy)) return false; //fSw
260 
261  std::vector<int> vec;
262  if(!a_buffer.read_array<int>(vec)) return false;
263  convert<int,unsigned int>(vec,a_data.m_bin_entries);
264 
265  if(a_data.m_bin_entries.size()!=a_data.m_bin_number) return false;
266  if(!a_buffer.read_array<double>(a_data.m_bin_Sw)) return false;
267  if(a_data.m_bin_Sw.size()!=a_data.m_bin_number) return false;
268  if(!a_buffer.read_array<double>(a_data.m_bin_Sw2)) return false;
269  if(a_data.m_bin_Sw2.size()!=a_data.m_bin_number) return false;
270  if(a_data.m_dimension>0) {
271  a_data.m_axes.resize(a_data.m_dimension);
272  for(unsigned int iaxis=0;iaxis<a_data.m_dimension;iaxis++) {
273  if(!Axis_read_v0_v3(a_buffer,a_data.m_axes[iaxis])) return false;
274  }
275  }
276  axis_t axisOfValues;
277  if(!Axis_read_v0_v3(a_buffer,axisOfValues)) return false;
278  {int dummy;
279  if(!a_buffer.read(dummy)) return false;} //m_mode
280 
281  // Add outflow :
282  a_data.m_bin_number = new_bin_number(a_data.m_axes);
283  add_outflow<unsigned int>(a_data.m_axes,a_data.m_bin_entries);
284  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw);
285  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw2);
286  add_outflow(a_data.m_axes);
287 
288  // Not here in v2 :
289  std::vector<double> empty;
290  empty.resize(a_data.m_dimension,0);
291  a_data.m_bin_Sxw.resize(a_data.m_bin_number,empty);
292  a_data.m_bin_Sx2w.resize(a_data.m_bin_number,empty);
293  a_data.m_is_profile = false;
294  a_data.m_bin_Svw.clear();
295  a_data.m_bin_Sv2w.clear();
296 
297  return true;
298 }

◆ read_v3()

bool tools::rroot::read_v3 ( buffer a_buffer,
pd_data_t a_data 
)
inline

Definition at line 300 of file THistogram.

300  {
301  int idummy;
302  double ddummy;
303 
304  int l;
305  if(!a_buffer.read(l)) return false;
306  char* str = new char[l+1];
307  for (int i = 0; i < l; i++) {
308  if(!a_buffer.read(str[i])) { delete [] str;return false;}
309  }
310  str[l] = '\0';
311  a_data.m_title = str;
312  delete [] str;
313 
314  {int dim;
315  if(!a_buffer.read(dim)) return false;
316  a_data.m_dimension = dim;}
317 
318  {int nbin;
319  if(!a_buffer.read(nbin)) return false;
320  a_data.m_bin_number = nbin;}
321 
322  if(!a_buffer.read(idummy)) return false; //fEntries
323  if(!a_buffer.read(idummy)) return false; //fOutFlow
324  if(!a_buffer.read(ddummy)) return false; //fSw
325 
326  std::vector<int> vec;
327  if(!a_buffer.read_array<int>(vec)) return false;
328  convert<int,unsigned int>(vec,a_data.m_bin_entries);
329 
330  if(a_data.m_bin_entries.size()!=a_data.m_bin_number) return false;
331  if(!a_buffer.read_array<double>(a_data.m_bin_Sw)) return false;
332  if(a_data.m_bin_Sw.size()!=a_data.m_bin_number) return false;
333  if(!a_buffer.read_array<double>(a_data.m_bin_Sw2)) return false;
334  if(a_data.m_bin_Sw2.size()!=a_data.m_bin_number) return false;
335  if(a_data.m_dimension>0) {
336  a_data.m_axes.resize(a_data.m_dimension);
337  for(unsigned int iaxis=0;iaxis<a_data.m_dimension;iaxis++) {
338  if(!Axis_read_v0_v3(a_buffer,a_data.m_axes[iaxis])) return false;
339  }
340  }
341  axis_t axisOfValues;
342  if(!Axis_read_v0_v3(a_buffer,axisOfValues)) return false;
343  {int dummy;
344  if(!a_buffer.read(dummy)) return false;} //m_mode
345 
346  // Add outflow :
347  a_data.m_bin_number = new_bin_number(a_data.m_axes);
348  add_outflow<unsigned int>(a_data.m_axes,a_data.m_bin_entries);
349  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw);
350  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw2);
351  add_outflow(a_data.m_axes);
352 
353  // Not here in v3 :
354  std::vector<double> empty;
355  empty.resize(a_data.m_dimension,0);
356  a_data.m_bin_Sxw.resize(a_data.m_bin_number,empty);
357  a_data.m_bin_Sx2w.resize(a_data.m_bin_number,empty);
358  a_data.m_is_profile = false;
359  a_data.m_bin_Svw.clear();
360  a_data.m_bin_Sv2w.clear();
361 
362  return true;
363 }

◆ read_v4()

bool tools::rroot::read_v4 ( buffer a_buffer,
pd_data_t a_data 
)
inline

Definition at line 365 of file THistogram.

365  {
366  int idummy;
367  double ddummy;
368 
369  int l;
370  if(!a_buffer.read(l)) return false;
371  char* str = new char[l+1];
372  for (int i = 0; i < l; i++) {
373  if(!a_buffer.read(str[i])) { delete [] str;return false;}
374  }
375  str[l] = '\0';
376  a_data.m_title = str;
377  delete [] str;
378 
379  {int dim;
380  if(!a_buffer.read(dim)) return false;
381  a_data.m_dimension = dim;}
382 
383  {int nbin;
384  if(!a_buffer.read(nbin)) return false;
385  a_data.m_bin_number = nbin;}
386 
387  if(!a_buffer.read(idummy)) return false; //fEntries
388  if(!a_buffer.read(idummy)) return false; //fOutFlow
389  if(!a_buffer.read(ddummy)) return false; //fSw
390 
391  std::vector<int> vec;
392  if(!a_buffer.read_array<int>(vec)) return false;
393  convert<int,unsigned int>(vec,a_data.m_bin_entries);
394 
395  if(a_data.m_bin_entries.size()!=a_data.m_bin_number) return false;
396  if(!a_buffer.read_array<double>(a_data.m_bin_Sw)) return false;
397  if(a_data.m_bin_Sw.size()!=a_data.m_bin_number) return false;
398  if(!a_buffer.read_array<double>(a_data.m_bin_Sw2)) return false;
399  if(a_data.m_bin_Sw2.size()!=a_data.m_bin_number) return false;
400  if(a_data.m_dimension>0) {
401  a_data.m_axes.resize(a_data.m_dimension);
402  for(unsigned int iaxis=0;iaxis<a_data.m_dimension;iaxis++) {
403  if(!Axis_read_v4_v6(a_buffer,a_data.m_axes[iaxis])) return false;
404  }
405  }
406  {int dummy;
407  if(!a_buffer.read(dummy)) return false;} //m_mode
408 
409  // Add outflow :
410  a_data.m_bin_number = new_bin_number(a_data.m_axes);
411  add_outflow<unsigned int>(a_data.m_axes,a_data.m_bin_entries);
412  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw);
413  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw2);
414  add_outflow(a_data.m_axes);
415 
416  // Not here in v4 :
417  std::vector<double> empty;
418  empty.resize(a_data.m_dimension,0);
419  a_data.m_bin_Sxw.resize(a_data.m_bin_number,empty);
420  a_data.m_bin_Sx2w.resize(a_data.m_bin_number,empty);
421  a_data.m_is_profile = false;
422  a_data.m_bin_Svw.clear();
423  a_data.m_bin_Sv2w.clear();
424 
425  return true;
426 }

◆ read_v5()

bool tools::rroot::read_v5 ( buffer a_buffer,
pd_data_t a_data 
)
inline

Definition at line 428 of file THistogram.

428  {
429  int idummy;
430  double ddummy;
431  if(!a_buffer.read(a_data.m_title)) return false;
432 
433  {int dim;
434  if(!a_buffer.read(dim)) return false;
435  a_data.m_dimension = dim;}
436 
437  {int nbin;
438  if(!a_buffer.read(nbin)) return false;
439  a_data.m_bin_number = nbin;}
440 
441  if(!a_buffer.read(idummy)) return false; //fEntries
442  if(!a_buffer.read(idummy)) return false; //fOutFlow
443  if(!a_buffer.read(ddummy)) return false; //fSw
444 
445  std::vector<int> vec;
446  if(!a_buffer.read_array<int>(vec)) return false;
447  convert<int,unsigned int>(vec,a_data.m_bin_entries);
448 
449  if(a_data.m_bin_entries.size()!=a_data.m_bin_number) return false;
450  if(!a_buffer.read_array<double>(a_data.m_bin_Sw)) return false;
451  if(a_data.m_bin_Sw.size()!=a_data.m_bin_number) return false;
452  if(!a_buffer.read_array<double>(a_data.m_bin_Sw2)) return false;
453  if(a_data.m_bin_Sw2.size()!=a_data.m_bin_number) return false;
454  if(a_data.m_dimension>0) {
455  a_data.m_axes.resize(a_data.m_dimension);
456  for(unsigned int iaxis=0;iaxis<a_data.m_dimension;iaxis++) {
457  if(!Axis_read_v4_v6(a_buffer,a_data.m_axes[iaxis])) return false;
458  }
459  }
460  {int dummy;
461  if(!a_buffer.read(dummy)) return false;} //m_mode
462 
463  // Add outflow :
464  a_data.m_bin_number = new_bin_number(a_data.m_axes);
465  add_outflow<unsigned int>(a_data.m_axes,a_data.m_bin_entries);
466  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw);
467  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw2);
468  add_outflow(a_data.m_axes);
469 
470  // Not here in v5 :
471  std::vector<double> empty;
472  empty.resize(a_data.m_dimension,0);
473  a_data.m_bin_Sxw.resize(a_data.m_bin_number,empty);
474  a_data.m_bin_Sx2w.resize(a_data.m_bin_number,empty);
475  a_data.m_is_profile = false;
476  a_data.m_bin_Svw.clear();
477  a_data.m_bin_Sv2w.clear();
478 
479  return true;
480 }

◆ read_v6()

bool tools::rroot::read_v6 ( buffer a_buffer,
pd_data_t a_data 
)
inline

Definition at line 482 of file THistogram.

482  {
483  int idummy;
484  double ddummy;
485  if(!a_buffer.read(a_data.m_title)) return false;
486 
487  {int dim;
488  if(!a_buffer.read(dim)) return false;
489  a_data.m_dimension = dim;}
490 
491  {int nbin;
492  if(!a_buffer.read(nbin)) return false;
493  a_data.m_bin_number = nbin;}
494 
495  if(!a_buffer.read(idummy)) return false; //fEntries
496  if(!a_buffer.read(idummy)) return false; //fOutFlow
497  if(!a_buffer.read(ddummy)) return false; //fSw
498 
499  std::vector<int> vec;
500  if(!a_buffer.read_array<int>(vec)) return false;
501  convert<int,unsigned int>(vec,a_data.m_bin_entries);
502 
503  if(a_data.m_bin_entries.size()!=a_data.m_bin_number) return false;
504  if(!a_buffer.read_array<double>(a_data.m_bin_Sw)) return false;
505  if(a_data.m_bin_Sw.size()!=a_data.m_bin_number) return false;
506  if(!a_buffer.read_array<double>(a_data.m_bin_Sw2)) return false;
507  if(a_data.m_bin_Sw2.size()!=a_data.m_bin_number) return false;
508  if(a_data.m_dimension>0) {
509  a_data.m_axes.resize(a_data.m_dimension);
510  for(unsigned int iaxis=0;iaxis<a_data.m_dimension;iaxis++) {
511  if(!Axis_read_v4_v6(a_buffer,a_data.m_axes[iaxis])) return false;
512  }
513  }
514  {int dummy;
515  if(!a_buffer.read(dummy)) return false;} //m_mode
516 
517  // Profile :
518  if(!a_buffer.read(a_data.m_is_profile)) return false;
519  if(a_data.m_is_profile) {
520  if(!a_buffer.read_array<double>(a_data.m_bin_Svw)) return false;
521  if(a_data.m_bin_Svw.size()!=a_data.m_bin_number) return false;
522  if(!a_buffer.read(a_data.m_cut_v)) return false;
523  if(!a_buffer.read(a_data.m_min_v)) return false;
524  if(!a_buffer.read(a_data.m_max_v)) return false;
525  }
526 
527  // Add outflow :
528  a_data.m_bin_number = new_bin_number(a_data.m_axes);
529  add_outflow<unsigned int>(a_data.m_axes,a_data.m_bin_entries);
530  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw);
531  add_outflow<double>(a_data.m_axes,a_data.m_bin_Sw2);
532  add_outflow<double>(a_data.m_axes,a_data.m_bin_Svw);
533  add_outflow(a_data.m_axes);
534 
535  // Not here in v6 :
536  std::vector<double> empty;
537  empty.resize(a_data.m_dimension,0);
538  a_data.m_bin_Sxw.resize(a_data.m_bin_number,empty); //Forget to write in v6 !
539  a_data.m_bin_Sx2w.resize(a_data.m_bin_number,empty);
540  if(a_data.m_is_profile) {
541  a_data.m_bin_Sv2w.resize(a_data.m_bin_number,0);
542  }
543 
544  return true;
545 }

◆ read_v7()

bool tools::rroot::read_v7 ( buffer a_buffer,
pd_data_t a_data 
)
inline

Definition at line 547 of file THistogram.

547  {
548  if(!a_buffer.read(a_data.m_title)) return false;
549 
550  {int dim;
551  if(!a_buffer.read(dim)) return false;
552  a_data.m_dimension = dim;}
553 
554  {int nbin;
555  if(!a_buffer.read(nbin)) return false;
556  a_data.m_bin_number = nbin;}
557 
558  std::vector<int> vec;
559  if(!a_buffer.read_array<int>(vec)) return false;
560  convert<int,unsigned int>(vec,a_data.m_bin_entries);
561 
562  if(a_data.m_bin_entries.size()!=a_data.m_bin_number) return false;
563  if(!a_buffer.read_array<double>(a_data.m_bin_Sw)) return false;
564  if(a_data.m_bin_Sw.size()!=a_data.m_bin_number) return false;
565  if(!a_buffer.read_array<double>(a_data.m_bin_Sw2)) return false;
566  if(a_data.m_bin_Sw2.size()!=a_data.m_bin_number) return false;
567  if(!a_buffer.read_array2<double>(a_data.m_bin_Sxw)) return false;
568  if(a_data.m_bin_Sxw.size()!=a_data.m_bin_number) return false;
569  if(!a_buffer.read_array2<double>(a_data.m_bin_Sx2w)) return false;
570  if(a_data.m_bin_Sx2w.size()!=a_data.m_bin_number) return false;
571  if(a_data.m_dimension>0) {
572  a_data.m_axes.resize(a_data.m_dimension);
573  for(unsigned int iaxis=0;iaxis<a_data.m_dimension;iaxis++) {
574  if(!Axis_read_v7(a_buffer,a_data.m_axes[iaxis])) return false;
575  }
576  }
577  {int dummy;
578  if(!a_buffer.read(dummy)) return false;} //m_mode
579  // Profile :
580  if(!a_buffer.read(a_data.m_is_profile)) return false;
581  if(a_data.m_is_profile) {
582  if(!a_buffer.read_array<double>(a_data.m_bin_Svw)) return false;
583  if(a_data.m_bin_Svw.size()!=a_data.m_bin_number) return false;
584  if(!a_buffer.read_array<double>(a_data.m_bin_Sv2w)) return false;
585  if(a_data.m_bin_Sv2w.size()!=a_data.m_bin_number) return false;
586  if(!a_buffer.read(a_data.m_cut_v)) return false;
587  if(!a_buffer.read(a_data.m_min_v)) return false;
588  if(!a_buffer.read(a_data.m_max_v)) return false;
589  }
590 
591  return true;
592 }

◆ stl_vector_cid()

cid tools::rroot::stl_vector_cid ( )
inline

Definition at line 47 of file cids.

47 {return base_cid()+33;} //+12=45

◆ stl_vector_obj_cid()

cid tools::rroot::stl_vector_obj_cid ( )
inline

Definition at line 53 of file cids.

53 {return base_cid()+100;}

◆ stl_vector_string_cid()

cid tools::rroot::stl_vector_string_cid ( )
inline

Definition at line 37 of file cids.

37 {return base_cid()+16;}

◆ stl_vector_vector_cid()

cid tools::rroot::stl_vector_vector_cid ( )
inline

Definition at line 48 of file cids.

48 {return base_cid()+46;} //+12=58

◆ streamer_element_cid()

cid tools::rroot::streamer_element_cid ( )
inline

Definition at line 35 of file cids.

35 {return base_cid()+14;}

◆ streamer_info_cid()

cid tools::rroot::streamer_info_cid ( )
inline

Definition at line 34 of file cids.

34 {return base_cid()+13;}

◆ TDirectory_cls()

const std::string& tools::rroot::TDirectory_cls ( )
inline

Definition at line 47 of file clss.

47  {
48  static const std::string s_v("TDirectory");
49  return s_v;
50 }

◆ TGeoManager_cls()

const std::string& tools::rroot::TGeoManager_cls ( )
inline

Definition at line 52 of file clss.

52  {
53  static const std::string s_v("TGeoManager");
54  return s_v;
55 }

◆ TH1D_cls()

const std::string& tools::rroot::TH1D_cls ( )
inline

Definition at line 17 of file clss.

17  {
18  static const std::string s_v("TH1D");
19  return s_v;
20 }

◆ TH1D_stream()

histo::h1d* tools::rroot::TH1D_stream ( buffer a_buffer)
inline

Definition at line 409 of file streamers.

409  {
410  unsigned int s, c;
411  short v;
412  if(!a_buffer.read_version(v,s,c)) return 0;
413 
414  // Version 1 streaming (ROOT/v3-00-6).
415 
416  // Now we have to reconstruct a valid Histogram from a_buffer :
417  hd_data data;
418 
419  data.m_dimension = 1;
420  data.m_axes.resize(1);
421 
422  double fEntries; //in range + outflow.
423  double fSw; //in range.
424  double fSw2; //in range.
425  double fSxw; //in range.
426  double fSx2w; //in range.
427  if(!TH_read_1D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w)) return 0;
428  // the upper set :
429  //data.m_title
430  //data.m_bin_number
431  //data.m_axes
432  //data.m_bin_Sw2
433 
434  std::vector<double> bins; //fArray TArrayD
435  if(!Array_stream<double>(a_buffer,bins)) return 0;
436  if(!a_buffer.check_byte_count(s,c,"TH1D")) return 0;
437 
438  unsigned int binn = data.m_bin_number;
439  data.m_bin_Sw = bins;
440 
441  data.m_bin_entries.resize(binn,0);
442  {std::vector<double> empty;
443  empty.resize(1,0);
444  data.m_bin_Sxw.resize(binn,empty);
445  data.m_bin_Sx2w.resize(binn,empty);}
446 
447  data.m_all_entries = static_cast<unsigned int>(fEntries);
448  data.m_in_range_entries = 0;
449  data.m_in_range_Sw = fSw;
450  data.m_in_range_Sw2 = fSw2;
451  data.m_in_range_Sxw.resize(1,0);
452  data.m_in_range_Sx2w.resize(1,0);
453  data.m_in_range_Sxw[0] = fSxw;
454  data.m_in_range_Sx2w[0] = fSx2w;
455 
456  histo::h1d* h = new histo::h1d("",10,0,1);
457  h->copy_from_data(data);
458  return h;
459 }

◆ TH1F_cls()

const std::string& tools::rroot::TH1F_cls ( )
inline

Definition at line 12 of file clss.

12  {
13  static const std::string s_v("TH1F");
14  return s_v;
15 }

◆ TH1F_stream()

histo::h1d* tools::rroot::TH1F_stream ( buffer a_buffer)
inline

Definition at line 353 of file streamers.

353  {
354  unsigned int s, c;
355  short v;
356  if(!a_buffer.read_version(v,s,c)) return 0;
357 
358  // Version 1 streaming (ROOT/v3-00-6).
359 
360  // Now we have to reconstruct a valid Histogram from a_buffer :
361  hd_data data;
362 
363  data.m_dimension = 1;
364  //data.m_coords.resize(data.m_dimension,0);
365  //data.m_ints.resize(data.m_dimension,0);
366  data.m_axes.resize(1);
367 
368  double fEntries; //in range + outflow.
369  double fSw; //in range.
370  double fSw2; //in range.
371  double fSxw; //in range.
372  double fSx2w; //in range.
373  if(!TH_read_1D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w)) return 0;
374  // the upper set :
375  //data.m_title
376  //data.m_bin_number
377  //data.m_axes
378  //data.m_bin_Sw2
379 
380  std::vector<float> bins; //fArray TArrayF
381  if(!Array_stream<float>(a_buffer,bins)) return 0;
382  if(!a_buffer.check_byte_count(s,c,"TH1F")) return 0;
383 
384  unsigned int binn = data.m_bin_number;
385  data.m_bin_Sw.resize(binn,0);
386  {for(unsigned int index=0;index<binn;index++){
387  data.m_bin_Sw[index] = double(bins[index]);
388  }}
389 
390  data.m_bin_entries.resize(binn,0);
391  {std::vector<double> empty;
392  empty.resize(1,0);
393  data.m_bin_Sxw.resize(binn,empty);
394  data.m_bin_Sx2w.resize(binn,empty);}
395  data.m_all_entries = static_cast<unsigned int>(fEntries);
396  data.m_in_range_entries = 0;
397  data.m_in_range_Sw = fSw;
398  data.m_in_range_Sw2 = fSw2;
399  data.m_in_range_Sxw.resize(1,0);
400  data.m_in_range_Sx2w.resize(1,0);
401  data.m_in_range_Sxw[0] = fSxw;
402  data.m_in_range_Sx2w[0] = fSx2w;
403 
404  histo::h1d* h = new histo::h1d("",10,0,1);
405  h->copy_from_data(data);
406  return h; //give ownership to caller.
407 }

◆ TH2D_cls()

const std::string& tools::rroot::TH2D_cls ( )
inline

Definition at line 27 of file clss.

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

◆ TH2D_stream()

histo::h2d* tools::rroot::TH2D_stream ( buffer a_buffer)
inline

Definition at line 523 of file streamers.

523  {
524  unsigned int s, c;
525  short v;
526  if(!a_buffer.read_version(v,s,c)) return 0;
527 
528  // Version 3 streaming (ROOT/v3-00-6).
529 
530  // Now we have to reconstruct a valid Histogram from a_buffer :
531  hd_data data;
532 
533  data.m_dimension = 2;
534  //data.m_coords.resize(data.m_dimension,0);
535  //data.m_ints.resize(data.m_dimension,0);
536  data.m_axes.resize(2);
537  data.m_in_range_plane_Sxyw.resize(1,0);
538 
539  double fEntries; //in range + outflow.
540  double fSw; //in range.
541  double fSw2; //in range.
542  double fSxw; //in range.
543  double fSx2w; //in range.
544  double fSyw; //in range.
545  double fSy2w; //in range.
546  if(!TH_read_2D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w,fSyw,fSy2w)) return 0;
547  // the upper set :
548  //data.m_title
549  //data.m_bin_number
550  //data.m_axes
551  //data.m_bin_Sw2
552 
553  std::vector<double> bins; //fArray TArrayD
554  if(!Array_stream<double>(a_buffer,bins)) return 0;
555  if(!a_buffer.check_byte_count(s,c,"TH2D")) return 0;
556 
557  unsigned int binn = data.m_bin_number;
558  data.m_bin_Sw = bins;
559 
560  data.m_bin_entries.resize(binn,0);
561  {std::vector<double> empty;
562  empty.resize(2,0);
563  data.m_bin_Sxw.resize(binn,empty);
564  data.m_bin_Sx2w.resize(binn,empty);}
565 
566  data.m_all_entries = static_cast<unsigned int>(fEntries);
567  data.m_in_range_entries = 0;
568  data.m_in_range_Sw = fSw;
569  data.m_in_range_Sw2 = fSw2;
570  data.m_in_range_Sxw.resize(2,0);
571  data.m_in_range_Sx2w.resize(2,0);
572  data.m_in_range_Sxw[0] = fSxw;
573  data.m_in_range_Sx2w[0] = fSx2w;
574  data.m_in_range_Sxw[1] = fSyw;
575  data.m_in_range_Sx2w[1] = fSy2w;
576 
577  histo::h2d* h = new histo::h2d("",10,0,1,10,0,1);
578  h->copy_from_data(data);
579  return h;
580 }

◆ TH2F_cls()

const std::string& tools::rroot::TH2F_cls ( )
inline

Definition at line 22 of file clss.

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

◆ TH2F_stream()

histo::h2d* tools::rroot::TH2F_stream ( buffer a_buffer)
inline

Definition at line 461 of file streamers.

461  {
462  unsigned int s, c;
463  short v;
464  if(!a_buffer.read_version(v,s,c)) return 0;
465 
466  // Version 3 streaming (ROOT/v3-00-6).
467 
468  // Now we have to reconstruct a valid Histogram from a_buffer :
469  hd_data data;
470 
471  data.m_dimension = 2;
472  //data.m_coords.resize(data.m_dimension,0);
473  //data.m_ints.resize(data.m_dimension,0);
474  data.m_axes.resize(2);
475  data.m_in_range_plane_Sxyw.resize(1,0);
476 
477  double fEntries; //in range + outflow.
478  double fSw; //in range.
479  double fSw2; //in range.
480  double fSxw; //in range.
481  double fSx2w; //in range.
482  double fSyw; //in range.
483  double fSy2w; //in range.
484  if(!TH_read_2D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w,fSyw,fSy2w)) return 0;
485  // the upper set :
486  //data.m_title
487  //data.m_bin_number
488  //data.m_axes
489  //data.m_bin_Sw2
490 
491  std::vector<float> bins; //fArray TArrayF
492  if(!Array_stream<float>(a_buffer,bins)) return 0;
493  if(!a_buffer.check_byte_count(s,c,"TH2F")) return 0;
494 
495  unsigned int binn = data.m_bin_number;
496  data.m_bin_Sw.resize(binn,0);
497  {for(unsigned int index=0;index<binn;index++){
498  data.m_bin_Sw[index] = double(bins[index]);
499  }}
500 
501  data.m_bin_entries.resize(binn,0);
502  {std::vector<double> empty;
503  empty.resize(2,0);
504  data.m_bin_Sxw.resize(binn,empty);
505  data.m_bin_Sx2w.resize(binn,empty);}
506 
507  data.m_all_entries = static_cast<unsigned int>(fEntries);
508  data.m_in_range_entries = 0;
509  data.m_in_range_Sw = fSw;
510  data.m_in_range_Sw2 = fSw2;
511  data.m_in_range_Sxw.resize(2,0);
512  data.m_in_range_Sx2w.resize(2,0);
513  data.m_in_range_Sxw[0] = fSxw;
514  data.m_in_range_Sx2w[0] = fSx2w;
515  data.m_in_range_Sxw[1] = fSyw;
516  data.m_in_range_Sx2w[1] = fSy2w;
517 
518  histo::h2d* h = new histo::h2d("",10,0,1,10,0,1);
519  h->copy_from_data(data);
520  return h;
521 }

◆ TH3D_cls()

const std::string& tools::rroot::TH3D_cls ( )
inline

Definition at line 32 of file clss.

32  {
33  static const std::string s_v("TH3D");
34  return s_v;
35 }

◆ TH3D_stream()

histo::h3d* tools::rroot::TH3D_stream ( buffer a_buffer)
inline

Definition at line 582 of file streamers.

582  {
583  unsigned int s, c;
584  short v;
585  if(!a_buffer.read_version(v,s,c)) return 0;
586 
587  // Now we have to reconstruct a valid Histogram from a_buffer :
588  hd_data data;
589 
590  data.m_dimension = 3;
591  //data.m_coords.resize(data.m_dimension,0);
592  //data.m_ints.resize(data.m_dimension,0);
593  data.m_axes.resize(3);
594  data.m_in_range_plane_Sxyw.resize(3,0);
595 
596  double fEntries; //in range + outflow.
597  double fSw; //in range.
598  double fSw2; //in range.
599  double fSxw; //in range.
600  double fSx2w; //in range.
601  double fSyw; //in range.
602  double fSy2w; //in range.
603  double fSzw; //in range.
604  double fSz2w; //in range.
605  if(!TH_read_3D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w,fSyw,fSy2w,fSzw,fSz2w)) return 0;
606  // the upper set :
607  //data.m_title
608  //data.m_bin_number
609  //data.m_axes
610  //data.m_bin_Sw2
611 
612  std::vector<double> bins; //fArray TArrayD
613  if(!Array_stream<double>(a_buffer,bins)) return 0;
614  if(!a_buffer.check_byte_count(s,c,"TH3D")) return 0;
615 
616  unsigned int binn = data.m_bin_number;
617  data.m_bin_Sw = bins;
618 
619  data.m_bin_entries.resize(binn,0);
620  {std::vector<double> empty;
621  empty.resize(3,0);
622  data.m_bin_Sxw.resize(binn,empty);
623  data.m_bin_Sx2w.resize(binn,empty);}
624 
625  data.m_all_entries = static_cast<unsigned int>(fEntries);
626  data.m_in_range_entries = 0;
627  data.m_in_range_Sw = fSw;
628  data.m_in_range_Sw2 = fSw2;
629  data.m_in_range_Sxw.resize(3,0);
630  data.m_in_range_Sx2w.resize(3,0);
631  data.m_in_range_Sxw[0] = fSxw;
632  data.m_in_range_Sx2w[0] = fSx2w;
633  data.m_in_range_Sxw[1] = fSyw;
634  data.m_in_range_Sx2w[1] = fSy2w;
635  data.m_in_range_Sxw[2] = fSzw;
636  data.m_in_range_Sx2w[2] = fSz2w;
637 
638  histo::h3d* h = new histo::h3d("",10,0,1,10,0,1,10,0,1);
639  h->copy_from_data(data);
640  return h;
641 }

◆ TH_read_1D()

bool tools::rroot::TH_read_1D ( buffer a_buffer,
hd_data a_data,
double &  a_entries,
double &  a_Sw,
double &  a_Sw2,
double &  a_Sxw,
double &  a_Sx2w 
)
inline

Definition at line 138 of file streamers.

139  {
140  a_entries = 0;
141  a_Sw = 0;
142  a_Sw2 = 0;
143  a_Sxw = 0;
144  a_Sx2w = 0;
145 
146  unsigned int s, c;
147  short vers;
148  if(!a_buffer.read_version(vers,s,c)) return false;
149 
150  //::printf("debug : tools::rroot::TH_read_1D : version %d\n",vers);
151 
152  // Version 3 streaming (ROOT/v3-00-6).
153 
154  std::string name;
155  std::string title;
156  if(!Named_stream(a_buffer,name,title)) return false;
157 
158  a_data.m_title = title;
159 
160  {short color,style,width;
161  if(!AttLine_stream(a_buffer,color,style,width)) return false;}
162  {short color,style;
163  if(!AttFill_stream(a_buffer,color,style)) return false;}
164  if(!AttMarker_stream(a_buffer)) return false;
165 
166  int Ncells;
167  if(!a_buffer.read(Ncells)) return false;
168 
169  //fXAxis
170  if(!Axis_stream(a_buffer,a_data.m_axes[0])) return false;
171  a_data.m_axes[0].m_offset = 1;
172 
173  if(a_data.m_dimension==3) {
174  if(!Axis_stream(a_buffer,a_data.m_axes[1])) return false; //fYAxis
175  a_data.m_axes[1].m_offset = a_data.m_axes[0].m_offset * (a_data.m_axes[0].bins()+2);
176 
177  if(!Axis_stream(a_buffer,a_data.m_axes[2])) return false; //fZAxis
178  a_data.m_axes[2].m_offset = a_data.m_axes[1].m_offset * (a_data.m_axes[1].bins()+2);
179 
180  } else if(a_data.m_dimension==2) {
181  if(!Axis_stream(a_buffer,a_data.m_axes[1])) return false; //fYAxis
182  a_data.m_axes[1].m_offset = a_data.m_axes[0].m_offset * (a_data.m_axes[0].bins()+2);
183 
184  histo::axis<double,unsigned int> dummy;
185  if(!Axis_stream(a_buffer,dummy)) return false; //fZAxis
186  } else {
187  histo::axis<double,unsigned int> dummy;
188  if(!Axis_stream(a_buffer,dummy)) return false; //fYAxis
189  if(!Axis_stream(a_buffer,dummy)) return false; //fZAxis
190  }
191 
192  short barOffset;
193  if(!a_buffer.read(barOffset)) return false;
194 
195  short barWidth;
196  if(!a_buffer.read(barWidth)) return false;
197 
198  if(!a_buffer.read(a_entries)) return false;
199 
200  if(!a_buffer.read(a_Sw)) return false; //fTsumw
201 
202  if(!a_buffer.read(a_Sw2)) return false;
203 
204  if(!a_buffer.read(a_Sxw)) return false;
205 
206  if(!a_buffer.read(a_Sx2w)) return false;
207 
208  double max;
209  if(!a_buffer.read(max)) return false;
210 
211  double min;
212  if(!a_buffer.read(min)) return false;
213 
214  double NormFactor;
215  if(!a_buffer.read(NormFactor)) return false;
216 
217  {std::vector<double> v;
218  if(!Array_stream<double>(a_buffer,v)) return false;} //fContour TArrayD
219 
220  std::vector<double> sumw2; //fSumw2 TArrayD
221  if(!Array_stream<double>(a_buffer,sumw2)) return false;
222 
223  {std::string opt;
224  if(!a_buffer.read(opt)) return false; //TString fOption
225  //look if it is an "annotation trick" :
226  //if(opt.size()&&(opt[0]==0)) {
227  // fAnnotation = opt.substr(1,opt.size()-1);
228  //}
229  }
230 
231  {dummy_fac fac(a_buffer.out());
232  obj_list dummy(fac);
233  if(!dummy.stream(a_buffer)) {
234  a_buffer.out() << "tools::rroot::TH_read_1D :"
235  << " obj_list stream failed."
236  << std::endl;
237  return false;
238  }} //Functions
239 
240  if(vers>=4) {
241  int BufferSize;
242  if(!a_buffer.read(BufferSize)) return false;
243 
244  //Double_t* Buffer; //[fBufferSize]
245  if(!dummy_array_stream<double>(a_buffer,BufferSize)) return false;
246  }
247 
248  if(vers>=7) {
249  //EBinErrorOpt fBinStatErrOpt;
250  int dummy;
251  if(!a_buffer.read(dummy)) return false;
252  }
253 
254  // Add two for outflows.
255  if(a_data.m_dimension==1) {
256  a_data.m_bin_number = a_data.m_axes[0].m_number_of_bins + 2;
257  } else if(a_data.m_dimension==2) {
258  a_data.m_bin_number =
259  (a_data.m_axes[0].m_number_of_bins + 2) *
260  (a_data.m_axes[1].m_number_of_bins + 2);
261  } else if(a_data.m_dimension==3) {
262  a_data.m_bin_number =
263  (a_data.m_axes[0].m_number_of_bins + 2) *
264  (a_data.m_axes[1].m_number_of_bins + 2) *
265  (a_data.m_axes[2].m_number_of_bins + 2);
266  }
267 
268  unsigned int binn = a_data.m_bin_number;
269  a_data.m_bin_Sw2.resize(binn);
270  if(binn==sumw2.size()) {
271  for(unsigned int index=0;index<binn;index++){
272  a_data.m_bin_Sw2[index] = sumw2[index];
273  }
274  } else {
275  a_data.m_bin_Sw2.assign(binn,0);
276  }
277 
278  if(!a_buffer.check_byte_count(s,c,"TH")) return false;
279 
280  return true;
281 }

◆ TH_read_2D()

bool tools::rroot::TH_read_2D ( buffer a_buffer,
hd_data a_data,
double &  a_entries,
double &  a_Sw,
double &  a_Sw2,
double &  a_Sxw,
double &  a_Sx2w,
double &  a_Syw,
double &  a_Sy2w 
)
inline

Definition at line 284 of file streamers.

286  {
287  unsigned int s, c;
288  short v;
289  if(!a_buffer.read_version(v,s,c)) return false;
290 
291  // Version 3 streaming (ROOT/v3-00-6).
292 
293  if(!TH_read_1D(a_buffer,a_data,a_entries,a_Sw,a_Sw2,a_Sxw,a_Sx2w)) return false;
294  // the upper set :
295  //data.m_title
296  //data.m_bin_number
297  //data.m_axes
298  //data.m_bin_Sw2
299 
300  double ScaleFactor;
301  if(!a_buffer.read(ScaleFactor)) return false;
302  if(!a_buffer.read(a_Syw)) return false;
303  if(!a_buffer.read(a_Sy2w)) return false;
304 
305  double Tsumwxy;
306  if(!a_buffer.read(Tsumwxy)) return false;
307  a_data.m_in_range_plane_Sxyw[0] = Tsumwxy;
308 
309  if(!a_buffer.check_byte_count(s,c,"TH2")) return false;
310 
311  return true;
312 }

◆ TH_read_3D()

bool tools::rroot::TH_read_3D ( buffer a_buffer,
hd_data a_data,
double &  a_entries,
double &  a_Sw,
double &  a_Sw2,
double &  a_Sxw,
double &  a_Sx2w,
double &  a_Syw,
double &  a_Sy2w,
double &  a_Szw,
double &  a_Sz2w 
)
inline

Definition at line 314 of file streamers.

318  {
319  unsigned int s, c;
320  short v;
321  if(!a_buffer.read_version(v,s,c)) return false;
322 
323  if(!TH_read_1D(a_buffer,a_data,a_entries,a_Sw,a_Sw2,a_Sxw,a_Sx2w)) return false;
324  if(!Att3D_stream(a_buffer)) return false;
325 
326  // the upper set :
327  //data.m_title
328  //data.m_bin_number
329  //data.m_axes
330  //data.m_bin_Sw2
331 
332  if(!a_buffer.read(a_Syw)) return false;
333  if(!a_buffer.read(a_Sy2w)) return false;
334  double Tsumwxy;
335  if(!a_buffer.read(Tsumwxy)) return false;
336 
337  if(!a_buffer.read(a_Szw)) return false;
338  if(!a_buffer.read(a_Sz2w)) return false;
339  double Tsumwxz;
340  if(!a_buffer.read(Tsumwxz)) return false;
341  double Tsumwyz;
342  if(!a_buffer.read(Tsumwyz)) return false;
343 
344  a_data.m_in_range_plane_Sxyw[0] = Tsumwxy;
345  a_data.m_in_range_plane_Sxyw[1] = Tsumwyz;
346  a_data.m_in_range_plane_Sxyw[2] = Tsumwxz;
347 
348  if(!a_buffer.check_byte_count(s,c,"TH3")) return false;
349 
350  return true;
351 }

◆ THistogram_cls()

const std::string& tools::rroot::THistogram_cls ( )
inline

Definition at line 650 of file THistogram.

650  {
651  static const std::string s_v("THistogram");
652  return s_v;
653 }

◆ THistogram_to_h1d()

histo::h1d* tools::rroot::THistogram_to_h1d ( const pd_data_t a_data)
inline

Definition at line 688 of file THistogram.

688  {
689  unsigned int dim = a_data.m_dimension;
690  bool is_profile = a_data.m_is_profile;
691  if(dim!=1) return 0;
692  if(is_profile) return 0;
693  histo::h1d* histo = new histo::h1d("",10,0,1);
694  histo->copy_from_data(a_data);
695  return histo;
696 }

◆ THistogram_to_h2d()

histo::h2d* tools::rroot::THistogram_to_h2d ( const pd_data_t a_data)
inline

Definition at line 698 of file THistogram.

698  {
699  unsigned int dim = a_data.m_dimension;
700  bool is_profile = a_data.m_is_profile;
701  if(dim!=2) return 0;
702  if(is_profile) return 0;
703  histo::h2d* histo = new histo::h2d("",10,0,1,10,0,1);
704  histo->copy_from_data(a_data);
705  return histo;
706 }

◆ THistogram_to_p1d()

histo::p1d* tools::rroot::THistogram_to_p1d ( const pd_data_t a_data)
inline

Definition at line 708 of file THistogram.

708  {
709  unsigned int dim = a_data.m_dimension;
710  bool is_profile = a_data.m_is_profile;
711  if(dim!=1) return 0;
712  if(!is_profile) return 0;
713  histo::p1d* histo = new histo::p1d("",10,0,1);
714  histo->copy_from_data(a_data);
715  return histo;
716 }

◆ THistogram_to_p2d()

histo::p2d* tools::rroot::THistogram_to_p2d ( const pd_data_t a_data)
inline

Definition at line 718 of file THistogram.

718  {
719  unsigned int dim = a_data.m_dimension;
720  bool is_profile = a_data.m_is_profile;
721  if(dim!=2) return 0;
722  if(!is_profile) return 0;
723  histo::p2d* histo = new histo::p2d("",10,0,1,10,0,1);
724  histo->copy_from_data(a_data);
725  return histo;
726 }

◆ TList_cls()

const std::string& tools::rroot::TList_cls ( )
inline

Definition at line 57 of file clss.

57  {
58  static const std::string s_v("TList");
59  return s_v;
60 }

◆ TNamed_cls()

const std::string& tools::rroot::TNamed_cls ( )
inline

Definition at line 62 of file clss.

62  {
63  static const std::string s_v("TNamed");
64  return s_v;
65 }

◆ TProfile2D_cls()

const std::string& tools::rroot::TProfile2D_cls ( )
inline

Definition at line 42 of file clss.

42  {
43  static const std::string s_v("TProfile2D");
44  return s_v;
45 }

◆ TProfile2D_stream()

histo::p2d* tools::rroot::TProfile2D_stream ( buffer a_buffer)
inline

Definition at line 712 of file streamers.

712  {
713  unsigned int s, c;
714  short v;
715  if(!a_buffer.read_version(v,s,c)) return 0;
716 
717  // Version 3 streaming (ROOT/v3-00-6).
718 
719  //WARNING : the mapping histo::p1d / TProfile is not obvious.
720  //p1d::m_bin_Svw <---> TProfile::fArray
721  //p1d::m_bin_Sv2w <---> TProfile::fSumw2
722  //p1d::m_bin_Sw <---> TProfile::fBinEntries
723 
724  histo::h2d* h = TH2D_stream(a_buffer);
725  if(!h) return 0;
726 
727  //NOTE : histo.m_bin_Sw <---> TH2D::TArrayD::fArray
728 
729  pd_data data(h->dac());
730  delete h;
731 
732  std::vector<double> bins; //fBinEntries TArrayD
733  if(!Array_stream<double>(a_buffer,bins)) return 0;
734  int errorMode;
735  if(!a_buffer.read(errorMode)) return 0;
736  double zmin;
737  if(!a_buffer.read(zmin)) return 0;
738  double zmax;
739  if(!a_buffer.read(zmax)) return 0;
740  if(v>=5) {
741  double sumwz;
742  if(!a_buffer.read(sumwz)) return 0;
743  double sumwz2;
744  if(!a_buffer.read(sumwz2)) return 0;
745  }
746  if(v>=7) {
747  std::vector<double> bins_sumw2; //fBinSumw2 TArrayD
748  if(!Array_stream<double>(a_buffer,bins_sumw2)) return 0;
749  }
750  if(!a_buffer.check_byte_count(s,c,"TProfile2D")) return 0;
751 
752  data.m_is_profile = true;
753  data.m_cut_v = true;
754  data.m_min_v = zmin;
755  data.m_max_v = zmax;
756 
757  unsigned int binn = data.m_bin_number;
758  data.m_bin_Svw.resize(binn);
759  data.m_bin_Sv2w.resize(binn);
760 
761  for(unsigned int index=0;index<binn;index++){
762  double svw = data.m_bin_Sw[index];
763  double sv2w = data.m_bin_Sw2[index];
764  double sw = bins[index];
765  //data.m_bin_entries[index] = (int)sw; //FIXME : ok for w = 1 only !
766  data.m_bin_Sw[index] = (double)sw;
767  //FIXME : data.m_bin_Sxw
768  //FIXME : data.m_bin_Sx2w
769  data.m_bin_Svw[index] = svw;
770  data.m_bin_Sv2w[index] = sv2w;
771  }
772 
773  histo::p2d* p = new histo::p2d("",10,0,1,10,0,1);
774  p->copy_from_data(data);
775  return p;
776 }

◆ TProfile_cls()

const std::string& tools::rroot::TProfile_cls ( )
inline

Definition at line 37 of file clss.

37  {
38  static const std::string s_v("TProfile");
39  return s_v;
40 }

◆ TProfile_stream()

histo::p1d* tools::rroot::TProfile_stream ( buffer a_buffer)
inline

Definition at line 643 of file streamers.

643  {
644  unsigned int s, c;
645  short v;
646  if(!a_buffer.read_version(v,s,c)) return 0;
647 
648  // Version 3 streaming (ROOT/v3-00-6).
649 
650  //WARNING : the mapping histo::p1d / TProfile is not obvious.
651  //p1d::m_bin_Svw <---> TProfile::fArray
652  //p1d::m_bin_Sv2w <---> TProfile::fSumw2
653  //p1d::m_bin_Sw <---> TProfile::fBinEntries
654 
655  histo::h1d* h = TH1D_stream(a_buffer);
656  if(!h) return 0;
657 
658  //NOTE : histo.m_bin_Sw <---> TH1D::TArrayD::fArray
659 
660  pd_data data(h->dac());
661  delete h;
662 
663  std::vector<double> bins; //fBinEntries TArrayD
664  if(!Array_stream<double>(a_buffer,bins)) return 0;
665  int errorMode;
666  if(!a_buffer.read(errorMode)) return 0;
667  double ymin;
668  if(!a_buffer.read(ymin)) return 0;
669  double ymax;
670  if(!a_buffer.read(ymax)) return 0;
671 
672  if(v>=4) {
673  double sumwy;
674  if(!a_buffer.read(sumwy)) return 0;
675  double sumwy2;
676  if(!a_buffer.read(sumwy2)) return 0;
677  }
678  if(v>=5) {
679  std::vector<double> bins_sumw2; //fBinSumw2 TArrayD
680  if(!Array_stream<double>(a_buffer,bins_sumw2)) return 0;
681  }
682 
683  if(!a_buffer.check_byte_count(s,c,"TProfile")) return 0;
684 
685  data.m_is_profile = true;
686  data.m_cut_v = true;
687  data.m_min_v = ymin;
688  data.m_max_v = ymax;
689 
690  unsigned int binn = data.m_bin_number;
691  data.m_bin_Svw.resize(binn);
692  data.m_bin_Sv2w.resize(binn);
693 
694  for(unsigned int index=0;index<binn;index++){
695  double svw = data.m_bin_Sw[index];
696  double sv2w = data.m_bin_Sw2[index];
697  double sw = bins[index];
698  //data.m_bin_entries[index] = (int)sw; //FIXME : ok for w = 1 only !
699  data.m_bin_Sw[index] = (double)sw;
700  //FIXME : data.m_bin_Sxw
701  //FIXME : data.m_bin_Sx2w
702  data.m_bin_Svw[index] = svw;
703  data.m_bin_Sv2w[index] = sv2w;
704  }
705 
706  histo::p1d* p = new histo::p1d("",10,0,1);
707  p->copy_from_data(data);
708  // We have now a valid histo::p1d.
709  return p;
710 }

◆ TTree_cls()

const std::string& tools::rroot::TTree_cls ( )
inline

Definition at line 15 of file tree.

15  {
16  static const std::string s_v("TTree");
17  return s_v;
18 }

◆ vector3_cid()

cid tools::rroot::vector3_cid ( )
inline

Definition at line 51 of file cids.

51 {return base_cid()+61;}
tools::rroot::read_v3
bool read_v3(buffer &a_buffer, pd_data_t &a_data)
Definition: THistogram:300
tools::rroot::AttMarker_stream
bool AttMarker_stream(buffer &a_buffer)
Definition: named:48
tools::rroot::read_v5
bool read_v5(buffer &a_buffer, pd_data_t &a_data)
Definition: THistogram:428
tools::jpeg::is
bool is(const std::string &a_file)
Definition: jpeg:216
tools::rroot::read_v6
bool read_v6(buffer &a_buffer, pd_data_t &a_data)
Definition: THistogram:482
tools::uint64
unsigned long long uint64
Definition: typedefs:72
tools::osc::s_p2d
const std::string & s_p2d()
Definition: osc_streamers:61
tools::rroot::read_v0
bool read_v0(buffer &a_buffer, pd_data_t &a_data)
Definition: THistogram:128
tools::rroot::pointer_stream
bool pointer_stream(buffer &a_buffer, ifac &a_fac, ifac::args &a_args, T *&a_obj, bool &a_created)
Definition: buffer:706
tools::rroot::add_outflow
void add_outflow(std::vector< axis_t > &aAxes)
Definition: THistogram:121
tools::rroot::THistogram_to_h1d
histo::h1d * THistogram_to_h1d(const pd_data_t &a_data)
Definition: THistogram:688
tools::rroot::THistogram_to_p2d
histo::p2d * THistogram_to_p2d(const pd_data_t &a_data)
Definition: THistogram:718
tools::rroot::TH2D_stream
histo::h2d * TH2D_stream(buffer &a_buffer)
Definition: streamers:523
tools::rroot::read_v2
bool read_v2(buffer &a_buffer, pd_data_t &a_data)
Definition: THistogram:242
tools::osc::s_h2d
const std::string & s_h2d()
Definition: osc_streamers:46
tools::osc::s_h3d
const std::string & s_h3d()
Definition: osc_streamers:51
tools::rroot::TTree_cls
const std::string & TTree_cls()
Definition: tree:15
tools::rroot::read_key
bool read_key(std::ostream &a_out, ifile &a_file, key &a_key, bool a_dump)
Definition: rall:74
tools::vec_data
const T * vec_data(const std::vector< T > &a_vec)
Definition: vdata:18
tools::rroot::THistogram_cls
const std::string & THistogram_cls()
Definition: THistogram:650
tools::rroot::TNamed_cls
const std::string & TNamed_cls()
Definition: clss:62
tools::rroot::read_annotations
bool read_annotations(buffer &a_buffer, annotations_t &a_annotations)
Definition: THistogram:594
tools::rroot::read
void read(std::ostream &a_out, ifile &a_file, const std::vector< key * > &a_keys, bool a_recursive, bool a_ls, bool a_dump, unsigned int a_spaces)
Definition: rall:467
tools::rroot::AttLine_stream
bool AttLine_stream(buffer &a_buffer, short &a_color, short &a_style, short &a_width)
Definition: named:27
tools::rroot::TH3D_stream
histo::h3d * TH3D_stream(buffer &a_buffer)
Definition: streamers:582
tools::rroot::TH_read_1D
bool TH_read_1D(buffer &a_buffer, hd_data &a_data, double &a_entries, double &a_Sw, double &a_Sw2, double &a_Sxw, double &a_Sx2w)
Definition: streamers:138
tools::rroot::Named_stream
bool Named_stream(buffer &a_buffer, std::string &a_name, std::string &a_title)
Definition: named:15
tools::rroot::TProfile_cls
const std::string & TProfile_cls()
Definition: clss:37
tools::rroot::THistogram_to_p1d
histo::p1d * THistogram_to_p1d(const pd_data_t &a_data)
Definition: THistogram:708
tools::rroot::TH2F_stream
histo::h2d * TH2F_stream(buffer &a_buffer)
Definition: streamers:461
tools::rroot::TH1F_stream
histo::h1d * TH1F_stream(buffer &a_buffer)
Definition: streamers:353
tools::rroot::TH3D_cls
const std::string & TH3D_cls()
Definition: clss:32
tools::rroot::TH1D_cls
const std::string & TH1D_cls()
Definition: clss:17
tools::rroot::TDirectory_cls
const std::string & TDirectory_cls()
Definition: clss:47
tools::wroot::base_cid
cid base_cid()
Definition: cids:14
tools::wroot::pd_data
histo::profile_data< double, unsigned int, unsigned int, double, double > pd_data
Definition: streamers:27
tools::wroot::TH2D_stream
bool TH2D_stream(buffer &a_buffer, const histo::h2d &a_h, const std::string &a_name)
Definition: streamers:310
tools::rroot::TH2D_cls
const std::string & TH2D_cls()
Definition: clss:27
tools::rroot::AttFill_stream
bool AttFill_stream(buffer &a_buffer, short &a_color, short &a_style)
Definition: named:38
tools::rroot::find_dir
TDirectory * find_dir(directory &a_dir, const std::string &a_name)
Definition: rall:23
tools::rroot::TProfile_stream
histo::p1d * TProfile_stream(buffer &a_buffer)
Definition: streamers:643
tools::osc::s_h1d
const std::string & s_h1d()
Definition: osc_streamers:41
tools::rroot::TH2F_cls
const std::string & TH2F_cls()
Definition: clss:22
tools::rroot::TProfile2D_cls
const std::string & TProfile2D_cls()
Definition: clss:42
tools::rroot::Axis_read_v0_v3
bool Axis_read_v0_v3(buffer &a_buffer, axis_t &a_axis)
Definition: THistogram:22
tools::words
void words(const std::string &a_string, const std::string &a_sep, bool a_take_empty, std::vector< std::string > &a_words, bool a_clear=true)
Definition: words:12
tools::rroot::annotations_t
std::map< std::string, std::string > annotations_t
Definition: THistogram:20
tools::rroot::Axis_stream
bool Axis_stream(buffer &a_buffer, histo::axis< double, unsigned int > &a_fAxis)
Definition: streamers:73
tools::wroot::Object_stream
bool Object_stream(buffer &a_buffer)
Definition: named:14
tools::wroot::TH1D_stream
bool TH1D_stream(buffer &a_buffer, const histo::h1d &a_h, const std::string &a_name)
Definition: streamers:285
tools::rroot::Axis_read_v7
bool Axis_read_v7(buffer &a_buffer, axis_t &a_axis)
Definition: THistogram:62
tools::wroot::AttAxis_stream
bool AttAxis_stream(buffer &a_buffer)
Definition: streamers:29
tools::rroot::Axis_read_v4_v6
bool Axis_read_v4_v6(buffer &a_buffer, axis_t &a_axis)
Definition: THistogram:39
tools::rroot::TProfile2D_stream
histo::p2d * TProfile2D_stream(buffer &a_buffer)
Definition: streamers:712
tools::rroot::TH_read_2D
bool TH_read_2D(buffer &a_buffer, hd_data &a_data, double &a_entries, double &a_Sw, double &a_Sw2, double &a_Sxw, double &a_Sx2w, double &a_Syw, double &a_Sy2w)
Definition: streamers:284
tools::rroot::axis_t
histo::axis< double, unsigned int > axis_t
Definition: THistogram:19
tools::rroot::TH_read_3D
bool TH_read_3D(buffer &a_buffer, hd_data &a_data, double &a_entries, double &a_Sw, double &a_Sw2, double &a_Sxw, double &a_Sx2w, double &a_Syw, double &a_Sy2w, double &a_Szw, double &a_Sz2w)
Definition: streamers:314
tools::rroot::Att3D_stream
bool Att3D_stream(buffer &a_buffer)
Definition: named:72
tools::rroot::TH1D_stream
histo::h1d * TH1D_stream(buffer &a_buffer)
Definition: streamers:409
tools::rroot::pd_data_t
histo::profile_data< double, unsigned int, unsigned int, double, double > pd_data_t
Definition: THistogram:18
tools::osc::s_p1d
const std::string & s_p1d()
Definition: osc_streamers:56
tools::rroot::THistogram_to_h2d
histo::h2d * THistogram_to_h2d(const pd_data_t &a_data)
Definition: THistogram:698
tools::rroot::dummy_TXxx_pointer_stream
bool dummy_TXxx_pointer_stream(buffer &a_buffer, ifac &a_fac)
Definition: buffer:631
tools::rroot::read_THistogram
bool read_THistogram(buffer &a_buffer, pd_data_t &a_data, annotations_t &a_annotations)
Definition: THistogram:611
tools::rroot::read_v7
bool read_v7(buffer &a_buffer, pd_data_t &a_data)
Definition: THistogram:547
tools::rroot::TH1F_cls
const std::string & TH1F_cls()
Definition: clss:12
tools::rroot::dump
void dump(std::ostream &a_out, ifile &a_file, const std::vector< key * > &a_keys, bool a_recursive, unsigned int a_spaces=0)
Definition: streamers:846
tools::uint32
unsigned int uint32
Definition: typedefs:71
tools::histo::histo_data::m_dimension
dim_t m_dimension
Definition: histo_data:172
tools::rroot::new_bin_number
unsigned int new_bin_number(const std::vector< axis_t > &aAxes)
Definition: THistogram:79
tools::wroot::hd_data
histo::histo_data< double, unsigned int, unsigned int, double > hd_data
Definition: streamers:25
tools::rroot::read_v4
bool read_v4(buffer &a_buffer, pd_data_t &a_data)
Definition: THistogram:365
tools::rroot::read_v1
bool read_v1(buffer &a_buffer, pd_data_t &a_data)
Definition: THistogram:186