PyDataRep.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef PyDataRep_H
15 #define PyDataRep_H
16 
17 #include "graphics/Color.h"
18 #include "graphics/LineStyle.h"
19 #include "graphics/SymbolType.h"
20 
21 namespace hippodraw {
22 
23 class DataRep;
24 class RepBase;
25 class DataSource;
26 class PyDataSource;
27 class NTuple;
28 class QtCut;
29 
37 class PyDataRep
38 {
39 
40 private:
41 
44 
48  std::vector<double> m_columnData;
49 
51  static std::map< std::string, hippodraw::Symbol::Type > s_symbols;
52 
54  static std::map< std::string, hippodraw::Line::Style > s_lineStyles;
55 
57  static bool s_have_static_members;
58 
60  static void makeColorMap();
61 
63  static void makeSymbolMap();
64 
66  static void makeLineStyleMap();
67 
70  void init();
71 
72 public:
73 
76 
78  PyDataRep ( const std::string & type,
79  const DataSource * ntuple,
80  const std::vector< std::string > & bindings );
81 
85  PyDataRep ( const std::string & type,
86  const PyDataSource * ntuple,
87  const std::vector< std::string > & bindings );
88 
90  PyDataRep ();
91 
93  PyDataRep ( PyDataRep * pyRep );
94 
97  static const std::vector < std::string > & names ();
98 
101 
104  void setSize ( double value );
105 
107  void setPointRep ( RepBase * pointRep );
108 
110  void setAxisBinding ( const std::string &axis,
111  const std::string &label );
112 
114  void setAxisBindings ( const std::vector< std::string > & bindings );
115 
117  void setWeight ( const std::string &label );
118 
120  const std::string & name () const;
121 
123  double getBinWidth ( const std::string &axis );
124 
127  double getMean ( const std::string & axis );
128 
131  double getRMS ( const std::string & axis );
132 
134  double numberOfEntries() const;
135 
137  void applyCut ( QtCut * cut );
138 
141  void applyCuts ( const std::vector < QtCut * > & cuts );
142 
145  const std::vector < std::string > & colorNames ();
146 
149  void set ( Color::Value value );
150 
155  void setColor ( const std::string & color );
156 
158  void setErrorDisplay( const std::string &axis, bool flag );
159 
161  const NTuple * createNTuple () const;
162 
166  NTuple * getNTupleWithCuts () const;
167 
169  const std::vector<double> &
170  getColumnWithCuts(const std::string & column);
171 
175  NTuple * createNTupleUnderRegion () const;
176 
180  void addCut ( );
181 
184  void setCutRange ( double low, double high );
185 
188  void set ( hippodraw::Symbol::Type type );
189 
190 
194  void setSymbol( const std::string &symbolName, float size=2.);
195 
198  void set ( hippodraw::Line::Style style );
199 
203  void setLineStyle( const std::string &lineStyle );
204 
206  void normalizeTo ( const PyDataRep * target );
207 
211  void setBinWidth ( const std::string & axis, double width );
212 
213 
214 };
215 
216 } // namespace hippodraw
217 
218 #endif // PyDataRep_H

Generated for HippoDraw Class Library by doxygen