14 #include "msdevstudio/MSconfig.h"
33 using namespace hippodraw;
36 :
BaseXML (
"NTupleProjector", controller )
45 const vector < const TupleCut * > & cutlist = projector.
getCutList ();
46 if ( cutlist.empty() )
return;
48 #ifdef ITERATOR_MEMBER_DEFECT
51 vector < const TupleCut * >::const_iterator first = cutlist.begin();
52 for ( ; first != cutlist.end(); ++first ) {
54 const void * addr = reinterpret_cast <
const void * > ( cut );
69 const void * addr = reinterpret_cast <
const void * > ( & projector );
77 int ref = element->
getID ();
81 unsigned int size = bindings.size();
83 for (
unsigned int i = 0;
i <
size;
i++ ) {
84 string name (
"Axis" );
86 const string & label = bindings[
i];
87 tag -> setAttribute ( name, label );
107 std::vector < std::string > & bindings )
const
111 for (
int i = 0; ;
i++ ) {
113 string name (
"Axis" );
115 bool ok = element -> attribute ( name, label );
118 bindings.push_back ( label );
XmlElement * createElement()
Creates a new element node.
virtual const DataSource * getNTuple() const
Returns the DataSource used by the projector.
virtual XmlElement * createElement(const std::string &tagName)=0
Creates a new DOM element wrapper object and returns a pointer to it.
virtual bool attribute(const std::string &name, bool &value) const =0
Sets value to the attribute name's value.
void createChildren(XmlElement &tag, const NTupleProjector &proj)
Creates child elements of the element.
XmlDocument class interface.
XmlController class interface.
An NTupleProjector is a projector that projects data from an DataSource object.
A pure virtual base class of XML element wrapper.
The class expresses a cut on a DataSource, i.e.
virtual int getID() const =0
Returns the ID of the element, if it has one.
The namespace for conversion to string.
void setId(XmlElement &tag, int id)
Sets the unique identification of the object.
virtual void appendChild(const XmlNode &child)=0
Appends a child element to the element.
intp size(numeric::array arr)
string convert(int i)
Converts an integer to a string.
NTupleProjectorXML(const NTupleProjectorXML &)
A private copy constructor in order to avoid copying.
XmlController * m_controller
The singleton XML controller object.
const std::vector< const TupleCut * > & getCutList() const
Returns the list of TupleCut objects used by this projector.
XmlElement class interface.
hippodraw::TupleCut class interface
static XmlDocument * m_xml_doc
The current document being generated or read.
A base class of XML element controllers.
virtual XmlElement * addDataSource(const DataSource *ntuple)
Adds the DataSource to the document if it doesn't already exist.
virtual const std::vector< std::string > & getAxisBindings() const
Returns the current axis bindings.
void getBindings(const XmlElement *element, std::vector< std::string > &bindings) const
Retreives the bindings to the HiNTuple from the element's data by clearing the list then filling it...
A base class that is the interface between GUI and the XML serialization and deserialization.
hippodraw::NTupleProjectorXML class interface
int getNTupleReference(const XmlElement *element) const
Retrieves the reference to the DataSource from the XML elements's data.
hippodraw::NTupleProjector class interface
virtual void setAttribute(const std::string &name, bool value)=0
Sets attribute named name to the int value value.
Base class for DataSource.