NTupleController.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _NTupleController_H_
15 #define _NTupleController_H_
16 
17 #include "pattern/libhippo.h"
18 
19 #include <string>
20 #include <vector>
21 
22 namespace hippodraw {
23 
24 class CircularBuffer;
25 class DataSource;
26 class NTuple;
27 class Observable;
28 class TupleCut;
29 
43 {
44 
45 private:
46 
49 
50 
53 
56 
61  std::string::size_type findWhite ( const std::string & line,
62  unsigned int left = 0,
63  bool tabs_only = false );
64 
69  int readAsciiNTuple ( NTuple * ntuple, const std::string & filename );
70 
74  void splitAndFill ( const std::string & line,
75  std::vector < std::string > & values );
76 
77 public:
78 
80  static NTupleController * instance ();
81 
89  DataSource * createNTuple ( const std::string & filename );
90 
92  void fillFromFile ( const std::string & file, NTuple * source );
93 
103  NTuple * createNTuple ( const std::vector < std::string > & labels );
104 
110  CircularBuffer *
111  createCircularBuffer ( const std::vector < std::string > & labels );
112 
120  NTuple * createNTuple ( unsigned int columns );
121 
129  CircularBuffer * createCircularBuffer ( unsigned int columns );
130 
134  NTuple * createNTuple ( );
135 
143  CircularBuffer * createCircularBuffer ( );
144 
149  DataSource * findDataSource ( const std::string & name ) const;
150 
155  void changeName ( DataSource * source,
156  const std::string & newname );
157 
164  int writeNTupleToFile ( DataSource * source,
165  const std::string & filename );
166 
173  int writeNTupleToFile ( const std::string & name,
174  const std::string & filename );
175 
184  void saveNTuples ( const std::string & prefix,
185  const std::string & suffix );
186 
192  std::string registerNTuple ( DataSource * nt );
193 
200  void registerNTuple ( const std::string &, DataSource * ntuple );
201 
204  NTuple * createNTuple ( const std::vector < std::string > & column_list,
205  const std::vector < const TupleCut * > & cut_list,
206  DataSource * ds );
207 
210  int createNTupleToFile( const std::vector < std::string > & column_list,
211  const std::vector < const TupleCut * > & cut_list,
212  DataSource * ds,
213  const std::string & filename,
214  const std::string & dsname);
215 
216 };
217 
218 } // namespace hippodraw
219 
220 #endif // _NTupleController_H_

Generated for HippoDraw Class Library by doxygen