Logo ROOT   6.12/07
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 #include "Rtypes.h"
28 
29 namespace ROOT {
30 namespace TreeUtils {
31 
32 //1. Function to fill tuples (TNtuple/TNtupleD) from
33 //a simple ASCII data file. With auto and decltype - we can
34 //get rid of DataType parameter :) (or with a simple typedef inside ntuple class).
35 //An input file consists of non-empty lines (separated by newline-characters), possibly empty lines,
36 //and comments (treated as empty lines). Each non-empty line should contain N numbers - entry for a tuple.
37 //Non-strict mode lets you to have newline-characters inside a tuple's row (as it worked
38 //in ROOT prior to v5.3xxx).
39 
40 template<class DataType, class Tuple>
41 Long64_t FillNtupleFromStream(std::istream &inputStream, Tuple &tuple, char delimiter, bool strictMode);
42 
43 }
44 }
45 
46 #endif
long long Long64_t
Definition: RtypesCore.h:69
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
Long64_t FillNtupleFromStream(std::istream &inputStream, Tuple &tuple, char delimiter, bool strictMode)
Definition: TreeUtils.cxx:80