g4tools  5.4.0
rall
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_rroot_rall
5 #define tools_rroot_rall
6 
7 #include "streamers"
8 #include "fac"
9 #include "tree"
10 #include "../words" //for annotations.
11 
12 #define TOOLS_RROOT_NOT_OSC
13 
14 #ifndef TOOLS_RROOT_NOT_OSC
15 #include "osc"
16 #endif
17 
18 #include "THistogram"
19 
20 namespace tools {
21 namespace rroot {
22 
23 inline TDirectory* find_dir(directory& a_dir,const std::string& a_name) {
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 }
58 
59 inline directory* find_path_dir(directory& a_from,const std::string& a_path) {
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 }
73 
74 inline bool read_key(std::ostream& a_out,ifile& a_file,key& a_key,bool a_dump){
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()) {
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 }
309 
310 //typedef std::map<std::string,std::string> annotations_t;
311 inline bool key_to_annotations(ifile& a_file,key& a_key,std::map<std::string,std::string>& a_annotations,bool a_warn = true) {
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 }
343 
344 inline histo::h1d* key_to_h1d(ifile& a_file,key& a_key,bool a_warn = true) {
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 }
363 
364 inline histo::h2d* key_to_h2d(ifile& a_file,key& a_key,bool a_warn = true){
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 }
383 
384 inline histo::h3d* key_to_h3d(ifile& a_file,key& a_key){
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 }
403 
404 inline histo::p1d* key_to_p1d(ifile& a_file,key& a_key){
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 }
423 
424 inline histo::p2d* key_to_p2d(ifile& a_file,key& a_key){
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 }
443 
444 inline tree* key_to_tree(ifile& a_file,ifac& a_fac,key& a_key,bool a_warn = true) {
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 }
466 
467 inline void read(std::ostream& a_out,
468  ifile& a_file,
469  const std::vector<key*>& a_keys,
470  bool a_recursive,
471  bool a_ls,
472  bool a_dump,
473  unsigned int a_spaces) {
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 }
525 
526 }}
527 
528 #endif
tools::rroot::tree::entries
uint64 entries() const
Definition: tree:128
tools::histo::b3::hprint
void hprint(std::ostream &a_out)
Definition: b3:302
tools::histo::p1d
Definition: p1d:12
tools::histo::b1::hprint
void hprint(std::ostream &a_out)
Definition: b1:107
tools::uint64
unsigned long long uint64
Definition: typedefs:72
tools::osc::s_p2d
const std::string & s_p2d()
Definition: osc_streamers:61
tools::value
Definition: value:18
tools::rroot::tree::dump
void dump(std::ostream &a_out, const std::string &a_spaces="", const std::string &a_indent=" ")
Definition: tree:84
tools::rroot::directory::keys
const std::vector< key * > & keys() const
Definition: directory:54
THistogram
tools::histo::h1d
Definition: h1d:14
tools::rroot::fac
Definition: fac:28
tools::rroot::key::object_name
const std::string & object_name() const
Definition: key:182
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::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::ifile::out
virtual std::ostream & out() const =0
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::rroot::TDirectory::stream
bool stream(buffer &a_buffer)
Definition: streamers:788
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::histo::p2d
Definition: p2d:12
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::TH3D_stream
histo::h3d * TH3D_stream(buffer &a_buffer)
Definition: streamers:582
tools::rroot::Named_stream
bool Named_stream(buffer &a_buffer, std::string &a_name, std::string &a_title)
Definition: named:15
tools::rroot::tree::stream
virtual bool stream(buffer &a_buffer)
Definition: tree:130
tools::rroot::find_path_dir
directory * find_path_dir(directory &a_from, const std::string &a_path)
Definition: rall:59
tools::rroot::TProfile_cls
const std::string & TProfile_cls()
Definition: clss:37
tools::histo::h2d
Definition: h2d:12
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
tree
tools::rroot::TDirectory_cls
const std::string & TDirectory_cls()
Definition: clss:47
tools::rroot::directory::find_key
key * find_key(const std::string &a_name)
Definition: directory:57
tools::rroot::tree
Definition: tree:20
tools::rroot::key::get_object_buffer
char * get_object_buffer(ifile &a_file, uint32 &a_size)
Definition: key:267
tools::histo::profile_data
Definition: profile_data:13
tools::rroot::directory
Definition: directory:17
tools::rroot::TH2D_cls
const std::string & TH2D_cls()
Definition: clss:27
tools::rroot::key_to_h2d
histo::h2d * key_to_h2d(ifile &a_file, key &a_key, bool a_warn=true)
Definition: rall:364
tools::rroot::key_to_h3d
histo::h3d * key_to_h3d(ifile &a_file, key &a_key)
Definition: rall:384
tools::sout
Definition: sout:17
tools::rroot::TDirectory
Definition: streamers:778
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::rroot::key_to_annotations
bool key_to_annotations(ifile &a_file, key &a_key, std::map< std::string, std::string > &a_annotations, bool a_warn=true)
Definition: rall:311
tools::osc::s_h1d
const std::string & s_h1d()
Definition: osc_streamers:41
tools::rroot::key_to_h1d
histo::h1d * key_to_h1d(ifile &a_file, key &a_key, bool a_warn=true)
Definition: rall:344
tools::rroot::TH2F_cls
const std::string & TH2F_cls()
Definition: clss:22
tools::rroot::key_to_tree
tree * key_to_tree(ifile &a_file, ifac &a_fac, key &a_key, bool a_warn=true)
Definition: rall:444
tools::rroot::key_to_p2d
histo::p2d * key_to_p2d(ifile &a_file, key &a_key)
Definition: rall:424
tools::rroot::buffer::set_map_objs
void set_map_objs(bool a_value)
Definition: buffer:123
tools::rroot::TProfile2D_cls
const std::string & TProfile2D_cls()
Definition: clss:42
tools::rroot::ifac
Definition: ifac:19
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::rroot::ifile
Definition: ifile:16
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
fac
tools::rroot::buffer
Definition: buffer:43
tools::rroot::key::key_length
uint32 key_length() const
Definition: key:204
tools::rroot::TProfile2D_stream
histo::p2d * TProfile2D_stream(buffer &a_buffer)
Definition: streamers:712
tools::rroot::key_to_p1d
histo::p1d * key_to_p1d(ifile &a_file, key &a_key)
Definition: rall:404
tools::rroot::ifile::byte_swap
virtual bool byte_swap() const =0
tools::histo::h3d
Definition: h3d:12
tools::rroot::key
Definition: key:37
tools::rroot::TH1D_stream
histo::h1d * TH1D_stream(buffer &a_buffer)
Definition: streamers:409
tools::histo::b2::hprint
void hprint(std::ostream &a_out)
Definition: b2:212
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::key::out
std::ostream & out() const
Definition: key:176
tools::rroot::read_THistogram
bool read_THistogram(buffer &a_buffer, pd_data_t &a_data, annotations_t &a_annotations)
Definition: THistogram:611
tools::rroot::key::object_class
const std::string & object_class() const
Definition: key:184
tools::rroot::TH1F_cls
const std::string & TH1F_cls()
Definition: clss:12
tools::uint32
unsigned int uint32
Definition: typedefs:71
tools::rroot::directory::file
ifile & file()
Definition: directory:52
streamers
tools::rroot::tree::show
bool show(std::ostream &a_out, uint64 a_entry)
Definition: tree:120