14 #ifndef _NTupleProjector_H_
15 #define _NTupleProjector_H_
58 NTuple * createEmptyNTuple ()
const;
114 Range dataRangeWithError (
int data,
int error )
const;
117 double getPos (
int column )
const;
121 double getPosWithError (
int data,
int error )
const;
126 void setAxisBinding (
int axis,
const std::string & label );
141 virtual void willDelete (
const Observable * );
145 virtual const std::vector< std::string > & bindingOptions ()
const;
151 virtual const std::vector < std::string > & getAxisBindings ()
const;
157 unsigned int indexOfBindingOption (
const std::string & axis )
const;
162 virtual int indexOf (
const std::string & label )
const;
166 virtual void setXErrorOption (
bool enable );
170 virtual void setYErrorOption (
bool enable );
176 virtual void setAxisBinding (
const std::string & axis,
177 const std::string & label );
184 virtual void setAxisBindings (
const std::vector < std::string > & labels );
190 virtual void setNTuple (
const DataSource * source );
193 virtual const DataSource * getNTuple ()
const;
199 virtual const std::string & getNTupleName ()
const;
205 virtual void changedNTuple() = 0;
212 virtual void addCut (
const TupleCut * cut );
216 virtual void removeCut (
const TupleCut * cut );
219 const std::vector < const TupleCut * > & getCutList ()
const;
224 bool acceptRow (
unsigned int i,
const CutList_t & cut_list )
const;
229 virtual const std::string & getTitle()
const;
231 virtual const std::string & getXLabel()
const;
232 virtual const std::string & getYLabel (
bool flag =
false )
const;
236 int getNumberOfEntries ()
const;
240 virtual int getUnderflow ()
const;
243 virtual int getOverflow ()
const;
247 virtual bool inRange (
int row )
const;
250 virtual double getAverage (
Axes::Type axis )
const;
253 virtual bool isEmpty ()
const;
257 virtual NTuple * getNTupleAfterCuts ()
const;
262 virtual void fillColumnAfterCuts(
const std::string &
column,
263 std::vector<double> & columnData)
const;
266 NTuple * createNTupleWith (
const std::vector< TupleCut > & cut_list )
const;
270 bool isDataValid ()
const;
275 virtual bool hasDataSourceBindings ()
const;
281 #endif // _NTupleProjector_H_
#define MDL_HIPPOPLOT_API
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
CutList_t m_cut_list
A list of cuts that filter the projection.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.
void * data(numeric::array arr)
column
The column indices for 2 dimension data point tuple.
An NTupleProjector is a projector that projects data from an DataSource object.
The class expresses a cut on a DataSource, i.e.
std::vector< const TupleCut * > CutList_t
The type of container for list of cuts.
const DataSource * m_ntuple
The pointer to the data source being projected.
std::vector< std::string > m_binding_options
The list of binding options for the Projector.
std::vector< std::string > m_bindings
The list of current bindings.
hippodraw::ProjectorBase class interface.
A DataSource class implemented with std::vector<double> to store the column data. ...
The base class for the Projector hierarchy.
Expresses a range of values.
unsigned int m_min_bindings
The minimum number of columns that must be bound.
bool m_is_valid
Set to false if any data is bound column is invalid.
Base class for DataSource.