Logo ROOT   6.07/09
Reference Guide
TreeUtils.h
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Timur Pocheptsov 30/01/2014
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2014, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TreeUtils //
15 // //
16 // Different standalone functions to work with trees and tuples, //
17 // not required to be a member of any class. //
18 // //
19 //////////////////////////////////////////////////////////////////////////
20 
21 
22 #ifndef ROOT_TreeUtils
23 #define ROOT_TreeUtils
24 
25 #include <iosfwd>
26 
27 #ifndef ROOT_Rtypes
28 #include "Rtypes.h"
29 #endif
30 
31 namespace ROOT {
32 namespace TreeUtils {
33 
34 //1. Function to fill tuples (TNtuple/TNtupleD) from
35 //a simple ASCII data file. With auto and decltype - we can
36 //get rid of DataType parameter :) (or with a simple typedef inside ntuple class).
37 //An input file consists of non-empty lines (separated by newline-characters), possibly empty lines,
38 //and comments (treated as empty lines). Each non-empty line should contain N numbers - entry for a tuple.
39 //Non-strict mode lets you to have newline-characters inside a tuple's row (as it worked
40 //in ROOT prior to v5.3xxx).
41 
42 template<class DataType, class Tuple>
43 Long64_t FillNtupleFromStream(std::istream &inputStream, Tuple &tuple, char delimiter, bool strictMode);
44 
45 }
46 }
47 
48 #endif
long long Long64_t
Definition: RtypesCore.h:69
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition: StringConv.hxx:21
Long64_t FillNtupleFromStream(std::istream &inputStream, Tuple &tuple, char delimiter, bool strictMode)
Definition: TreeUtils.cxx:80