|
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 |
|
|
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) |
|
TDirectory * | find_dir (directory &a_dir, const std::string &a_name) |
|
directory * | find_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::h1d * | key_to_h1d (ifile &a_file, key &a_key, bool a_warn=true) |
|
histo::h2d * | key_to_h2d (ifile &a_file, key &a_key, bool a_warn=true) |
|
histo::h3d * | key_to_h3d (ifile &a_file, key &a_key) |
|
histo::p1d * | key_to_p1d (ifile &a_file, key &a_key) |
|
histo::p2d * | key_to_p2d (ifile &a_file, key &a_key) |
|
tree * | key_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::h1d * | TH1F_stream (buffer &a_buffer) |
|
histo::h1d * | TH1D_stream (buffer &a_buffer) |
|
histo::h2d * | TH2F_stream (buffer &a_buffer) |
|
histo::h2d * | TH2D_stream (buffer &a_buffer) |
|
histo::h3d * | TH3D_stream (buffer &a_buffer) |
|
histo::p1d * | TProfile_stream (buffer &a_buffer) |
|
histo::p2d * | TProfile2D_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::h1d * | THistogram_to_h1d (const pd_data_t &a_data) |
|
histo::h2d * | THistogram_to_h2d (const pd_data_t &a_data) |
|
histo::p1d * | THistogram_to_p1d (const pd_data_t &a_data) |
|
histo::p2d * | THistogram_to_p2d (const pd_data_t &a_data) |
|
const std::string & | TTree_cls () |
|
tree * | find_tree (file &a_file, ifac &a_fac, const std::string &a_name, bool a_map_objs=false) |
|
branch_element * | find_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_element * | find_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) |
|
◆ annotations_t
◆ axis_t
◆ date
Definition at line 10 of file date.
◆ hd_data
◆ pd_data
◆ pd_data_t
◆ seek
Definition at line 16 of file seek.
◆ seek32
Definition at line 17 of file seek.
◆ 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.
89 unsigned int dim = aAxes.size();
91 std::vector<int> aoff(dim);
94 {
for(
unsigned iaxis=0;iaxis<dim;iaxis++) newn *= (aAxes[iaxis].bins()+2);}
97 {
for(
unsigned iaxis=1;iaxis<dim;iaxis++) {
98 aoff[iaxis] = aoff[iaxis-1] * (aAxes[iaxis-1].bins()+2);
101 std::vector<T> tmp = aVector;
102 int oldn = (int)tmp.size();
103 aVector.resize(newn,0);
105 std::vector<int>
is(dim);
107 for(
int index=0;index<oldn;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;
116 {
for(
unsigned iaxis=0;iaxis<dim;iaxis++) offset +=
is[iaxis] * aoff[iaxis];}
117 aVector[offset] = tmp[index];
◆ add_outflow() [2/2]
void tools::rroot::add_outflow |
( |
std::vector< axis_t > & |
aAxes | ) |
|
|
inline |
Definition at line 121 of file THistogram.
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);
◆ 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.
84 if(!a_buffer.read(sz))
return false;
86 if(!a_buffer.check_eob(sz))
return false;
88 if(!a_buffer.read_fast_array<T>(
vec_data(a_v),sz))
return false;
◆ Att3D_stream()
bool tools::rroot::Att3D_stream |
( |
buffer & |
a_buffer | ) |
|
|
inline |
Definition at line 72 of file named.
75 if(!a_buffer.read_version(v,s,c))
return false;
76 if(!a_buffer.check_byte_count(s,c,
"TAtt3D"))
return false;
◆ AttAxis_stream()
bool tools::rroot::AttAxis_stream |
( |
buffer & |
a_buffer | ) |
|
|
inline |
Definition at line 39 of file streamers.
40 int fNdivisions = 510;
42 short fLabelColor = 1;
43 short fLabelFont = 62;
44 float fLabelOffset = 0.005F;
45 float fLabelSize = 0.04F;
46 float fTickLength = 0.03F;
47 float fTitleOffset = 1;
48 float fTitleSize = 0.04F;
49 short fTitleColor = 1;
50 short fTitleFont = 62;
55 if(!a_buffer.read_version(v,s,c))
return false;
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;
69 if(!a_buffer.check_byte_count(s, c,
"TAttAxis"))
return false;
◆ AttFill_stream()
bool tools::rroot::AttFill_stream |
( |
buffer & |
a_buffer, |
|
|
short & |
a_color, |
|
|
short & |
a_style |
|
) |
| |
|
inline |
Definition at line 38 of file named.
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;
◆ 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.
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;
◆ AttMarker_stream()
bool tools::rroot::AttMarker_stream |
( |
buffer & |
a_buffer | ) |
|
|
inline |
Definition at line 48 of file named.
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;
◆ 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.
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;
30 if(!a_buffer.read(idummy))
return false;
31 if(!a_buffer.read(a_axis.m_bin_width))
return false;
32 if(!a_buffer.read(ddummy))
return false;
33 if(!a_buffer.read(ddummy))
return false;
34 a_axis.m_fixed =
true;
35 a_axis.m_edges.clear();
◆ 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.
42 if(!a_buffer.read(a_axis.m_offset))
return false;
43 if(!a_buffer.read(idummy))
return false;
44 if(!a_buffer.read(idummy))
return false;
45 if(!a_buffer.read(ddummy))
return false;
46 if(!a_buffer.read(ddummy))
return false;
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;
53 if(!a_buffer.read(edgen))
return false;
54 for(
int count=0;count<edgen;count++) {
56 if(!a_buffer.read(value))
return false;
57 a_axis.m_edges.push_back(value);
◆ Axis_read_v7()
bool tools::rroot::Axis_read_v7 |
( |
buffer & |
a_buffer, |
|
|
axis_t & |
a_axis |
|
) |
| |
|
inline |
Definition at line 62 of file THistogram.
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;
70 if(!a_buffer.read(edgen))
return false;
71 for(
int count=0;count<edgen;count++) {
73 if(!a_buffer.read(value))
return false;
74 a_axis.m_edges.push_back(value);
◆ 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.
77 if(!a_buffer.read_version(v,s,c))
return false;
86 if(!a_buffer.read(number))
return false;
88 if(!a_buffer.read(min))
return false;
90 if(!a_buffer.read(max))
return false;
92 std::vector<double> edges;
93 if(!Array_stream<double>(a_buffer,edges))
return false;
95 size_t edgen = edges.size();
97 a_fAxis.configure(number,min,max);
99 std::vector<double> vedges;
100 for(
size_t index=0;index<edgen;index++) {
101 vedges.push_back(edges[index]);
103 a_fAxis.configure(vedges);
107 if(!a_buffer.read(First))
return false;
109 if(!a_buffer.read(Last))
return false;
112 unsigned short dummy;
113 if(!a_buffer.read(dummy))
return false;
117 unsigned char TimeDisplay;
118 if(!a_buffer.read(TimeDisplay))
return false;
121 std::string TimeFormat;
122 if(!a_buffer.read(TimeFormat))
return false;
126 dummy_fac fac(a_buffer.out());
130 if(!a_buffer.check_byte_count(s,c,
"TAxis"))
return false;
◆ base_cid()
cid tools::rroot::base_cid |
( |
| ) |
|
|
inline |
Definition at line 14 of file cids.
◆ base_leaf_cid()
cid tools::rroot::base_leaf_cid |
( |
| ) |
|
|
inline |
Definition at line 45 of file cids.
◆ basket_cid()
cid tools::rroot::basket_cid |
( |
| ) |
|
|
inline |
Definition at line 23 of file cids.
◆ big_file_version_tag()
uint32 tools::rroot::big_file_version_tag |
( |
| ) |
|
|
inline |
Definition at line 19 of file seek.
◆ branch_cid()
cid tools::rroot::branch_cid |
( |
| ) |
|
|
inline |
Definition at line 24 of file cids.
◆ branch_element_cid()
cid tools::rroot::branch_element_cid |
( |
| ) |
|
|
inline |
Definition at line 25 of file cids.
◆ branch_object_cid()
cid tools::rroot::branch_object_cid |
( |
| ) |
|
|
inline |
Definition at line 42 of file cids.
◆ 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()
Definition at line 483 of file leaf.
483 {
return safe_cast<base_leaf, leaf<float> >(a_leaf);}
◆ cast_leaf_int()
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.
◆ 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.
95 if(!a_buffer.read(is_array))
return false;
96 if(!is_array)
return true;
99 bool status = a_buffer.read_fast_array<T>(v,a_n);
◆ dummy_cid()
cid tools::rroot::dummy_cid |
( |
| ) |
|
|
inline |
Definition at line 21 of file cids.
◆ 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.
635 bool status = a_buffer.read_object(a_fac,args,obj,created);
638 if(a_buffer.map_objs()) a_buffer.remove_in_map(obj);
◆ 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.
853 {std::vector<key*>::const_iterator it;
854 for(it=a_keys.begin();it!=a_keys.end();++it) {
857 {
for(
unsigned int index=0;index<a_spaces;index++) a_out <<
" ";}
862 {std::vector<key*>::const_iterator it;
863 for(it=a_keys.begin();it!=a_keys.end();++it) {
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;
871 if(!a_recursive)
continue;
874 char* buf = k.get_object_buffer(a_file,sz);
877 a_out <<
"tools::rroot::dump :"
878 <<
" can't get directory data buffer."
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."
888 const std::vector<key*>& keys = tdir.keys();
889 dump(a_out,a_file,keys,a_recursive,a_spaces+1);
◆ find_be()
Definition at line 64 of file tree_manip.
65 std::ostream& out = a_tree.file().out();
67 branch* _branch = a_tree.find_branch(a_name,
true);
69 out <<
"tools::rroot::find_be :"
70 <<
" branch not found."
75 branch_element* be = id_cast<branch,branch_element>(*_branch);
77 out <<
"tools::rroot::find_be :"
78 <<
" branch not a branch_element."
◆ 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.
141 branch* _branch = a_tree.find_branch(a_name);
143 a_tree.out() <<
"tools::rroot::find_branch_element : branch " << sout(a_name) <<
" not found." << std::endl;
146 branch_element* be = safe_cast<branch,branch_element>(*_branch);
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()) <<
"."
◆ find_dir()
Definition at line 23 of file rall.
24 std::ostream& out = a_dir.file().out();
25 key* k = a_dir.find_key(a_name);
34 out <<
"tools::rroot::find_dir :"
35 <<
" key " << a_name <<
" not a TDirectory."
40 char* buf = k->get_object_buffer(a_dir.file(),sz);
42 out <<
"tools::rroot::find_dir :"
43 <<
" can't get directory data buffer."
47 buffer b(out,a_dir.file().byte_swap(),sz,buf,k->key_length(),
false);
48 TDirectory* tdir =
new TDirectory(a_dir.file());
50 if(!tdir->stream(b)) {
51 out <<
"tools::rroot::find_dir :"
52 <<
" can't stream TDirectory."
◆ 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.
116 base_leaf* _base_leaf = a_tree.find_leaf(a_name);
118 a_tree.out() <<
"tools::rroot::find_leaf : base_leaf " << sout(a_name) <<
" not found." << std::endl;
123 a_branch = a_tree.find_leaf_branch(*_base_leaf);
125 a_tree.out() <<
"tools::rroot::find_leaf : branch of base_leaf " << sout(a_name) <<
" not found." << std::endl;
130 a_leaf = safe_cast<base_leaf,LEAF>(*_base_leaf);
132 a_tree.out() <<
"tools::rroot::find_leaf : base_leaf " << sout(a_name) <<
" is not a LEAF." << std::endl;
◆ find_path_dir()
Definition at line 59 of file rall.
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]);
67 if(index==(ws.size()-1))
return _dir;
68 if(index)
delete cur_dir;
◆ 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.
15 std::ostream& out = a_file.out();
18 key* key = a_file.dir().find_key(a_name);
20 out <<
"tools::rroot::find_tree :"
21 <<
" key " << sout(a_name) <<
" not found."
27 char* buf = key->get_object_buffer(a_file,sz);
29 out <<
"tools::rroot::find_tree :"
30 <<
" can't get data buffer of "
31 << sout(key->object_name()) <<
"."
41 out <<
"tools::rroot::find_tree :"
42 <<
" key object class "
43 << sout(key->object_class())
49 buffer b(out,a_file.byte_swap(),sz,buf,key->key_length(),
false);
50 b.set_map_objs(a_map_objs);
52 tree* _tree =
new tree(a_file,a_fac);
53 if(!_tree->stream(b)) {
54 out <<
"tools::rroot::find_tree :"
55 <<
" TTree streaming failed"
◆ find_vec()
Definition at line 87 of file tree_manip.
88 std::ostream& out = a_file.out();
91 if(!a_be.find_entry(a_file,a_event,n)) {
92 out <<
"tools::rroot::find_vec : branch_element.find_entry() failed." << std::endl;
96 iro* o = a_be.object();
97 stl_vector<T>* od = id_cast<iro, stl_vector<T> >(*o);
99 out <<
"tools::rroot::find_vec : object not a tools::rroot::stl_vector<T>." << std::endl;
◆ 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.
716 if(!a_buffer.read(is_array))
return false;
717 if(!is_array)
return true;
718 if(!a_n)
return true;
720 if(!a_buffer.read_fast_array<T>(a_v,a_n)) {
◆ GeoAtt_stream()
bool tools::rroot::GeoAtt_stream |
( |
buffer & |
a_buffer | ) |
|
|
inline |
Definition at line 62 of file named.
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;
◆ graph_cid()
cid tools::rroot::graph_cid |
( |
| ) |
|
|
inline |
Definition at line 28 of file cids.
◆ hash_list_cid()
cid tools::rroot::hash_list_cid |
( |
| ) |
|
|
inline |
Definition at line 18 of file cids.
◆ iros_cid()
cid tools::rroot::iros_cid |
( |
| ) |
|
|
inline |
Definition at line 16 of file cids.
◆ 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.
312 a_annotations.clear();
313 std::ostream& out = a_key.out();
315 if(a_warn) out <<
"tools::rroot::key_to_annotations : key not a TNamed." << std::endl;
319 char* buf = a_key.get_object_buffer(a_file,sz);
321 out <<
"tools::rroot::key_to_annotations : can't get data buffer of " << a_key.object_name() <<
"." << std::endl;
324 buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),
false);
325 std::string histo_name;
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;
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;
◆ key_to_h1d()
Definition at line 344 of file rall.
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;
351 char* buf = a_key.get_object_buffer(a_file,sz);
353 out <<
"tools::rroot::key_to_h1d : can't get data buffer of " << a_key.object_name() <<
"." << std::endl;
356 buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),
false);
357 if(a_key.object_class()==
TH1D_cls()) {
◆ key_to_h2d()
Definition at line 364 of file rall.
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;
371 char* buf = a_key.get_object_buffer(a_file,sz);
373 out <<
"tools::rroot::key_to_h2d : can't get data buffer of " << a_key.object_name() <<
"." << std::endl;
376 buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),
false);
377 if(a_key.object_class()==
TH2D_cls()) {
◆ key_to_h3d()
Definition at line 384 of file rall.
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."
393 char* buf = a_key.get_object_buffer(a_file,sz);
395 out <<
"tools::rroot::key_to_h3d :"
396 <<
" can't get data buffer of " << a_key.object_name() <<
"."
400 buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),
false);
◆ key_to_p1d()
Definition at line 404 of file rall.
405 std::ostream& out = a_key.out();
407 out <<
"tools::rroot::key_to_p1d :"
408 <<
" key not a TProfile."
413 char* buf = a_key.get_object_buffer(a_file,sz);
415 out <<
"tools::rroot::key_to_p1d :"
416 <<
" can't get data buffer of " << a_key.object_name() <<
"."
420 buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),
false);
◆ key_to_p2d()
Definition at line 424 of file rall.
425 std::ostream& out = a_key.out();
427 out <<
"tools::rroot::key_to_p2d :"
428 <<
" key not a TProfile2D."
433 char* buf = a_key.get_object_buffer(a_file,sz);
435 out <<
"tools::rroot::key_to_p2d :"
436 <<
" can't get data buffer of " << a_key.object_name() <<
"."
440 buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),
false);
◆ 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.
445 std::ostream& out = a_key.out();
447 if(a_warn) out <<
"tools::rroot::key_to_tree : key not a TTree." << std::endl;
451 char* buf = a_key.get_object_buffer(a_file,sz);
453 out <<
"tools::rroot::key_to_tree : can't get data buffer of " << a_key.object_name() <<
"." << std::endl;
456 buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),
false);
457 b.set_map_objs(
true);
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;
◆ leaf_bool_cls()
const std::string& tools::rroot::leaf_bool_cls |
( |
| ) |
|
|
inline |
Definition at line 51 of file leaf.
52 static const std::string s_v(
"tools::rroot::leaf<bool>");
◆ leaf_double_cls()
const std::string& tools::rroot::leaf_double_cls |
( |
| ) |
|
|
inline |
Definition at line 43 of file leaf.
44 static const std::string s_v(
"tools::rroot::leaf<double>");
◆ leaf_element_cid()
cid tools::rroot::leaf_element_cid |
( |
| ) |
|
|
inline |
Definition at line 32 of file cids.
◆ leaf_float_cls()
const std::string& tools::rroot::leaf_float_cls |
( |
| ) |
|
|
inline |
Definition at line 39 of file leaf.
40 static const std::string s_v(
"tools::rroot::leaf<float>");
◆ leaf_int_cls()
const std::string& tools::rroot::leaf_int_cls |
( |
| ) |
|
|
inline |
Definition at line 47 of file leaf.
48 static const std::string s_v(
"tools::rroot::leaf<int>");
◆ leaf_object_cid()
cid tools::rroot::leaf_object_cid |
( |
| ) |
|
|
inline |
Definition at line 41 of file cids.
◆ leaf_store_class() [1/6]
const std::string& tools::rroot::leaf_store_class |
( |
bool |
| ) |
|
|
inline |
Definition at line 34 of file leaf.
35 static const std::string s_v(
"TLeafO");
◆ leaf_store_class() [2/6]
const std::string& tools::rroot::leaf_store_class |
( |
char |
| ) |
|
|
inline |
Definition at line 14 of file leaf.
15 static const std::string s_v(
"TLeafB");
◆ leaf_store_class() [3/6]
const std::string& tools::rroot::leaf_store_class |
( |
double |
| ) |
|
|
inline |
Definition at line 30 of file leaf.
31 static const std::string s_v(
"TLeafD");
◆ leaf_store_class() [4/6]
const std::string& tools::rroot::leaf_store_class |
( |
float |
| ) |
|
|
inline |
Definition at line 26 of file leaf.
27 static const std::string s_v(
"TLeafF");
◆ leaf_store_class() [5/6]
const std::string& tools::rroot::leaf_store_class |
( |
int |
| ) |
|
|
inline |
Definition at line 22 of file leaf.
23 static const std::string s_v(
"TLeafI");
◆ leaf_store_class() [6/6]
const std::string& tools::rroot::leaf_store_class |
( |
short |
| ) |
|
|
inline |
Definition at line 18 of file leaf.
19 static const std::string s_v(
"TLeafS");
◆ leaf_string_cid()
cid tools::rroot::leaf_string_cid |
( |
| ) |
|
|
inline |
Definition at line 31 of file cids.
◆ matrix_cid()
cid tools::rroot::matrix_cid |
( |
| ) |
|
|
inline |
Definition at line 29 of file cids.
◆ named_cid()
cid tools::rroot::named_cid |
( |
| ) |
|
|
inline |
Definition at line 39 of file cids.
◆ 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.
18 if(!a_buffer.read_version(v,s,c))
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;
◆ new_bin_number()
unsigned int tools::rroot::new_bin_number |
( |
const std::vector< axis_t > & |
aAxes | ) |
|
|
inline |
Definition at line 79 of file THistogram.
80 unsigned int number = 1;
81 for(
unsigned int iaxis=0;iaxis<aAxes.size();iaxis++)
82 number *= (aAxes[iaxis].bins()+2);
◆ 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.
135 return (::log10(::fabs(a_1-a_2))<a_prec?
true:
false);
◆ obj_array_cid()
cid tools::rroot::obj_array_cid |
( |
| ) |
|
|
inline |
Definition at line 19 of file cids.
◆ obj_list_cid()
cid tools::rroot::obj_list_cid |
( |
| ) |
|
|
inline |
Definition at line 17 of file cids.
◆ Object_stream()
Definition at line 12 of file object.
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;
◆ 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.
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;
691 a_obj = (T*)obj->cast(a_T_class);
693 a_buffer.out() <<
"tools::rroot::pointer_stream : "
694 <<
" inlib::cast to " << a_T_class <<
" failed."
695 <<
". Object is a " << obj->s_cls() <<
"."
697 if(a_created)
delete obj;
◆ 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.
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;
661 a_obj = (T*)obj->cast(a_T_class);
663 a_buffer.out() <<
"tools::rroot::pointer_stream : "
664 <<
" inlib::cast to " << a_T_class <<
" failed."
665 <<
". Object is a " << obj->s_cls() <<
"."
667 if(a_created)
delete obj;
◆ 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.
708 return pointer_stream(a_buffer,a_fac,a_args,T::id_class(),a_obj,a_created);
◆ 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.
475 {std::vector<key*>::const_iterator it;
476 for(it=a_keys.begin();it!=a_keys.end();++it) {
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()
487 if(!
read_key(a_out,a_file,k,a_dump))
return;
491 {std::vector<key*>::const_iterator it;
492 for(it=a_keys.begin();it!=a_keys.end();++it) {
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;
502 if(!a_recursive)
continue;
505 char* buf = k.get_object_buffer(a_file,sz);
508 <<
" can't get directory data buffer."
511 buffer b(a_out,a_file.byte_swap(),sz,buf,k.key_length(),
false);
512 TDirectory dir(a_file);
515 <<
" can't stream TDirectory."
518 const std::vector<key*>& keys = dir.keys();
519 read(a_out,a_file,keys,a_recursive,a_ls,a_dump,a_spaces+1);
◆ read_annotations()
Definition at line 594 of file THistogram.
595 a_annotations.clear();
597 if(!a_buffer.read(number))
return false;
598 for(
int index=0;index<number;index++) {
600 if(!a_buffer.read(key))
return false;
602 if(!a_buffer.read(value))
return false;
604 if(!a_buffer.read(sticky))
return false;
606 a_annotations[key] = value;
◆ 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.
76 char* buf = a_key.get_object_buffer(a_file,sz);
78 a_out <<
"tools::rroot::read_key : can't get data buffer of " << a_key.object_name() <<
"." << std::endl;
86 buffer b(a_out,a_file.byte_swap(),sz,buf,a_key.key_length(),
false);
89 std::string name,title;
91 a_out <<
"tools::rroot::read_key : TNamed streaming failed" << std::endl;
94 a_out <<
"Named : name = " << sout(name) <<
", title = " << sout(title) << std::endl;
98 }
else if(a_key.object_class()==
TH1F_cls()) {
101 a_out <<
"tools::rroot::read_key : TH1F streaming failed" << std::endl;
103 if(a_dump) h->hprint(a_out);
107 }
else if(a_key.object_class()==
TH1D_cls()) {
110 a_out <<
"tools::rroot::read_key :"
111 <<
" TH1D streaming failed"
114 if(a_dump) h->hprint(a_out);
118 }
else if(a_key.object_class()==
TH2F_cls()) {
121 a_out <<
"tools::rroot::read_key :"
122 <<
" TH2F streaming failed"
125 if(a_dump) h->hprint(a_out);
129 }
else if(a_key.object_class()==
TH2D_cls()) {
132 a_out <<
"tools::rroot::read_key :"
133 <<
" TH2D streaming failed"
136 if(a_dump) h->hprint(a_out);
140 }
else if(a_key.object_class()==
TH3D_cls()) {
143 a_out <<
"tools::rroot::read_key :"
144 <<
" TH3D streaming failed"
147 if(a_dump) h->hprint(a_out);
154 a_out <<
"tools::rroot::read_key :"
155 <<
" TProfile streaming failed"
158 if(a_dump) p->hprint(a_out);
165 a_out <<
"tools::rroot::read_key :"
166 <<
" TProfile2D streaming failed"
169 if(a_dump) p->hprint(a_out);
173 }
else if(a_key.object_class()==
TTree_cls()) {
174 b.set_map_objs(
true);
176 tree tree(a_file,_fac);
177 if(!tree.stream(b)) {
178 a_out <<
"tools::rroot::read_key :"
179 <<
" TTree streaming failed"
184 tree.dump(a_out,
"",
" ");
186 uint64 entries = tree.entries();
201 if(!tree.show(a_out,i)) {
202 a_out <<
" show failed for entry " << i
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
216 #ifndef TOOLS_RROOT_NOT_OSC
217 }
else if(a_key.object_class()==
osc::s_h1d()) {
219 histo::h1d h(
"",10,0,1);
221 a_out <<
"tools::rroot::read_key :"
225 if(a_dump) h.hprint(a_out);
228 }
else if(a_key.object_class()==
osc::s_h2d()) {
230 histo::h2d h(
"",10,0,1,10,0,1);
232 a_out <<
"tools::rroot::read_key :"
236 if(a_dump) h.hprint(a_out);
239 }
else if(a_key.object_class()==
osc::s_h3d()) {
241 histo::h3d h(
"",10,0,1,10,0,1,10,0,1);
243 a_out <<
"tools::rroot::read_key :"
247 if(a_dump) h.hprint(a_out);
250 }
else if(a_key.object_class()==
osc::s_p1d()) {
252 histo::p1d h(
"",10,0,1);
254 a_out <<
"tools::rroot::read_key :"
258 if(a_dump) h.hprint(a_out);
261 }
else if(a_key.object_class()==
osc::s_p2d()) {
263 histo::p2d h(
"",10,0,1,10,0,1);
265 a_out <<
"tools::rroot::read_key :"
269 if(a_dump) h.hprint(a_out);
278 a_out <<
"tools::rroot::read_key : read_THistogram() failed." << std::endl;
281 if(a_dump) _h1d->hprint(a_out);
284 if(a_dump) _h2d->hprint(a_out);
287 if(a_dump) _p1d->hprint(a_out);
290 if(a_dump) _p2d->hprint(a_out);
293 a_out <<
"tools::rroot::read_key : can't convert THistogram dat to h1d,h2d,p1d or p2d." << std::endl;
302 a_out <<
"tools::rroot::read_key :"
303 <<
" dont't know how to read key with object class "
304 << sout(a_key.object_class())
◆ read_key_THistogram()
Definition at line 662 of file THistogram.
663 std::ostream& out = a_key.out();
665 if(a_warn) out <<
"tools::rroot::read_key_THisogram : key not a THistogram." << std::endl;
669 char* buf = a_key.get_object_buffer(a_file,sz);
671 out <<
"tools::rroot::read_key_THisogram : can't get data buffer of " << a_key.object_name() <<
"." << std::endl;
674 buffer b(out,a_file.byte_swap(),sz,buf,a_key.key_length(),
false);
◆ 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.
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;
164 return a_leaf.value(0,a_value);
◆ read_leaf_object()
Definition at line 167 of file tree_manip.
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;
◆ read_std_vec()
Definition at line 177 of file tree_manip.
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;
183 iro* obj = a_branch.object();
185 return id_cast<iro, stl_vector<TYPE> >(*obj);
◆ read_THistogram()
Definition at line 611 of file THistogram.
614 if(!a_buffer.read_version(v))
return false;
616 {std::string name,title;
620 if(!
read_v0(a_buffer,a_data))
return false;
622 if(!
read_v1(a_buffer,a_data))
return false;
624 if(!
read_v2(a_buffer,a_data))
return false;
626 if(!
read_v3(a_buffer,a_data))
return false;
628 if(!
read_v4(a_buffer,a_data))
return false;
630 if(!
read_v5(a_buffer,a_data))
return false;
632 if(!
read_v6(a_buffer,a_data))
return false;
634 if(!
read_v7(a_buffer,a_data))
return false;
637 if(!
read_v7(a_buffer,a_data))
return false;
645 a_data.update_fast_getters();
◆ read_v0()
Definition at line 128 of file THistogram.
132 if(!a_buffer.read(sdummy))
return false;
133 if(!a_buffer.read(a_data.m_title))
return false;
136 if(!a_buffer.read(dim))
return false;
137 a_data.m_dimension = dim;}
140 if(!a_buffer.read(nbin))
return false;
141 a_data.m_bin_number = nbin;}
143 if(!a_buffer.read(idummy))
return false;
144 if(!a_buffer.read(idummy))
return false;
145 if(!a_buffer.read(ddummy))
return false;
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);
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++) {
165 if(!a_buffer.read(dummy))
return false;}
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);
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();
◆ read_v1()
Definition at line 186 of file THistogram.
189 if(!a_buffer.read(a_data.m_title))
return false;
192 if(!a_buffer.read(dim))
return false;
193 a_data.m_dimension = dim;}
196 if(!a_buffer.read(nbin))
return false;
197 a_data.m_bin_number = nbin;}
199 if(!a_buffer.read(idummy))
return false;
200 if(!a_buffer.read(idummy))
return false;
201 if(!a_buffer.read(ddummy))
return false;
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);
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++) {
221 if(!a_buffer.read(dummy))
return false;}
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);
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();
◆ read_v2()
Definition at line 242 of file THistogram.
246 if(!a_buffer.read(a_data.m_title))
return false;
247 if(!a_buffer.read(sdummy))
return false;
250 if(!a_buffer.read(dim))
return false;
251 a_data.m_dimension = dim;}
254 if(!a_buffer.read(nbin))
return false;
255 a_data.m_bin_number = nbin;}
257 if(!a_buffer.read(idummy))
return false;
258 if(!a_buffer.read(idummy))
return false;
259 if(!a_buffer.read(ddummy))
return false;
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);
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++) {
279 if(!a_buffer.read(dummy))
return false;}
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);
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();
◆ read_v3()
Definition at line 300 of file THistogram.
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;}
311 a_data.m_title = str;
315 if(!a_buffer.read(dim))
return false;
316 a_data.m_dimension = dim;}
319 if(!a_buffer.read(nbin))
return false;
320 a_data.m_bin_number = nbin;}
322 if(!a_buffer.read(idummy))
return false;
323 if(!a_buffer.read(idummy))
return false;
324 if(!a_buffer.read(ddummy))
return false;
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);
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++) {
344 if(!a_buffer.read(dummy))
return false;}
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);
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();
◆ read_v4()
Definition at line 365 of file THistogram.
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;}
376 a_data.m_title = str;
380 if(!a_buffer.read(dim))
return false;
381 a_data.m_dimension = dim;}
384 if(!a_buffer.read(nbin))
return false;
385 a_data.m_bin_number = nbin;}
387 if(!a_buffer.read(idummy))
return false;
388 if(!a_buffer.read(idummy))
return false;
389 if(!a_buffer.read(ddummy))
return false;
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);
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++) {
407 if(!a_buffer.read(dummy))
return false;}
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);
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();
◆ read_v5()
Definition at line 428 of file THistogram.
431 if(!a_buffer.read(a_data.m_title))
return false;
434 if(!a_buffer.read(dim))
return false;
435 a_data.m_dimension = dim;}
438 if(!a_buffer.read(nbin))
return false;
439 a_data.m_bin_number = nbin;}
441 if(!a_buffer.read(idummy))
return false;
442 if(!a_buffer.read(idummy))
return false;
443 if(!a_buffer.read(ddummy))
return false;
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);
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++) {
461 if(!a_buffer.read(dummy))
return false;}
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);
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();
◆ read_v6()
Definition at line 482 of file THistogram.
485 if(!a_buffer.read(a_data.m_title))
return false;
488 if(!a_buffer.read(dim))
return false;
489 a_data.m_dimension = dim;}
492 if(!a_buffer.read(nbin))
return false;
493 a_data.m_bin_number = nbin;}
495 if(!a_buffer.read(idummy))
return false;
496 if(!a_buffer.read(idummy))
return false;
497 if(!a_buffer.read(ddummy))
return false;
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);
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++) {
515 if(!a_buffer.read(dummy))
return false;}
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;
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);
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);
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);
◆ read_v7()
Definition at line 547 of file THistogram.
548 if(!a_buffer.read(a_data.m_title))
return false;
551 if(!a_buffer.read(dim))
return false;
552 a_data.m_dimension = dim;}
555 if(!a_buffer.read(nbin))
return false;
556 a_data.m_bin_number = nbin;}
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);
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;
578 if(!a_buffer.read(dummy))
return false;}
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;
◆ stl_vector_cid()
cid tools::rroot::stl_vector_cid |
( |
| ) |
|
|
inline |
Definition at line 47 of file cids.
◆ stl_vector_obj_cid()
cid tools::rroot::stl_vector_obj_cid |
( |
| ) |
|
|
inline |
Definition at line 53 of file cids.
◆ stl_vector_string_cid()
cid tools::rroot::stl_vector_string_cid |
( |
| ) |
|
|
inline |
Definition at line 37 of file cids.
◆ stl_vector_vector_cid()
cid tools::rroot::stl_vector_vector_cid |
( |
| ) |
|
|
inline |
Definition at line 48 of file cids.
◆ streamer_element_cid()
cid tools::rroot::streamer_element_cid |
( |
| ) |
|
|
inline |
Definition at line 35 of file cids.
◆ streamer_info_cid()
cid tools::rroot::streamer_info_cid |
( |
| ) |
|
|
inline |
Definition at line 34 of file cids.
◆ TDirectory_cls()
const std::string& tools::rroot::TDirectory_cls |
( |
| ) |
|
|
inline |
Definition at line 47 of file clss.
48 static const std::string s_v(
"TDirectory");
◆ TGeoManager_cls()
const std::string& tools::rroot::TGeoManager_cls |
( |
| ) |
|
|
inline |
Definition at line 52 of file clss.
53 static const std::string s_v(
"TGeoManager");
◆ TH1D_cls()
const std::string& tools::rroot::TH1D_cls |
( |
| ) |
|
|
inline |
Definition at line 17 of file clss.
18 static const std::string s_v(
"TH1D");
◆ TH1D_stream()
Definition at line 409 of file streamers.
412 if(!a_buffer.read_version(v,s,c))
return 0;
420 data.m_axes.resize(1);
427 if(!
TH_read_1D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w))
return 0;
434 std::vector<double> bins;
435 if(!Array_stream<double>(a_buffer,bins))
return 0;
436 if(!a_buffer.check_byte_count(s,c,
"TH1D"))
return 0;
438 unsigned int binn = data.m_bin_number;
439 data.m_bin_Sw = bins;
441 data.m_bin_entries.resize(binn,0);
442 {std::vector<double> empty;
444 data.m_bin_Sxw.resize(binn,empty);
445 data.m_bin_Sx2w.resize(binn,empty);}
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;
456 histo::h1d* h =
new histo::h1d(
"",10,0,1);
457 h->copy_from_data(data);
◆ TH1F_cls()
const std::string& tools::rroot::TH1F_cls |
( |
| ) |
|
|
inline |
Definition at line 12 of file clss.
13 static const std::string s_v(
"TH1F");
◆ TH1F_stream()
Definition at line 353 of file streamers.
356 if(!a_buffer.read_version(v,s,c))
return 0;
366 data.m_axes.resize(1);
373 if(!
TH_read_1D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w))
return 0;
380 std::vector<float> bins;
381 if(!Array_stream<float>(a_buffer,bins))
return 0;
382 if(!a_buffer.check_byte_count(s,c,
"TH1F"))
return 0;
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]);
390 data.m_bin_entries.resize(binn,0);
391 {std::vector<double> empty;
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;
404 histo::h1d* h =
new histo::h1d(
"",10,0,1);
405 h->copy_from_data(data);
◆ TH2D_cls()
const std::string& tools::rroot::TH2D_cls |
( |
| ) |
|
|
inline |
Definition at line 27 of file clss.
28 static const std::string s_v(
"TH2D");
◆ TH2D_stream()
Definition at line 523 of file streamers.
526 if(!a_buffer.read_version(v,s,c))
return 0;
536 data.m_axes.resize(2);
537 data.m_in_range_plane_Sxyw.resize(1,0);
546 if(!
TH_read_2D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w,fSyw,fSy2w))
return 0;
553 std::vector<double> bins;
554 if(!Array_stream<double>(a_buffer,bins))
return 0;
555 if(!a_buffer.check_byte_count(s,c,
"TH2D"))
return 0;
557 unsigned int binn = data.m_bin_number;
558 data.m_bin_Sw = bins;
560 data.m_bin_entries.resize(binn,0);
561 {std::vector<double> empty;
563 data.m_bin_Sxw.resize(binn,empty);
564 data.m_bin_Sx2w.resize(binn,empty);}
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;
577 histo::h2d* h =
new histo::h2d(
"",10,0,1,10,0,1);
578 h->copy_from_data(data);
◆ TH2F_cls()
const std::string& tools::rroot::TH2F_cls |
( |
| ) |
|
|
inline |
Definition at line 22 of file clss.
23 static const std::string s_v(
"TH2F");
◆ TH2F_stream()
Definition at line 461 of file streamers.
464 if(!a_buffer.read_version(v,s,c))
return 0;
474 data.m_axes.resize(2);
475 data.m_in_range_plane_Sxyw.resize(1,0);
484 if(!
TH_read_2D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w,fSyw,fSy2w))
return 0;
491 std::vector<float> bins;
492 if(!Array_stream<float>(a_buffer,bins))
return 0;
493 if(!a_buffer.check_byte_count(s,c,
"TH2F"))
return 0;
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]);
501 data.m_bin_entries.resize(binn,0);
502 {std::vector<double> empty;
504 data.m_bin_Sxw.resize(binn,empty);
505 data.m_bin_Sx2w.resize(binn,empty);}
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;
518 histo::h2d* h =
new histo::h2d(
"",10,0,1,10,0,1);
519 h->copy_from_data(data);
◆ TH3D_cls()
const std::string& tools::rroot::TH3D_cls |
( |
| ) |
|
|
inline |
Definition at line 32 of file clss.
33 static const std::string s_v(
"TH3D");
◆ TH3D_stream()
Definition at line 582 of file streamers.
585 if(!a_buffer.read_version(v,s,c))
return 0;
593 data.m_axes.resize(3);
594 data.m_in_range_plane_Sxyw.resize(3,0);
605 if(!
TH_read_3D(a_buffer,data,fEntries,fSw,fSw2,fSxw,fSx2w,fSyw,fSy2w,fSzw,fSz2w))
return 0;
612 std::vector<double> bins;
613 if(!Array_stream<double>(a_buffer,bins))
return 0;
614 if(!a_buffer.check_byte_count(s,c,
"TH3D"))
return 0;
616 unsigned int binn = data.m_bin_number;
617 data.m_bin_Sw = bins;
619 data.m_bin_entries.resize(binn,0);
620 {std::vector<double> empty;
622 data.m_bin_Sxw.resize(binn,empty);
623 data.m_bin_Sx2w.resize(binn,empty);}
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;
638 histo::h3d* h =
new histo::h3d(
"",10,0,1,10,0,1,10,0,1);
639 h->copy_from_data(data);
◆ 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.
148 if(!a_buffer.read_version(vers,s,c))
return false;
158 a_data.m_title = title;
160 {
short color,style,width;
167 if(!a_buffer.read(Ncells))
return false;
170 if(!
Axis_stream(a_buffer,a_data.m_axes[0]))
return false;
171 a_data.m_axes[0].m_offset = 1;
173 if(a_data.m_dimension==3) {
174 if(!
Axis_stream(a_buffer,a_data.m_axes[1]))
return false;
175 a_data.m_axes[1].m_offset = a_data.m_axes[0].m_offset * (a_data.m_axes[0].bins()+2);
177 if(!
Axis_stream(a_buffer,a_data.m_axes[2]))
return false;
178 a_data.m_axes[2].m_offset = a_data.m_axes[1].m_offset * (a_data.m_axes[1].bins()+2);
180 }
else if(a_data.m_dimension==2) {
181 if(!
Axis_stream(a_buffer,a_data.m_axes[1]))
return false;
182 a_data.m_axes[1].m_offset = a_data.m_axes[0].m_offset * (a_data.m_axes[0].bins()+2);
184 histo::axis<double,unsigned int> dummy;
187 histo::axis<double,unsigned int> dummy;
193 if(!a_buffer.read(barOffset))
return false;
196 if(!a_buffer.read(barWidth))
return false;
198 if(!a_buffer.read(a_entries))
return false;
200 if(!a_buffer.read(a_Sw))
return false;
202 if(!a_buffer.read(a_Sw2))
return false;
204 if(!a_buffer.read(a_Sxw))
return false;
206 if(!a_buffer.read(a_Sx2w))
return false;
209 if(!a_buffer.read(max))
return false;
212 if(!a_buffer.read(min))
return false;
215 if(!a_buffer.read(NormFactor))
return false;
217 {std::vector<double> v;
218 if(!Array_stream<double>(a_buffer,v))
return false;}
220 std::vector<double> sumw2;
221 if(!Array_stream<double>(a_buffer,sumw2))
return false;
224 if(!a_buffer.read(opt))
return false;
231 {dummy_fac fac(a_buffer.out());
233 if(!dummy.stream(a_buffer)) {
234 a_buffer.out() <<
"tools::rroot::TH_read_1D :"
235 <<
" obj_list stream failed."
242 if(!a_buffer.read(BufferSize))
return false;
245 if(!dummy_array_stream<double>(a_buffer,BufferSize))
return false;
251 if(!a_buffer.read(dummy))
return false;
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);
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];
275 a_data.m_bin_Sw2.assign(binn,0);
278 if(!a_buffer.check_byte_count(s,c,
"TH"))
return false;
◆ 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.
289 if(!a_buffer.read_version(v,s,c))
return false;
293 if(!
TH_read_1D(a_buffer,a_data,a_entries,a_Sw,a_Sw2,a_Sxw,a_Sx2w))
return false;
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;
306 if(!a_buffer.read(Tsumwxy))
return false;
307 a_data.m_in_range_plane_Sxyw[0] = Tsumwxy;
309 if(!a_buffer.check_byte_count(s,c,
"TH2"))
return false;
◆ 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.
321 if(!a_buffer.read_version(v,s,c))
return false;
323 if(!
TH_read_1D(a_buffer,a_data,a_entries,a_Sw,a_Sw2,a_Sxw,a_Sx2w))
return false;
332 if(!a_buffer.read(a_Syw))
return false;
333 if(!a_buffer.read(a_Sy2w))
return false;
335 if(!a_buffer.read(Tsumwxy))
return false;
337 if(!a_buffer.read(a_Szw))
return false;
338 if(!a_buffer.read(a_Sz2w))
return false;
340 if(!a_buffer.read(Tsumwxz))
return false;
342 if(!a_buffer.read(Tsumwyz))
return false;
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;
348 if(!a_buffer.check_byte_count(s,c,
"TH3"))
return false;
◆ THistogram_cls()
const std::string& tools::rroot::THistogram_cls |
( |
| ) |
|
|
inline |
Definition at line 650 of file THistogram.
651 static const std::string s_v(
"THistogram");
◆ THistogram_to_h1d()
Definition at line 688 of file THistogram.
689 unsigned int dim = a_data.m_dimension;
690 bool is_profile = a_data.m_is_profile;
692 if(is_profile)
return 0;
693 histo::h1d* histo =
new histo::h1d(
"",10,0,1);
694 histo->copy_from_data(a_data);
◆ THistogram_to_h2d()
Definition at line 698 of file THistogram.
699 unsigned int dim = a_data.m_dimension;
700 bool is_profile = a_data.m_is_profile;
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);
◆ THistogram_to_p1d()
Definition at line 708 of file THistogram.
709 unsigned int dim = a_data.m_dimension;
710 bool is_profile = a_data.m_is_profile;
712 if(!is_profile)
return 0;
713 histo::p1d* histo =
new histo::p1d(
"",10,0,1);
714 histo->copy_from_data(a_data);
◆ THistogram_to_p2d()
Definition at line 718 of file THistogram.
719 unsigned int dim = a_data.m_dimension;
720 bool is_profile = a_data.m_is_profile;
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);
◆ TList_cls()
const std::string& tools::rroot::TList_cls |
( |
| ) |
|
|
inline |
Definition at line 57 of file clss.
58 static const std::string s_v(
"TList");
◆ TNamed_cls()
const std::string& tools::rroot::TNamed_cls |
( |
| ) |
|
|
inline |
Definition at line 62 of file clss.
63 static const std::string s_v(
"TNamed");
◆ TProfile2D_cls()
const std::string& tools::rroot::TProfile2D_cls |
( |
| ) |
|
|
inline |
Definition at line 42 of file clss.
43 static const std::string s_v(
"TProfile2D");
◆ TProfile2D_stream()
Definition at line 712 of file streamers.
715 if(!a_buffer.read_version(v,s,c))
return 0;
732 std::vector<double> bins;
733 if(!Array_stream<double>(a_buffer,bins))
return 0;
735 if(!a_buffer.read(errorMode))
return 0;
737 if(!a_buffer.read(zmin))
return 0;
739 if(!a_buffer.read(zmax))
return 0;
742 if(!a_buffer.read(sumwz))
return 0;
744 if(!a_buffer.read(sumwz2))
return 0;
747 std::vector<double> bins_sumw2;
748 if(!Array_stream<double>(a_buffer,bins_sumw2))
return 0;
750 if(!a_buffer.check_byte_count(s,c,
"TProfile2D"))
return 0;
752 data.m_is_profile =
true;
757 unsigned int binn = data.m_bin_number;
758 data.m_bin_Svw.resize(binn);
759 data.m_bin_Sv2w.resize(binn);
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];
766 data.m_bin_Sw[index] = (double)sw;
769 data.m_bin_Svw[index] = svw;
770 data.m_bin_Sv2w[index] = sv2w;
773 histo::p2d* p =
new histo::p2d(
"",10,0,1,10,0,1);
774 p->copy_from_data(data);
◆ TProfile_cls()
const std::string& tools::rroot::TProfile_cls |
( |
| ) |
|
|
inline |
Definition at line 37 of file clss.
38 static const std::string s_v(
"TProfile");
◆ TProfile_stream()
Definition at line 643 of file streamers.
646 if(!a_buffer.read_version(v,s,c))
return 0;
663 std::vector<double> bins;
664 if(!Array_stream<double>(a_buffer,bins))
return 0;
666 if(!a_buffer.read(errorMode))
return 0;
668 if(!a_buffer.read(ymin))
return 0;
670 if(!a_buffer.read(ymax))
return 0;
674 if(!a_buffer.read(sumwy))
return 0;
676 if(!a_buffer.read(sumwy2))
return 0;
679 std::vector<double> bins_sumw2;
680 if(!Array_stream<double>(a_buffer,bins_sumw2))
return 0;
683 if(!a_buffer.check_byte_count(s,c,
"TProfile"))
return 0;
685 data.m_is_profile =
true;
690 unsigned int binn = data.m_bin_number;
691 data.m_bin_Svw.resize(binn);
692 data.m_bin_Sv2w.resize(binn);
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];
699 data.m_bin_Sw[index] = (double)sw;
702 data.m_bin_Svw[index] = svw;
703 data.m_bin_Sv2w[index] = sv2w;
706 histo::p1d* p =
new histo::p1d(
"",10,0,1);
707 p->copy_from_data(data);
◆ TTree_cls()
const std::string& tools::rroot::TTree_cls |
( |
| ) |
|
|
inline |
Definition at line 15 of file tree.
16 static const std::string s_v(
"TTree");
◆ vector3_cid()
cid tools::rroot::vector3_cid |
( |
| ) |
|
|
inline |
Definition at line 51 of file cids.