/* * hddm_r.hpp - DO NOT EDIT THIS FILE * * This file was generated automatically by hddm-cpp from the file * exam2.xml * This header file defines the c++ classes that hold the data * described in the data model (from exam2.xml). * * The hddm data model tool set was written by * Richard Jones, University of Connecticut. * * For more information see the following web site * * http://zeus.phys.uconn.edu/halld/datamodel/doc * */ #ifndef SAW_r_HDDM #define SAW_r_HDDM #include #include #include #include #include #include #include #include #include #include #include namespace hddm_r { const int k_bits_compression = 0xf0; const int k_no_compression = 0x00; const int k_z_compression = 0x10; const int k_bz2_compression = 0x20; const int k_default_status = 0x0; class HDDM; class istream; class ostream; class streamable { public: virtual ~streamable() {} virtual void streamer(istream &istr) {} virtual void streamer(ostream &ostr) {} }; class ostream { public: ostream(std::ostream &src); ~ostream(); ostream &operator<<(HDDM &record); ostream &operator<<(streamable &object); int getCompression() const; void setCompression(int flags); void clear_streambufs(); xstream::xdr::ostream *m_xstr; private: void configure_streambufs(); std::ostream &m_ostr; std::ostringstream m_sstr; std::streambuf *m_xcmp; std::streambuf *m_xraw; char *m_event_buffer; int m_event_buffer_size; int m_status_bits; }; class codon { public: codon(): m_order(0) {} int m_order; std::string m_tagname; std::vector m_sequence; std::deque m_target; }; typedef std::vector chromosome; class istream { public: istream(std::istream &src); ~istream(); istream &operator>>(HDDM &record); istream &operator>>(streamable &object); void sequencer(streamable &object); void skip(int count); int getCompression() const; void configure_streambufs(); void clear_streambufs(); xstream::xdr::istream *m_xstr; int m_sequencing; private: codon m_genome; codon *m_codon; std::string m_documentString; chromosome synthesize(const std::string &src, int p_src, const std::string &ref, int p_ref); int getTag(const std::string &src, int p_src, std::string &tag, int &level); int getEndTag(const std::string &src, int p_src, const std::string &tag); void collide(const std::string &itag, const std::string &rtag); std::istream &m_istr; std::istringstream m_sstr; std::streambuf *m_xcmp; std::streambuf *m_xraw; int m_events_to_skip; char *m_event_buffer; int m_event_buffer_size; int m_next_event_size; int m_status_bits; }; class HDDM_Element: public streamable { public: ~HDDM_Element() {} virtual const void *getAttribute(const std::string &name) const { return 0; } protected: HDDM_Element() : m_parent(0), m_host(0) {} HDDM_Element(HDDM_Element *parent) : m_parent(parent), m_host(parent->m_host) {} HDDM_Element(HDDM_Element &src) : m_parent(src.m_parent), m_host(src.m_host) {} HDDM_Element *m_parent; HDDM *m_host; }; template class HDDM_ElementList: public streamable { public: HDDM_ElementList(typename std::list *plist, typename std::list::iterator begin, typename std::list::iterator end, HDDM_Element *parent=0) : m_host_plist(plist), m_first_iter(begin), m_last_iter(end), m_parent(parent) { for (m_size = 0; begin != end; ++m_size, ++begin) {} if (m_size) { --m_last_iter; } } HDDM_ElementList(const HDDM_ElementList &src) : m_host_plist(src.m_host_plist), m_first_iter(src.m_first_iter), m_last_iter(src.m_last_iter), m_parent(src.m_parent), m_size(src.m_size) {} bool empty() const { return (m_size == 0); } int size() const { return m_size; } T &front() const { return *m_first_iter; } T &back() const { return *m_last_iter; } T &operator()() { return *m_first_iter; } T &operator()(int index) { if (index == 0) { return *m_first_iter; } else if (index == -1) { return *m_last_iter; } else if (index > 0) { return *(m_first_iter + index); } else { return *(m_last_iter + (++index)); } } class iterator: public std::list::iterator { public: iterator() {} iterator(typename std::list::iterator src) : std::list::iterator(src) {} T *operator->() const { return *(typename std::list::iterator)(*this); } T &operator*() const { return **(typename std::list::iterator)(*this); } iterator operator+=(int offset) { if (offset > 0) { for (int i=0; ioffset; --i, --(*this)) {} } return *this; } iterator operator-=(int offset) { if (offset > 0) { for (int i=0; ioffset; --i, ++(*this)) {} } return *this; } iterator operator+(int offset) const { iterator iter(*this); return iter += offset; } iterator operator-(int offset) const { iterator iter(*this); return iter -= offset; } int operator-(iterator iter) const { if (*this == iter) { return 0; } iterator iter2(iter); for (int n=1; n < m_size; ++n) { if (++iter == *this) { return n; } else if (--iter2 == *this) { return -n; } } return m_size; } }; class const_iterator: public std::list::const_iterator { public: const_iterator() {} const_iterator(const typename std::list::const_iterator src) : std::list::const_iterator(src) {} const_iterator(const typename std::list::iterator src) : std::list::const_iterator(src) {} const T *operator->() const { return *(typename std::list::const_iterator)(*this); } const T &operator*() const { return **(typename std::list::const_iterator)(*this); } const const_iterator operator+=(int offset) { if (offset > 0) { for (int i=0; ioffset; --i, --(*this)) {} } return *this; } const const_iterator operator-=(int offset) { if (offset > 0) { for (int i=0; i 0) { for (int i=0; i>offset; --i, ++(*this)) {} } return *this; } const const_iterator operator+(int offset) const { const_iterator iter(*this); return iter += offset; } const const_iterator operator-(int offset) const { const_iterator iter(*this); return iter -= offset; } int operator-(const_iterator iter) const { if (*this == iter) { return 0; } const_iterator iter2(iter); for (int n=1; n < m_size; ++n) { if (++iter == *this) { return n; } else if (--iter2 == *this) { return -n; } } return m_size; } }; iterator begin() const { return m_first_iter; } iterator end() const { return (m_size)? m_last_iter + 1 : m_last_iter; } void clear() { del(); } HDDM_ElementList add(int count=1, int start=-1) { if (m_parent == 0) { throw std::runtime_error("HDDM_ElementList error - " "attempt to add to immutable list"); } iterator it = insert(start, count); typename std::list::iterator iter(it); for (int n=0; n= 0) { iter_begin = iter_end - count; } } else { iter_begin += start; if (count >= 0) { iter_end = iter_begin + start; } } typename std::list::iterator iter; for (iter = iter_begin; iter != iter_end; ++iter) { delete *iter; } erase(start, count); } void streamer(istream &istr) { clear(); int size; *istr.m_xstr >> size; if (size) { iterator iter = add(size).begin(); for (int n=0; n < size; ++n, ++iter) { istr.sequencer(*iter); } } istr.m_sequencing = 0; } void streamer(ostream &ostr) { if (m_size) { *ostr.m_xstr << m_size; for (iterator iter = begin(); iter != end(); ++iter) { iter->streamer(ostr); } } } private: HDDM_ElementList() {} iterator insert(int start, int count) { if (m_size == 0) { if (count > 0) { if (m_first_iter == m_host_plist->begin()) { m_host_plist->insert(m_first_iter,count,(T*)0); m_first_iter = m_host_plist->begin(); } else { m_host_plist->insert(m_first_iter--,count,(T*)0); ++m_first_iter; } --m_last_iter; m_size = count; } return m_first_iter; } else if (start == 0) { if (count > 0) { if (m_first_iter == m_host_plist->begin()) { m_host_plist->insert(m_first_iter,count,(T*)0); m_first_iter = m_host_plist->begin(); } else { m_host_plist->insert(m_first_iter--,count,(T*)0); ++m_first_iter; } m_size += count; } return m_first_iter; } else if (start == -1) { if (count > 0) { iterator pos(m_last_iter); m_host_plist->insert(++m_last_iter,count,(T*)0); --m_last_iter; m_size += count; return ++pos; } return m_last_iter; } else if (start > 0) { if (count > 0) { iterator pos(m_first_iter); iterator pos2(pos += start-1); m_host_plist->insert(++pos,count,(T*)0); if (m_last_iter == pos2) { m_last_iter = --pos; } m_size += count; return ++pos2; } return m_first_iter + start; } else { if (count > 0) { iterator pos(m_last_iter); iterator pos2(pos += start); m_host_plist->insert(++pos,count,(T*)0); m_size += count; return ++pos2; } return m_last_iter + (start+1); } } iterator erase(int start, int count) { if (m_size == 0) { return m_first_iter+start; } else if ((count >= m_size || count == -1) && (start == 0 || start <= -m_size)) { m_host_plist->erase(m_first_iter,++m_last_iter); m_first_iter = m_last_iter; m_size = 0; return m_first_iter; } else if (start > 0 && start <= m_size) { ++m_last_iter; count = (count < 0)? m_size-start : count; iterator pos(m_first_iter + start); iterator pos2(pos + count); m_host_plist->erase(pos,pos2); m_size -= count; --m_last_iter; return pos2; } else if (start < 0 && start >= -m_size) { ++m_last_iter; count = (count < 0)? -start : count; iterator pos(m_last_iter + (start+1)); iterator pos2(pos + count); m_host_plist->erase(pos,pos2); if (m_size -= count) { --m_last_iter; } else { m_first_iter = m_last_iter; } return pos2; } return m_last_iter+1; } protected: std::list *m_host_plist; iterator m_first_iter; iterator m_last_iter; HDDM_Element *m_parent; int m_size; }; template class HDDM_ElementLink: public HDDM_ElementList { public: HDDM_ElementLink(typename std::list *plist, typename std::list::iterator begin, typename std::list::iterator end, HDDM_Element *parent) : HDDM_ElementList(plist,begin,end,parent) {} HDDM_ElementLink(const HDDM_ElementList &src) : HDDM_ElementList(src) {} void streamer(istream &istr) { HDDM_ElementList::clear(); HDDM_ElementList::add().begin()->streamer(istr); } void streamer(ostream &ostr) { if (HDDM_ElementList::m_size) { HDDM_ElementList::begin()->streamer(ostr); } } protected: HDDM_ElementLink() {} }; class Comment: public HDDM_Element { public: ~Comment(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; std::string getMaxOccurs() const; int getMinOccurs() const; std::string getText() const; void setText(const std::string &text); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: Comment(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); std::string m_text; }; typedef HDDM_ElementList CommentList; typedef HDDM_ElementLink CommentLink; class Origin: public HDDM_Element { public: ~Origin(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; float getEbeam() const; std::string getEunit() const; std::string getJtag() const; std::string getMaxOccurs() const; int getMinOccurs() const; Particle_t getTargetType() const; int getType() const; float getWeight() const; std::string getLunit() const; float getT() const; void setT(float t); float getVx() const; void setVx(float vx); float getVy() const; void setVy(float vy); float getVz() const; void setVz(float vz); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: Origin(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); float m_t; float m_vx; float m_vy; float m_vz; }; typedef HDDM_ElementList OriginList; typedef HDDM_ElementLink OriginLink; class Momentum: public HDDM_Element { public: ~Momentum(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; float getEbeam() const; std::string getJtag() const; std::string getMaxOccurs() const; int getMinOccurs() const; Particle_t getTargetType() const; int getType() const; float getWeight() const; int getId() const; int getParentId() const; int getPdgtype() const; float getE() const; void setE(float E); std::string getEunit() const; std::string getPunit() const; float getPx() const; void setPx(float px); float getPy() const; void setPy(float py); float getPz() const; void setPz(float pz); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: Momentum(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); float m_E; float m_px; float m_py; float m_pz; }; typedef HDDM_ElementList MomentumList; typedef HDDM_ElementLink MomentumLink; class Product: public HDDM_Element { public: ~Product(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; float getEbeam() const; std::string getEunit() const; std::string getJtag() const; int getMinOccurs() const; Particle_t getTargetType() const; int getType() const; float getWeight() const; int getId() const; void setId(int id); std::string getMaxOccurs() const; int getParentId() const; void setParentId(int parentId); int getPdgtype() const; void setPdgtype(int pdgtype); Momentum &getMomentum(); MomentumList &getMomenta(); MomentumList addMomenta(int count=1, int start=-1); void deleteMomenta(int count=-1, int start=0); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: Product(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); int m_id; int m_parentId; int m_pdgtype; MomentumLink m_momentum_link; }; typedef HDDM_ElementList ProductList; typedef HDDM_ElementLink ProductLink; class Vertex: public HDDM_Element { public: ~Vertex(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; float getEbeam() const; std::string getEunit() const; std::string getJtag() const; int getMinOccurs() const; Particle_t getTargetType() const; int getType() const; float getWeight() const; std::string getMaxOccurs() const; Origin &getOrigin(); OriginList &getOrigins(); OriginList addOrigins(int count=1, int start=-1); void deleteOrigins(int count=-1, int start=0); Product &getProduct(int index=0); ProductList &getProducts(); ProductList addProducts(int count=1, int start=-1); void deleteProducts(int count=-1, int start=0); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: Vertex(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); OriginLink m_origin_link; ProductList m_product_list; }; typedef HDDM_ElementList VertexList; typedef HDDM_ElementLink VertexLink; class Reaction: public HDDM_Element { public: ~Reaction(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; float getEbeam() const; void setEbeam(float Ebeam); std::string getEunit() const; std::string getJtag() const; void setJtag(const std::string &jtag); std::string getMaxOccurs() const; int getMinOccurs() const; Particle_t getTargetType() const; void setTargetType(Particle_t targetType); int getType() const; void setType(int type); float getWeight() const; void setWeight(float weight); Vertex &getVertex(int index=0); VertexList &getVertices(); VertexList addVertices(int count=1, int start=-1); void deleteVertices(int count=-1, int start=0); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: Reaction(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); float m_Ebeam; std::string m_jtag; int m_targetType; int m_type; float m_weight; VertexList m_vertex_list; }; typedef HDDM_ElementList ReactionList; typedef HDDM_ElementLink ReactionLink; class TaggerHit: public HDDM_Element { public: ~TaggerHit(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; float getE() const; void setE(float E); std::string getEunit() const; std::string getJtag() const; void setJtag(const std::string &jtag); std::string getMaxOccurs() const; int getMinOccurs() const; float getT() const; void setT(float t); std::string getTunit() const; const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: TaggerHit(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); float m_E; std::string m_jtag; float m_t; }; typedef HDDM_ElementList TaggerHitList; typedef HDDM_ElementLink TaggerHitLink; class CalorimeterCluster: public HDDM_Element { public: ~CalorimeterCluster(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; float getE() const; void setE(float E); float getEerr() const; void setEerr(float Eerr); std::string getEunit() const; float getEzcorr() const; void setEzcorr(float Ezcorr); std::string getJtag() const; void setJtag(const std::string &jtag); std::string getLunit() const; std::string getMaxOccurs() const; int getMinOccurs() const; float getT() const; void setT(float t); float getTerr() const; void setTerr(float terr); std::string getTunit() const; float getTzcorr() const; void setTzcorr(float tzcorr); float getX() const; void setX(float x); float getXerr() const; void setXerr(float xerr); float getXycorr() const; void setXycorr(float xycorr); float getXzcorr() const; void setXzcorr(float xzcorr); float getY() const; void setY(float y); float getYerr() const; void setYerr(float yerr); float getYzcorr() const; void setYzcorr(float yzcorr); float getZ() const; void setZ(float z); float getZerr() const; void setZerr(float zerr); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: CalorimeterCluster(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); float m_E; float m_Eerr; float m_Ezcorr; std::string m_jtag; float m_t; float m_terr; float m_tzcorr; float m_x; float m_xerr; float m_xycorr; float m_xzcorr; float m_y; float m_yerr; float m_yzcorr; float m_z; float m_zerr; }; typedef HDDM_ElementList CalorimeterClusterList; typedef HDDM_ElementLink CalorimeterClusterLink; class TrackFit: public HDDM_Element { public: ~TrackFit(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; int getCandidateId() const; std::string getJtag() const; std::string getMaxOccurs() const; int getMinOccurs() const; Particle_t getPtype() const; int getNdof() const; void setNdof(int Ndof); float getChisq() const; void setChisq(float chisq); float getE11() const; void setE11(float e11); float getE12() const; void setE12(float e12); float getE13() const; void setE13(float e13); float getE14() const; void setE14(float e14); float getE15() const; void setE15(float e15); float getE22() const; void setE22(float e22); float getE23() const; void setE23(float e23); float getE24() const; void setE24(float e24); float getE25() const; void setE25(float e25); float getE33() const; void setE33(float e33); float getE34() const; void setE34(float e34); float getE35() const; void setE35(float e35); float getE44() const; void setE44(float e44); float getE45() const; void setE45(float e45); float getE55() const; void setE55(float e55); std::string getLunit() const; std::string getPunit() const; float getPx() const; void setPx(float px); float getPy() const; void setPy(float py); float getPz() const; void setPz(float pz); float getT0() const; void setT0(float t0); int getT0det() const; void setT0det(int t0det); float getT0err() const; void setT0err(float t0err); std::string getTunit() const; float getX0() const; void setX0(float x0); float getY0() const; void setY0(float y0); float getZ0() const; void setZ0(float z0); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: TrackFit(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); int m_Ndof; float m_chisq; float m_e11; float m_e12; float m_e13; float m_e14; float m_e15; float m_e22; float m_e23; float m_e24; float m_e25; float m_e33; float m_e34; float m_e35; float m_e44; float m_e45; float m_e55; float m_px; float m_py; float m_pz; float m_t0; int m_t0det; float m_t0err; float m_x0; float m_y0; float m_z0; }; typedef HDDM_ElementList TrackFitList; typedef HDDM_ElementLink TrackFitLink; class DEdxDC: public HDDM_Element { public: ~DEdxDC(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; int getCandidateId() const; std::string getJtag() const; std::string getMaxOccurs() const; Particle_t getPtype() const; int getNsampleCDC() const; void setNsampleCDC(int NsampleCDC); int getNsampleFDC() const; void setNsampleFDC(int NsampleFDC); float getDEdxCDC() const; void setDEdxCDC(float dEdxCDC); float getDEdxFDC() const; void setDEdxFDC(float dEdxFDC); std::string getDEdx_unit() const; float getDxCDC() const; void setDxCDC(float dxCDC); float getDxFDC() const; void setDxFDC(float dxFDC); std::string getLunit() const; int getMinOccurs() const; const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: DEdxDC(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); int m_NsampleCDC; int m_NsampleFDC; float m_dEdxCDC; float m_dEdxFDC; float m_dxCDC; float m_dxFDC; }; typedef HDDM_ElementList DEdxDCList; typedef HDDM_ElementLink DEdxDCLink; class ChargedTrack: public HDDM_Element { public: ~ChargedTrack(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; int getCandidateId() const; void setCandidateId(int candidateId); std::string getJtag() const; void setJtag(const std::string &jtag); std::string getMaxOccurs() const; int getMinOccurs() const; Particle_t getPtype() const; void setPtype(Particle_t ptype); TrackFit &getTrackFit(); TrackFitList &getTrackFits(); TrackFitList addTrackFits(int count=1, int start=-1); void deleteTrackFits(int count=-1, int start=0); DEdxDC &getDEdxDC(); DEdxDCList &getDEdxDCs(); DEdxDCList addDEdxDCs(int count=1, int start=-1); void deleteDEdxDCs(int count=-1, int start=0); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: ChargedTrack(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); int m_candidateId; std::string m_jtag; int m_ptype; TrackFitLink m_trackFit_link; DEdxDCLink m_dEdxDC_link; }; typedef HDDM_ElementList ChargedTrackList; typedef HDDM_ElementLink ChargedTrackLink; class StartHit: public HDDM_Element { public: ~StartHit(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; std::string getEunit() const; float getDE() const; void setDE(float dE); std::string getJtag() const; void setJtag(const std::string &jtag); std::string getMaxOccurs() const; int getMinOccurs() const; int getSector() const; void setSector(int sector); float getT() const; void setT(float t); std::string getTunit() const; const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: StartHit(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); float m_dE; std::string m_jtag; int m_sector; float m_t; }; typedef HDDM_ElementList StartHitList; typedef HDDM_ElementLink StartHitLink; class TofPoint: public HDDM_Element { public: ~TofPoint(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; std::string getEunit() const; float getDE() const; void setDE(float dE); float getDEerr() const; void setDEerr(float dEerr); float getDEtcorr() const; void setDEtcorr(float dEtcorr); float getDExcorr() const; void setDExcorr(float dExcorr); float getDEycorr() const; void setDEycorr(float dEycorr); std::string getJtag() const; void setJtag(const std::string &jtag); std::string getLunit() const; std::string getMaxOccurs() const; int getMinOccurs() const; float getT() const; void setT(float t); float getTerr() const; void setTerr(float terr); std::string getTunit() const; float getX() const; void setX(float x); float getXerr() const; void setXerr(float xerr); float getXtcorr() const; void setXtcorr(float xtcorr); float getXycorr() const; void setXycorr(float xycorr); float getY() const; void setY(float y); float getYerr() const; void setYerr(float yerr); float getYtcorr() const; void setYtcorr(float ytcorr); float getZ() const; void setZ(float z); float getZerr() const; void setZerr(float zerr); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: TofPoint(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); float m_dE; float m_dEerr; float m_dEtcorr; float m_dExcorr; float m_dEycorr; std::string m_jtag; float m_t; float m_terr; float m_x; float m_xerr; float m_xtcorr; float m_xycorr; float m_y; float m_yerr; float m_ytcorr; float m_z; float m_zerr; }; typedef HDDM_ElementList TofPointList; typedef HDDM_ElementLink TofPointLink; class RFtime: public HDDM_Element { public: ~RFtime(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; std::string getJtag() const; void setJtag(const std::string &jtag); int getMinOccurs() const; float getTsync() const; void setTsync(float tsync); float getTsyncerr() const; void setTsyncerr(float tsyncerr); std::string getTunit() const; const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: RFtime(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); std::string m_jtag; float m_tsync; float m_tsyncerr; }; typedef HDDM_ElementList RFtimeList; typedef HDDM_ElementLink RFtimeLink; class Trigger: public HDDM_Element { public: ~Trigger(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; int getRunNo() const; bool getL1a() const; void setL1a(bool L1a); bool getL1b() const; void setL1b(bool L1b); bool getL1c() const; void setL1c(bool L1c); std::string getJtag() const; void setJtag(const std::string &jtag); int getMinOccurs() const; const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: Trigger(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); int m_L1a; int m_L1b; int m_L1c; std::string m_jtag; }; typedef HDDM_ElementList TriggerList; typedef HDDM_ElementLink TriggerLink; class ReconstructedPhysicsEvent: public HDDM_Element { public: ~ReconstructedPhysicsEvent(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; int getEventNo() const; void setEventNo(int eventNo); int getRunNo() const; void setRunNo(int runNo); Comment &getComment(int index=0); CommentList &getComments(); CommentList addComments(int count=1, int start=-1); void deleteComments(int count=-1, int start=0); Reaction &getReaction(int index=0); ReactionList &getReactions(); ReactionList addReactions(int count=1, int start=-1); void deleteReactions(int count=-1, int start=0); TaggerHit &getTaggerHit(int index=0); TaggerHitList &getTaggerHits(); TaggerHitList addTaggerHits(int count=1, int start=-1); void deleteTaggerHits(int count=-1, int start=0); CalorimeterCluster &getCalorimeterCluster(int index=0); CalorimeterClusterList &getCalorimeterClusters(); CalorimeterClusterList addCalorimeterClusters(int count=1, int start=-1); void deleteCalorimeterClusters(int count=-1, int start=0); ChargedTrack &getChargedTrack(int index=0); ChargedTrackList &getChargedTracks(); ChargedTrackList addChargedTracks(int count=1, int start=-1); void deleteChargedTracks(int count=-1, int start=0); StartHit &getStartHit(int index=0); StartHitList &getStartHits(); StartHitList addStartHits(int count=1, int start=-1); void deleteStartHits(int count=-1, int start=0); TofPoint &getTofPoint(int index=0); TofPointList &getTofPoints(); TofPointList addTofPoints(int count=1, int start=-1); void deleteTofPoints(int count=-1, int start=0); RFtime &getRFtime(); RFtimeList &getRFtimes(); RFtimeList addRFtimes(int count=1, int start=-1); void deleteRFtimes(int count=-1, int start=0); Trigger &getTrigger(); TriggerList &getTriggers(); TriggerList addTriggers(int count=1, int start=-1); void deleteTriggers(int count=-1, int start=0); const void *getAttribute(const std::string &name) const; friend class HDDM_ElementList; friend class HDDM_ElementLink; private: ReconstructedPhysicsEvent(HDDM_Element *parent=0); void streamer(istream &istr); void streamer(ostream &ostr); int m_eventNo; int m_runNo; CommentList m_comment_list; ReactionList m_reaction_list; TaggerHitList m_taggerHit_list; CalorimeterClusterList m_calorimeterCluster_list; ChargedTrackList m_chargedTrack_list; StartHitList m_startHit_list; TofPointList m_tofPoint_list; RFtimeLink m_RFtime_link; TriggerLink m_trigger_link; }; typedef HDDM_ElementList ReconstructedPhysicsEventList; typedef HDDM_ElementLink ReconstructedPhysicsEventLink; class HDDM: public HDDM_Element { public: HDDM(); ~HDDM(); std::string getClass() const; std::string getVersion() const; std::string getXmlns() const; RFtimeList getRFtimes(); CalorimeterClusterList getCalorimeterClusters(); ChargedTrackList getChargedTracks(); CommentList getComments(); DEdxDCList getDEdxDCs(); MomentumList getMomenta(); OriginList getOrigins(); ProductList getProducts(); ReactionList getReactions(); StartHitList getStartHits(); TaggerHitList getTaggerHits(); TofPointList getTofPoints(); TrackFitList getTrackFits(); TriggerList getTriggers(); VertexList getVertices(); ReconstructedPhysicsEvent &getReconstructedPhysicsEvent(); ReconstructedPhysicsEventList &getReconstructedPhysicsEvents(); ReconstructedPhysicsEventList addReconstructedPhysicsEvents(int count=1, int start=-1); void deleteReconstructedPhysicsEvents(int count=-1, int start=0); void clear(); friend class RFtime; friend class CalorimeterCluster; friend class ChargedTrack; friend class Comment; friend class DEdxDC; friend class Momentum; friend class Origin; friend class Product; friend class Reaction; friend class ReconstructedPhysicsEvent; friend class StartHit; friend class TaggerHit; friend class TofPoint; friend class TrackFit; friend class Trigger; friend class Vertex; static std::string DocumentString(); private: void streamer(istream &istr); void streamer(ostream &ostr); std::list m_RFtime_plist; std::list m_calorimeterCluster_plist; std::list m_chargedTrack_plist; std::list m_comment_plist; std::list m_dEdxDC_plist; std::list m_momentum_plist; std::list m_origin_plist; std::list m_product_plist; std::list m_reaction_plist; std::list m_reconstructedPhysicsEvent_plist; std::list m_startHit_plist; std::list m_taggerHit_plist; std::list m_tofPoint_plist; std::list m_trackFit_plist; std::list m_trigger_plist; std::list m_vertex_plist; ReconstructedPhysicsEventLink m_reconstructedPhysicsEvent_link; }; inline void istream::skip(int count) { m_events_to_skip = count; } inline int istream::getCompression() const { return m_status_bits & k_bits_compression; } inline int ostream::getCompression() const { return m_status_bits & k_bits_compression; } inline istream &istream::operator>>(streamable &object) { if (m_sequencing) { m_codon->m_target.push_back(&object); } else { int size; *m_xstr >> size; if (size > 0) { std::streampos start = m_sstr.tellg(); sequencer(object); m_sstr.seekg(start+(std::streamoff)size); } } return *this; } inline void istream::sequencer(streamable &object) { m_sequencing = 1; m_codon->m_target.clear(); object.streamer(*this); if (m_sequencing) { m_sequencing = 0; codon &gene = *m_codon; streamable null_streamable; gene.m_target.push_front(&null_streamable); chromosome::iterator iter; for (iter = gene.m_sequence.begin(); iter != gene.m_sequence.end(); ++iter) { m_codon = &(*iter); *this >> *gene.m_target[iter->m_order]; } m_codon = &gene; } } inline ostream &ostream::operator<<(HDDM &record) { m_sstr.str(""); *this << (streamable&)record; m_ostr << m_sstr.str(); return *this; } inline ostream &ostream::operator<<(streamable &object) { *m_xstr << 0; std::streampos start = m_sstr.tellp(); object.streamer(*this); std::streampos end = m_sstr.tellp(); m_sstr.seekp(start-std::streamoff(4)); *m_xstr << (int)(end-start); m_sstr.seekp(end); return *this; } inline Comment::Comment(HDDM_Element *parent) : HDDM_Element(parent), m_text("") {} inline Comment::~Comment() {} inline std::string Comment::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string Comment::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string Comment::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int Comment::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int Comment::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline std::string Comment::getMaxOccurs() const { return "unbounded"; } inline int Comment::getMinOccurs() const { return 0; } inline std::string Comment::getText() const { return m_text; } inline void Comment::setText(const std::string &text) { m_text = text; } inline const void *Comment::getAttribute(const std::string &name) const { return (name == "text")? &m_text: m_parent->getAttribute(name); } inline Origin::Origin(HDDM_Element *parent) : HDDM_Element(parent), m_t(0), m_vx(0), m_vy(0), m_vz(0) {} inline Origin::~Origin() {} inline std::string Origin::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string Origin::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string Origin::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int Origin::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int Origin::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline float Origin::getEbeam() const { return *(float*)m_parent->getAttribute("Ebeam"); } inline std::string Origin::getEunit() const { return *(std::string*)m_parent->getAttribute("Eunit"); } inline std::string Origin::getJtag() const { return *(const std::string*)m_parent->getAttribute("jtag"); } inline std::string Origin::getMaxOccurs() const { return *(std::string*)m_parent->getAttribute("maxOccurs"); } inline int Origin::getMinOccurs() const { return *(int*)m_parent->getAttribute("minOccurs"); } inline Particle_t Origin::getTargetType() const { return *(Particle_t*)m_parent->getAttribute("targetType"); } inline int Origin::getType() const { return *(int*)m_parent->getAttribute("type"); } inline float Origin::getWeight() const { return *(float*)m_parent->getAttribute("weight"); } inline std::string Origin::getLunit() const { return "cm"; } inline float Origin::getT() const { return m_t; } inline void Origin::setT(float t) { m_t = t; } inline float Origin::getVx() const { return m_vx; } inline void Origin::setVx(float vx) { m_vx = vx; } inline float Origin::getVy() const { return m_vy; } inline void Origin::setVy(float vy) { m_vy = vy; } inline float Origin::getVz() const { return m_vz; } inline void Origin::setVz(float vz) { m_vz = vz; } inline const void *Origin::getAttribute(const std::string &name) const { return (name == "t")? &m_t: (name == "vx")? &m_vx: (name == "vy")? &m_vy: (name == "vz")? &m_vz: m_parent->getAttribute(name); } inline Momentum::Momentum(HDDM_Element *parent) : HDDM_Element(parent), m_E(0), m_px(0), m_py(0), m_pz(0) {} inline Momentum::~Momentum() {} inline std::string Momentum::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string Momentum::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string Momentum::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int Momentum::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int Momentum::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline float Momentum::getEbeam() const { return *(float*)m_parent->getAttribute("Ebeam"); } inline std::string Momentum::getJtag() const { return *(const std::string*)m_parent->getAttribute("jtag"); } inline std::string Momentum::getMaxOccurs() const { return *(std::string*)m_parent->getAttribute("maxOccurs"); } inline int Momentum::getMinOccurs() const { return *(int*)m_parent->getAttribute("minOccurs"); } inline Particle_t Momentum::getTargetType() const { return *(Particle_t*)m_parent->getAttribute("targetType"); } inline int Momentum::getType() const { return *(int*)m_parent->getAttribute("type"); } inline float Momentum::getWeight() const { return *(float*)m_parent->getAttribute("weight"); } inline int Momentum::getId() const { return *(int*)m_parent->getAttribute("id"); } inline int Momentum::getParentId() const { return *(int*)m_parent->getAttribute("parentId"); } inline int Momentum::getPdgtype() const { return *(int*)m_parent->getAttribute("pdgtype"); } inline float Momentum::getE() const { return m_E; } inline void Momentum::setE(float E) { m_E = E; } inline std::string Momentum::getEunit() const { return "GeV"; } inline std::string Momentum::getPunit() const { return "GeV/c"; } inline float Momentum::getPx() const { return m_px; } inline void Momentum::setPx(float px) { m_px = px; } inline float Momentum::getPy() const { return m_py; } inline void Momentum::setPy(float py) { m_py = py; } inline float Momentum::getPz() const { return m_pz; } inline void Momentum::setPz(float pz) { m_pz = pz; } inline const void *Momentum::getAttribute(const std::string &name) const { return (name == "E")? &m_E: (name == "px")? &m_px: (name == "py")? &m_py: (name == "pz")? &m_pz: m_parent->getAttribute(name); } inline Product::Product(HDDM_Element *parent) : HDDM_Element(parent), m_id(0), m_parentId(0), m_pdgtype(0), m_momentum_link(&m_host->m_momentum_plist, m_host->m_momentum_plist.end(), m_host->m_momentum_plist.end(), this) {} inline Product::~Product() { deleteMomenta(); } inline std::string Product::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string Product::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string Product::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int Product::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int Product::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline float Product::getEbeam() const { return *(float*)m_parent->getAttribute("Ebeam"); } inline std::string Product::getEunit() const { return *(std::string*)m_parent->getAttribute("Eunit"); } inline std::string Product::getJtag() const { return *(const std::string*)m_parent->getAttribute("jtag"); } inline int Product::getMinOccurs() const { return *(int*)m_parent->getAttribute("minOccurs"); } inline Particle_t Product::getTargetType() const { return *(Particle_t*)m_parent->getAttribute("targetType"); } inline int Product::getType() const { return *(int*)m_parent->getAttribute("type"); } inline float Product::getWeight() const { return *(float*)m_parent->getAttribute("weight"); } inline int Product::getId() const { return m_id; } inline void Product::setId(int id) { m_id = id; } inline std::string Product::getMaxOccurs() const { return "unbounded"; } inline int Product::getParentId() const { return m_parentId; } inline void Product::setParentId(int parentId) { m_parentId = parentId; } inline int Product::getPdgtype() const { return m_pdgtype; } inline void Product::setPdgtype(int pdgtype) { m_pdgtype = pdgtype; } inline const void *Product::getAttribute(const std::string &name) const { return (name == "id")? &m_id: (name == "parentId")? &m_parentId: (name == "pdgtype")? &m_pdgtype: m_parent->getAttribute(name); } inline Momentum &Product::getMomentum() { return m_momentum_link.front(); } inline MomentumList &Product::getMomenta() { return m_momentum_link; } inline MomentumList Product::addMomenta(int count, int start) { return m_momentum_link.add(count,start); } inline void Product::deleteMomenta(int count, int start) { m_momentum_link.del(count,start); } inline Vertex::Vertex(HDDM_Element *parent) : HDDM_Element(parent), m_origin_link(&m_host->m_origin_plist, m_host->m_origin_plist.end(), m_host->m_origin_plist.end(), this), m_product_list(&m_host->m_product_plist, m_host->m_product_plist.end(), m_host->m_product_plist.end(), this) {} inline Vertex::~Vertex() { deleteOrigins(); deleteProducts(); } inline std::string Vertex::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string Vertex::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string Vertex::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int Vertex::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int Vertex::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline float Vertex::getEbeam() const { return *(float*)m_parent->getAttribute("Ebeam"); } inline std::string Vertex::getEunit() const { return *(std::string*)m_parent->getAttribute("Eunit"); } inline std::string Vertex::getJtag() const { return *(const std::string*)m_parent->getAttribute("jtag"); } inline int Vertex::getMinOccurs() const { return *(int*)m_parent->getAttribute("minOccurs"); } inline Particle_t Vertex::getTargetType() const { return *(Particle_t*)m_parent->getAttribute("targetType"); } inline int Vertex::getType() const { return *(int*)m_parent->getAttribute("type"); } inline float Vertex::getWeight() const { return *(float*)m_parent->getAttribute("weight"); } inline std::string Vertex::getMaxOccurs() const { return "unbounded"; } inline const void *Vertex::getAttribute(const std::string &name) const { return m_parent->getAttribute(name); } inline Origin &Vertex::getOrigin() { return m_origin_link.front(); } inline OriginList &Vertex::getOrigins() { return m_origin_link; } inline OriginList Vertex::addOrigins(int count, int start) { return m_origin_link.add(count,start); } inline void Vertex::deleteOrigins(int count, int start) { m_origin_link.del(count,start); } inline Product &Vertex::getProduct(int index) { return m_product_list(index); } inline ProductList &Vertex::getProducts() { return m_product_list; } inline ProductList Vertex::addProducts(int count, int start) { return m_product_list.add(count,start); } inline void Vertex::deleteProducts(int count, int start) { m_product_list.del(count,start); } inline Reaction::Reaction(HDDM_Element *parent) : HDDM_Element(parent), m_Ebeam(0), m_jtag(""), m_targetType(0), m_type(0), m_weight(0), m_vertex_list(&m_host->m_vertex_plist, m_host->m_vertex_plist.end(), m_host->m_vertex_plist.end(), this) {} inline Reaction::~Reaction() { deleteVertices(); } inline std::string Reaction::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string Reaction::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string Reaction::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int Reaction::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int Reaction::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline float Reaction::getEbeam() const { return m_Ebeam; } inline void Reaction::setEbeam(float Ebeam) { m_Ebeam = Ebeam; } inline std::string Reaction::getEunit() const { return "GeV"; } inline std::string Reaction::getJtag() const { return m_jtag; } inline void Reaction::setJtag(const std::string &jtag) { m_jtag = jtag; } inline std::string Reaction::getMaxOccurs() const { return "unbounded"; } inline int Reaction::getMinOccurs() const { return 0; } inline Particle_t Reaction::getTargetType() const { return (Particle_t)m_targetType; } inline void Reaction::setTargetType(Particle_t targetType) { m_targetType = targetType; } inline int Reaction::getType() const { return m_type; } inline void Reaction::setType(int type) { m_type = type; } inline float Reaction::getWeight() const { return m_weight; } inline void Reaction::setWeight(float weight) { m_weight = weight; } inline const void *Reaction::getAttribute(const std::string &name) const { return (name == "Ebeam")? &m_Ebeam: (name == "jtag")? &m_jtag: (name == "targetType")? &m_targetType: (name == "type")? &m_type: (name == "weight")? &m_weight: m_parent->getAttribute(name); } inline Vertex &Reaction::getVertex(int index) { return m_vertex_list(index); } inline VertexList &Reaction::getVertices() { return m_vertex_list; } inline VertexList Reaction::addVertices(int count, int start) { return m_vertex_list.add(count,start); } inline void Reaction::deleteVertices(int count, int start) { m_vertex_list.del(count,start); } inline TaggerHit::TaggerHit(HDDM_Element *parent) : HDDM_Element(parent), m_E(0), m_jtag(""), m_t(0) {} inline TaggerHit::~TaggerHit() {} inline std::string TaggerHit::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string TaggerHit::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string TaggerHit::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int TaggerHit::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int TaggerHit::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline float TaggerHit::getE() const { return m_E; } inline void TaggerHit::setE(float E) { m_E = E; } inline std::string TaggerHit::getEunit() const { return "GeV"; } inline std::string TaggerHit::getJtag() const { return m_jtag; } inline void TaggerHit::setJtag(const std::string &jtag) { m_jtag = jtag; } inline std::string TaggerHit::getMaxOccurs() const { return "unbounded"; } inline int TaggerHit::getMinOccurs() const { return 0; } inline float TaggerHit::getT() const { return m_t; } inline void TaggerHit::setT(float t) { m_t = t; } inline std::string TaggerHit::getTunit() const { return "ns"; } inline const void *TaggerHit::getAttribute(const std::string &name) const { return (name == "E")? &m_E: (name == "jtag")? &m_jtag: (name == "t")? &m_t: m_parent->getAttribute(name); } inline CalorimeterCluster::CalorimeterCluster(HDDM_Element *parent) : HDDM_Element(parent), m_E(0), m_Eerr(0), m_Ezcorr(0), m_jtag(""), m_t(0), m_terr(0), m_tzcorr(0), m_x(0), m_xerr(0), m_xycorr(0), m_xzcorr(0), m_y(0), m_yerr(0), m_yzcorr(0), m_z(0), m_zerr(0) {} inline CalorimeterCluster::~CalorimeterCluster() {} inline std::string CalorimeterCluster::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string CalorimeterCluster::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string CalorimeterCluster::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int CalorimeterCluster::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int CalorimeterCluster::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline float CalorimeterCluster::getE() const { return m_E; } inline void CalorimeterCluster::setE(float E) { m_E = E; } inline float CalorimeterCluster::getEerr() const { return m_Eerr; } inline void CalorimeterCluster::setEerr(float Eerr) { m_Eerr = Eerr; } inline std::string CalorimeterCluster::getEunit() const { return "GeV"; } inline float CalorimeterCluster::getEzcorr() const { return m_Ezcorr; } inline void CalorimeterCluster::setEzcorr(float Ezcorr) { m_Ezcorr = Ezcorr; } inline std::string CalorimeterCluster::getJtag() const { return m_jtag; } inline void CalorimeterCluster::setJtag(const std::string &jtag) { m_jtag = jtag; } inline std::string CalorimeterCluster::getLunit() const { return "cm"; } inline std::string CalorimeterCluster::getMaxOccurs() const { return "unbounded"; } inline int CalorimeterCluster::getMinOccurs() const { return 0; } inline float CalorimeterCluster::getT() const { return m_t; } inline void CalorimeterCluster::setT(float t) { m_t = t; } inline float CalorimeterCluster::getTerr() const { return m_terr; } inline void CalorimeterCluster::setTerr(float terr) { m_terr = terr; } inline std::string CalorimeterCluster::getTunit() const { return "ns"; } inline float CalorimeterCluster::getTzcorr() const { return m_tzcorr; } inline void CalorimeterCluster::setTzcorr(float tzcorr) { m_tzcorr = tzcorr; } inline float CalorimeterCluster::getX() const { return m_x; } inline void CalorimeterCluster::setX(float x) { m_x = x; } inline float CalorimeterCluster::getXerr() const { return m_xerr; } inline void CalorimeterCluster::setXerr(float xerr) { m_xerr = xerr; } inline float CalorimeterCluster::getXycorr() const { return m_xycorr; } inline void CalorimeterCluster::setXycorr(float xycorr) { m_xycorr = xycorr; } inline float CalorimeterCluster::getXzcorr() const { return m_xzcorr; } inline void CalorimeterCluster::setXzcorr(float xzcorr) { m_xzcorr = xzcorr; } inline float CalorimeterCluster::getY() const { return m_y; } inline void CalorimeterCluster::setY(float y) { m_y = y; } inline float CalorimeterCluster::getYerr() const { return m_yerr; } inline void CalorimeterCluster::setYerr(float yerr) { m_yerr = yerr; } inline float CalorimeterCluster::getYzcorr() const { return m_yzcorr; } inline void CalorimeterCluster::setYzcorr(float yzcorr) { m_yzcorr = yzcorr; } inline float CalorimeterCluster::getZ() const { return m_z; } inline void CalorimeterCluster::setZ(float z) { m_z = z; } inline float CalorimeterCluster::getZerr() const { return m_zerr; } inline void CalorimeterCluster::setZerr(float zerr) { m_zerr = zerr; } inline const void *CalorimeterCluster::getAttribute(const std::string &name) const { return (name == "E")? &m_E: (name == "Eerr")? &m_Eerr: (name == "Ezcorr")? &m_Ezcorr: (name == "jtag")? &m_jtag: (name == "t")? &m_t: (name == "terr")? &m_terr: (name == "tzcorr")? &m_tzcorr: (name == "x")? &m_x: (name == "xerr")? &m_xerr: (name == "xycorr")? &m_xycorr: (name == "xzcorr")? &m_xzcorr: (name == "y")? &m_y: (name == "yerr")? &m_yerr: (name == "yzcorr")? &m_yzcorr: (name == "z")? &m_z: (name == "zerr")? &m_zerr: m_parent->getAttribute(name); } inline TrackFit::TrackFit(HDDM_Element *parent) : HDDM_Element(parent), m_Ndof(0), m_chisq(0), m_e11(0), m_e12(0), m_e13(0), m_e14(0), m_e15(0), m_e22(0), m_e23(0), m_e24(0), m_e25(0), m_e33(0), m_e34(0), m_e35(0), m_e44(0), m_e45(0), m_e55(0), m_px(0), m_py(0), m_pz(0), m_t0(0), m_t0det(0), m_t0err(0), m_x0(0), m_y0(0), m_z0(0) {} inline TrackFit::~TrackFit() {} inline std::string TrackFit::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string TrackFit::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string TrackFit::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int TrackFit::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int TrackFit::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline int TrackFit::getCandidateId() const { return *(int*)m_parent->getAttribute("candidateId"); } inline std::string TrackFit::getJtag() const { return *(const std::string*)m_parent->getAttribute("jtag"); } inline std::string TrackFit::getMaxOccurs() const { return *(std::string*)m_parent->getAttribute("maxOccurs"); } inline int TrackFit::getMinOccurs() const { return *(int*)m_parent->getAttribute("minOccurs"); } inline Particle_t TrackFit::getPtype() const { return *(Particle_t*)m_parent->getAttribute("ptype"); } inline int TrackFit::getNdof() const { return m_Ndof; } inline void TrackFit::setNdof(int Ndof) { m_Ndof = Ndof; } inline float TrackFit::getChisq() const { return m_chisq; } inline void TrackFit::setChisq(float chisq) { m_chisq = chisq; } inline float TrackFit::getE11() const { return m_e11; } inline void TrackFit::setE11(float e11) { m_e11 = e11; } inline float TrackFit::getE12() const { return m_e12; } inline void TrackFit::setE12(float e12) { m_e12 = e12; } inline float TrackFit::getE13() const { return m_e13; } inline void TrackFit::setE13(float e13) { m_e13 = e13; } inline float TrackFit::getE14() const { return m_e14; } inline void TrackFit::setE14(float e14) { m_e14 = e14; } inline float TrackFit::getE15() const { return m_e15; } inline void TrackFit::setE15(float e15) { m_e15 = e15; } inline float TrackFit::getE22() const { return m_e22; } inline void TrackFit::setE22(float e22) { m_e22 = e22; } inline float TrackFit::getE23() const { return m_e23; } inline void TrackFit::setE23(float e23) { m_e23 = e23; } inline float TrackFit::getE24() const { return m_e24; } inline void TrackFit::setE24(float e24) { m_e24 = e24; } inline float TrackFit::getE25() const { return m_e25; } inline void TrackFit::setE25(float e25) { m_e25 = e25; } inline float TrackFit::getE33() const { return m_e33; } inline void TrackFit::setE33(float e33) { m_e33 = e33; } inline float TrackFit::getE34() const { return m_e34; } inline void TrackFit::setE34(float e34) { m_e34 = e34; } inline float TrackFit::getE35() const { return m_e35; } inline void TrackFit::setE35(float e35) { m_e35 = e35; } inline float TrackFit::getE44() const { return m_e44; } inline void TrackFit::setE44(float e44) { m_e44 = e44; } inline float TrackFit::getE45() const { return m_e45; } inline void TrackFit::setE45(float e45) { m_e45 = e45; } inline float TrackFit::getE55() const { return m_e55; } inline void TrackFit::setE55(float e55) { m_e55 = e55; } inline std::string TrackFit::getLunit() const { return "cm"; } inline std::string TrackFit::getPunit() const { return "GeV/c"; } inline float TrackFit::getPx() const { return m_px; } inline void TrackFit::setPx(float px) { m_px = px; } inline float TrackFit::getPy() const { return m_py; } inline void TrackFit::setPy(float py) { m_py = py; } inline float TrackFit::getPz() const { return m_pz; } inline void TrackFit::setPz(float pz) { m_pz = pz; } inline float TrackFit::getT0() const { return m_t0; } inline void TrackFit::setT0(float t0) { m_t0 = t0; } inline int TrackFit::getT0det() const { return m_t0det; } inline void TrackFit::setT0det(int t0det) { m_t0det = t0det; } inline float TrackFit::getT0err() const { return m_t0err; } inline void TrackFit::setT0err(float t0err) { m_t0err = t0err; } inline std::string TrackFit::getTunit() const { return "ns"; } inline float TrackFit::getX0() const { return m_x0; } inline void TrackFit::setX0(float x0) { m_x0 = x0; } inline float TrackFit::getY0() const { return m_y0; } inline void TrackFit::setY0(float y0) { m_y0 = y0; } inline float TrackFit::getZ0() const { return m_z0; } inline void TrackFit::setZ0(float z0) { m_z0 = z0; } inline const void *TrackFit::getAttribute(const std::string &name) const { return (name == "Ndof")? &m_Ndof: (name == "chisq")? &m_chisq: (name == "e11")? &m_e11: (name == "e12")? &m_e12: (name == "e13")? &m_e13: (name == "e14")? &m_e14: (name == "e15")? &m_e15: (name == "e22")? &m_e22: (name == "e23")? &m_e23: (name == "e24")? &m_e24: (name == "e25")? &m_e25: (name == "e33")? &m_e33: (name == "e34")? &m_e34: (name == "e35")? &m_e35: (name == "e44")? &m_e44: (name == "e45")? &m_e45: (name == "e55")? &m_e55: (name == "px")? &m_px: (name == "py")? &m_py: (name == "pz")? &m_pz: (name == "t0")? &m_t0: (name == "t0det")? &m_t0det: (name == "t0err")? &m_t0err: (name == "x0")? &m_x0: (name == "y0")? &m_y0: (name == "z0")? &m_z0: m_parent->getAttribute(name); } inline DEdxDC::DEdxDC(HDDM_Element *parent) : HDDM_Element(parent), m_NsampleCDC(0), m_NsampleFDC(0), m_dEdxCDC(0), m_dEdxFDC(0), m_dxCDC(0), m_dxFDC(0) {} inline DEdxDC::~DEdxDC() {} inline std::string DEdxDC::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string DEdxDC::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string DEdxDC::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int DEdxDC::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int DEdxDC::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline int DEdxDC::getCandidateId() const { return *(int*)m_parent->getAttribute("candidateId"); } inline std::string DEdxDC::getJtag() const { return *(const std::string*)m_parent->getAttribute("jtag"); } inline std::string DEdxDC::getMaxOccurs() const { return *(std::string*)m_parent->getAttribute("maxOccurs"); } inline Particle_t DEdxDC::getPtype() const { return *(Particle_t*)m_parent->getAttribute("ptype"); } inline int DEdxDC::getNsampleCDC() const { return m_NsampleCDC; } inline void DEdxDC::setNsampleCDC(int NsampleCDC) { m_NsampleCDC = NsampleCDC; } inline int DEdxDC::getNsampleFDC() const { return m_NsampleFDC; } inline void DEdxDC::setNsampleFDC(int NsampleFDC) { m_NsampleFDC = NsampleFDC; } inline float DEdxDC::getDEdxCDC() const { return m_dEdxCDC; } inline void DEdxDC::setDEdxCDC(float dEdxCDC) { m_dEdxCDC = dEdxCDC; } inline float DEdxDC::getDEdxFDC() const { return m_dEdxFDC; } inline void DEdxDC::setDEdxFDC(float dEdxFDC) { m_dEdxFDC = dEdxFDC; } inline std::string DEdxDC::getDEdx_unit() const { return "GeV/cm"; } inline float DEdxDC::getDxCDC() const { return m_dxCDC; } inline void DEdxDC::setDxCDC(float dxCDC) { m_dxCDC = dxCDC; } inline float DEdxDC::getDxFDC() const { return m_dxFDC; } inline void DEdxDC::setDxFDC(float dxFDC) { m_dxFDC = dxFDC; } inline std::string DEdxDC::getLunit() const { return "cm"; } inline int DEdxDC::getMinOccurs() const { return 0; } inline const void *DEdxDC::getAttribute(const std::string &name) const { return (name == "NsampleCDC")? &m_NsampleCDC: (name == "NsampleFDC")? &m_NsampleFDC: (name == "dEdxCDC")? &m_dEdxCDC: (name == "dEdxFDC")? &m_dEdxFDC: (name == "dxCDC")? &m_dxCDC: (name == "dxFDC")? &m_dxFDC: m_parent->getAttribute(name); } inline ChargedTrack::ChargedTrack(HDDM_Element *parent) : HDDM_Element(parent), m_candidateId(0), m_jtag(""), m_ptype(0), m_trackFit_link(&m_host->m_trackFit_plist, m_host->m_trackFit_plist.end(), m_host->m_trackFit_plist.end(), this), m_dEdxDC_link(&m_host->m_dEdxDC_plist, m_host->m_dEdxDC_plist.end(), m_host->m_dEdxDC_plist.end(), this) {} inline ChargedTrack::~ChargedTrack() { deleteTrackFits(); deleteDEdxDCs(); } inline std::string ChargedTrack::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string ChargedTrack::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string ChargedTrack::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int ChargedTrack::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int ChargedTrack::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline int ChargedTrack::getCandidateId() const { return m_candidateId; } inline void ChargedTrack::setCandidateId(int candidateId) { m_candidateId = candidateId; } inline std::string ChargedTrack::getJtag() const { return m_jtag; } inline void ChargedTrack::setJtag(const std::string &jtag) { m_jtag = jtag; } inline std::string ChargedTrack::getMaxOccurs() const { return "unbounded"; } inline int ChargedTrack::getMinOccurs() const { return 0; } inline Particle_t ChargedTrack::getPtype() const { return (Particle_t)m_ptype; } inline void ChargedTrack::setPtype(Particle_t ptype) { m_ptype = ptype; } inline const void *ChargedTrack::getAttribute(const std::string &name) const { return (name == "candidateId")? &m_candidateId: (name == "jtag")? &m_jtag: (name == "ptype")? &m_ptype: m_parent->getAttribute(name); } inline TrackFit &ChargedTrack::getTrackFit() { return m_trackFit_link.front(); } inline TrackFitList &ChargedTrack::getTrackFits() { return m_trackFit_link; } inline TrackFitList ChargedTrack::addTrackFits(int count, int start) { return m_trackFit_link.add(count,start); } inline void ChargedTrack::deleteTrackFits(int count, int start) { m_trackFit_link.del(count,start); } inline DEdxDC &ChargedTrack::getDEdxDC() { return m_dEdxDC_link.front(); } inline DEdxDCList &ChargedTrack::getDEdxDCs() { return m_dEdxDC_link; } inline DEdxDCList ChargedTrack::addDEdxDCs(int count, int start) { return m_dEdxDC_link.add(count,start); } inline void ChargedTrack::deleteDEdxDCs(int count, int start) { m_dEdxDC_link.del(count,start); } inline StartHit::StartHit(HDDM_Element *parent) : HDDM_Element(parent), m_dE(0), m_jtag(""), m_sector(0), m_t(0) {} inline StartHit::~StartHit() {} inline std::string StartHit::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string StartHit::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string StartHit::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int StartHit::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int StartHit::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline std::string StartHit::getEunit() const { return "GeV"; } inline float StartHit::getDE() const { return m_dE; } inline void StartHit::setDE(float dE) { m_dE = dE; } inline std::string StartHit::getJtag() const { return m_jtag; } inline void StartHit::setJtag(const std::string &jtag) { m_jtag = jtag; } inline std::string StartHit::getMaxOccurs() const { return "unbounded"; } inline int StartHit::getMinOccurs() const { return 0; } inline int StartHit::getSector() const { return m_sector; } inline void StartHit::setSector(int sector) { m_sector = sector; } inline float StartHit::getT() const { return m_t; } inline void StartHit::setT(float t) { m_t = t; } inline std::string StartHit::getTunit() const { return "ns"; } inline const void *StartHit::getAttribute(const std::string &name) const { return (name == "dE")? &m_dE: (name == "jtag")? &m_jtag: (name == "sector")? &m_sector: (name == "t")? &m_t: m_parent->getAttribute(name); } inline TofPoint::TofPoint(HDDM_Element *parent) : HDDM_Element(parent), m_dE(0), m_dEerr(0), m_dEtcorr(0), m_dExcorr(0), m_dEycorr(0), m_jtag(""), m_t(0), m_terr(0), m_x(0), m_xerr(0), m_xtcorr(0), m_xycorr(0), m_y(0), m_yerr(0), m_ytcorr(0), m_z(0), m_zerr(0) {} inline TofPoint::~TofPoint() {} inline std::string TofPoint::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string TofPoint::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string TofPoint::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int TofPoint::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int TofPoint::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline std::string TofPoint::getEunit() const { return "GeV"; } inline float TofPoint::getDE() const { return m_dE; } inline void TofPoint::setDE(float dE) { m_dE = dE; } inline float TofPoint::getDEerr() const { return m_dEerr; } inline void TofPoint::setDEerr(float dEerr) { m_dEerr = dEerr; } inline float TofPoint::getDEtcorr() const { return m_dEtcorr; } inline void TofPoint::setDEtcorr(float dEtcorr) { m_dEtcorr = dEtcorr; } inline float TofPoint::getDExcorr() const { return m_dExcorr; } inline void TofPoint::setDExcorr(float dExcorr) { m_dExcorr = dExcorr; } inline float TofPoint::getDEycorr() const { return m_dEycorr; } inline void TofPoint::setDEycorr(float dEycorr) { m_dEycorr = dEycorr; } inline std::string TofPoint::getJtag() const { return m_jtag; } inline void TofPoint::setJtag(const std::string &jtag) { m_jtag = jtag; } inline std::string TofPoint::getLunit() const { return "cm"; } inline std::string TofPoint::getMaxOccurs() const { return "unbounded"; } inline int TofPoint::getMinOccurs() const { return 0; } inline float TofPoint::getT() const { return m_t; } inline void TofPoint::setT(float t) { m_t = t; } inline float TofPoint::getTerr() const { return m_terr; } inline void TofPoint::setTerr(float terr) { m_terr = terr; } inline std::string TofPoint::getTunit() const { return "ns"; } inline float TofPoint::getX() const { return m_x; } inline void TofPoint::setX(float x) { m_x = x; } inline float TofPoint::getXerr() const { return m_xerr; } inline void TofPoint::setXerr(float xerr) { m_xerr = xerr; } inline float TofPoint::getXtcorr() const { return m_xtcorr; } inline void TofPoint::setXtcorr(float xtcorr) { m_xtcorr = xtcorr; } inline float TofPoint::getXycorr() const { return m_xycorr; } inline void TofPoint::setXycorr(float xycorr) { m_xycorr = xycorr; } inline float TofPoint::getY() const { return m_y; } inline void TofPoint::setY(float y) { m_y = y; } inline float TofPoint::getYerr() const { return m_yerr; } inline void TofPoint::setYerr(float yerr) { m_yerr = yerr; } inline float TofPoint::getYtcorr() const { return m_ytcorr; } inline void TofPoint::setYtcorr(float ytcorr) { m_ytcorr = ytcorr; } inline float TofPoint::getZ() const { return m_z; } inline void TofPoint::setZ(float z) { m_z = z; } inline float TofPoint::getZerr() const { return m_zerr; } inline void TofPoint::setZerr(float zerr) { m_zerr = zerr; } inline const void *TofPoint::getAttribute(const std::string &name) const { return (name == "dE")? &m_dE: (name == "dEerr")? &m_dEerr: (name == "dEtcorr")? &m_dEtcorr: (name == "dExcorr")? &m_dExcorr: (name == "dEycorr")? &m_dEycorr: (name == "jtag")? &m_jtag: (name == "t")? &m_t: (name == "terr")? &m_terr: (name == "x")? &m_x: (name == "xerr")? &m_xerr: (name == "xtcorr")? &m_xtcorr: (name == "xycorr")? &m_xycorr: (name == "y")? &m_y: (name == "yerr")? &m_yerr: (name == "ytcorr")? &m_ytcorr: (name == "z")? &m_z: (name == "zerr")? &m_zerr: m_parent->getAttribute(name); } inline RFtime::RFtime(HDDM_Element *parent) : HDDM_Element(parent), m_jtag(""), m_tsync(0), m_tsyncerr(0) {} inline RFtime::~RFtime() {} inline std::string RFtime::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string RFtime::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string RFtime::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int RFtime::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int RFtime::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline std::string RFtime::getJtag() const { return m_jtag; } inline void RFtime::setJtag(const std::string &jtag) { m_jtag = jtag; } inline int RFtime::getMinOccurs() const { return 0; } inline float RFtime::getTsync() const { return m_tsync; } inline void RFtime::setTsync(float tsync) { m_tsync = tsync; } inline float RFtime::getTsyncerr() const { return m_tsyncerr; } inline void RFtime::setTsyncerr(float tsyncerr) { m_tsyncerr = tsyncerr; } inline std::string RFtime::getTunit() const { return "ns"; } inline const void *RFtime::getAttribute(const std::string &name) const { return (name == "jtag")? &m_jtag: (name == "tsync")? &m_tsync: (name == "tsyncerr")? &m_tsyncerr: m_parent->getAttribute(name); } inline Trigger::Trigger(HDDM_Element *parent) : HDDM_Element(parent), m_L1a(0), m_L1b(0), m_L1c(0), m_jtag("") {} inline Trigger::~Trigger() {} inline std::string Trigger::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string Trigger::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string Trigger::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int Trigger::getEventNo() const { return *(int*)m_parent->getAttribute("eventNo"); } inline int Trigger::getRunNo() const { return *(int*)m_parent->getAttribute("runNo"); } inline bool Trigger::getL1a() const { return m_L1a; } inline void Trigger::setL1a(bool L1a) { m_L1a = L1a; } inline bool Trigger::getL1b() const { return m_L1b; } inline void Trigger::setL1b(bool L1b) { m_L1b = L1b; } inline bool Trigger::getL1c() const { return m_L1c; } inline void Trigger::setL1c(bool L1c) { m_L1c = L1c; } inline std::string Trigger::getJtag() const { return m_jtag; } inline void Trigger::setJtag(const std::string &jtag) { m_jtag = jtag; } inline int Trigger::getMinOccurs() const { return 0; } inline const void *Trigger::getAttribute(const std::string &name) const { return (name == "L1a")? &m_L1a: (name == "L1b")? &m_L1b: (name == "L1c")? &m_L1c: (name == "jtag")? &m_jtag: m_parent->getAttribute(name); } inline ReconstructedPhysicsEvent::ReconstructedPhysicsEvent(HDDM_Element *parent) : HDDM_Element(parent), m_eventNo(0), m_runNo(0), m_comment_list(&m_host->m_comment_plist, m_host->m_comment_plist.end(), m_host->m_comment_plist.end(), this), m_reaction_list(&m_host->m_reaction_plist, m_host->m_reaction_plist.end(), m_host->m_reaction_plist.end(), this), m_taggerHit_list(&m_host->m_taggerHit_plist, m_host->m_taggerHit_plist.end(), m_host->m_taggerHit_plist.end(), this), m_calorimeterCluster_list(&m_host->m_calorimeterCluster_plist, m_host->m_calorimeterCluster_plist.end(), m_host->m_calorimeterCluster_plist.end(), this), m_chargedTrack_list(&m_host->m_chargedTrack_plist, m_host->m_chargedTrack_plist.end(), m_host->m_chargedTrack_plist.end(), this), m_startHit_list(&m_host->m_startHit_plist, m_host->m_startHit_plist.end(), m_host->m_startHit_plist.end(), this), m_tofPoint_list(&m_host->m_tofPoint_plist, m_host->m_tofPoint_plist.end(), m_host->m_tofPoint_plist.end(), this), m_RFtime_link(&m_host->m_RFtime_plist, m_host->m_RFtime_plist.end(), m_host->m_RFtime_plist.end(), this), m_trigger_link(&m_host->m_trigger_plist, m_host->m_trigger_plist.end(), m_host->m_trigger_plist.end(), this) {} inline ReconstructedPhysicsEvent::~ReconstructedPhysicsEvent() { deleteComments(); deleteReactions(); deleteTaggerHits(); deleteCalorimeterClusters(); deleteChargedTracks(); deleteStartHits(); deleteTofPoints(); deleteRFtimes(); deleteTriggers(); } inline std::string ReconstructedPhysicsEvent::getClass() const { return *(std::string*)m_parent->getAttribute("class"); } inline std::string ReconstructedPhysicsEvent::getVersion() const { return *(std::string*)m_parent->getAttribute("version"); } inline std::string ReconstructedPhysicsEvent::getXmlns() const { return *(std::string*)m_parent->getAttribute("xmlns"); } inline int ReconstructedPhysicsEvent::getEventNo() const { return m_eventNo; } inline void ReconstructedPhysicsEvent::setEventNo(int eventNo) { m_eventNo = eventNo; } inline int ReconstructedPhysicsEvent::getRunNo() const { return m_runNo; } inline void ReconstructedPhysicsEvent::setRunNo(int runNo) { m_runNo = runNo; } inline const void *ReconstructedPhysicsEvent::getAttribute(const std::string &name) const { return (name == "eventNo")? &m_eventNo: (name == "runNo")? &m_runNo: m_parent->getAttribute(name); } inline Comment &ReconstructedPhysicsEvent::getComment(int index) { return m_comment_list(index); } inline CommentList &ReconstructedPhysicsEvent::getComments() { return m_comment_list; } inline CommentList ReconstructedPhysicsEvent::addComments(int count, int start) { return m_comment_list.add(count,start); } inline void ReconstructedPhysicsEvent::deleteComments(int count, int start) { m_comment_list.del(count,start); } inline Reaction &ReconstructedPhysicsEvent::getReaction(int index) { return m_reaction_list(index); } inline ReactionList &ReconstructedPhysicsEvent::getReactions() { return m_reaction_list; } inline ReactionList ReconstructedPhysicsEvent::addReactions(int count, int start) { return m_reaction_list.add(count,start); } inline void ReconstructedPhysicsEvent::deleteReactions(int count, int start) { m_reaction_list.del(count,start); } inline TaggerHit &ReconstructedPhysicsEvent::getTaggerHit(int index) { return m_taggerHit_list(index); } inline TaggerHitList &ReconstructedPhysicsEvent::getTaggerHits() { return m_taggerHit_list; } inline TaggerHitList ReconstructedPhysicsEvent::addTaggerHits(int count, int start) { return m_taggerHit_list.add(count,start); } inline void ReconstructedPhysicsEvent::deleteTaggerHits(int count, int start) { m_taggerHit_list.del(count,start); } inline CalorimeterCluster &ReconstructedPhysicsEvent::getCalorimeterCluster(int index) { return m_calorimeterCluster_list(index); } inline CalorimeterClusterList &ReconstructedPhysicsEvent::getCalorimeterClusters() { return m_calorimeterCluster_list; } inline CalorimeterClusterList ReconstructedPhysicsEvent::addCalorimeterClusters(int count, int start) { return m_calorimeterCluster_list.add(count,start); } inline void ReconstructedPhysicsEvent::deleteCalorimeterClusters(int count, int start) { m_calorimeterCluster_list.del(count,start); } inline ChargedTrack &ReconstructedPhysicsEvent::getChargedTrack(int index) { return m_chargedTrack_list(index); } inline ChargedTrackList &ReconstructedPhysicsEvent::getChargedTracks() { return m_chargedTrack_list; } inline ChargedTrackList ReconstructedPhysicsEvent::addChargedTracks(int count, int start) { return m_chargedTrack_list.add(count,start); } inline void ReconstructedPhysicsEvent::deleteChargedTracks(int count, int start) { m_chargedTrack_list.del(count,start); } inline StartHit &ReconstructedPhysicsEvent::getStartHit(int index) { return m_startHit_list(index); } inline StartHitList &ReconstructedPhysicsEvent::getStartHits() { return m_startHit_list; } inline StartHitList ReconstructedPhysicsEvent::addStartHits(int count, int start) { return m_startHit_list.add(count,start); } inline void ReconstructedPhysicsEvent::deleteStartHits(int count, int start) { m_startHit_list.del(count,start); } inline TofPoint &ReconstructedPhysicsEvent::getTofPoint(int index) { return m_tofPoint_list(index); } inline TofPointList &ReconstructedPhysicsEvent::getTofPoints() { return m_tofPoint_list; } inline TofPointList ReconstructedPhysicsEvent::addTofPoints(int count, int start) { return m_tofPoint_list.add(count,start); } inline void ReconstructedPhysicsEvent::deleteTofPoints(int count, int start) { m_tofPoint_list.del(count,start); } inline RFtime &ReconstructedPhysicsEvent::getRFtime() { return m_RFtime_link.front(); } inline RFtimeList &ReconstructedPhysicsEvent::getRFtimes() { return m_RFtime_link; } inline RFtimeList ReconstructedPhysicsEvent::addRFtimes(int count, int start) { return m_RFtime_link.add(count,start); } inline void ReconstructedPhysicsEvent::deleteRFtimes(int count, int start) { m_RFtime_link.del(count,start); } inline Trigger &ReconstructedPhysicsEvent::getTrigger() { return m_trigger_link.front(); } inline TriggerList &ReconstructedPhysicsEvent::getTriggers() { return m_trigger_link; } inline TriggerList ReconstructedPhysicsEvent::addTriggers(int count, int start) { return m_trigger_link.add(count,start); } inline void ReconstructedPhysicsEvent::deleteTriggers(int count, int start) { m_trigger_link.del(count,start); } inline HDDM::HDDM() : HDDM_Element(), m_reconstructedPhysicsEvent_plist(), m_reconstructedPhysicsEvent_link(&this->m_reconstructedPhysicsEvent_plist, this->m_reconstructedPhysicsEvent_plist.end(), this->m_reconstructedPhysicsEvent_plist.end(), this) { m_host = this; } inline HDDM::~HDDM() { deleteReconstructedPhysicsEvents(); } inline std::string HDDM::getClass() const { return "r"; } inline std::string HDDM::getVersion() const { return "1.0.1"; } inline std::string HDDM::getXmlns() const { return "http://www.gluex.org/hddm"; } inline void HDDM::clear() { deleteReconstructedPhysicsEvents(); } inline ReconstructedPhysicsEvent &HDDM::getReconstructedPhysicsEvent() { return m_reconstructedPhysicsEvent_link.front(); } inline ReconstructedPhysicsEventList &HDDM::getReconstructedPhysicsEvents() { return m_reconstructedPhysicsEvent_link; } inline ReconstructedPhysicsEventList HDDM::addReconstructedPhysicsEvents(int count, int start) { return m_reconstructedPhysicsEvent_link.add(count,start); } inline void HDDM::deleteReconstructedPhysicsEvents(int count, int start) { m_reconstructedPhysicsEvent_link.del(count,start); } inline RFtimeList HDDM::getRFtimes() { return RFtimeList(&m_RFtime_plist, m_RFtime_plist.begin(), m_RFtime_plist.end()); } inline CalorimeterClusterList HDDM::getCalorimeterClusters() { return CalorimeterClusterList(&m_calorimeterCluster_plist, m_calorimeterCluster_plist.begin(), m_calorimeterCluster_plist.end()); } inline ChargedTrackList HDDM::getChargedTracks() { return ChargedTrackList(&m_chargedTrack_plist, m_chargedTrack_plist.begin(), m_chargedTrack_plist.end()); } inline CommentList HDDM::getComments() { return CommentList(&m_comment_plist, m_comment_plist.begin(), m_comment_plist.end()); } inline DEdxDCList HDDM::getDEdxDCs() { return DEdxDCList(&m_dEdxDC_plist, m_dEdxDC_plist.begin(), m_dEdxDC_plist.end()); } inline MomentumList HDDM::getMomenta() { return MomentumList(&m_momentum_plist, m_momentum_plist.begin(), m_momentum_plist.end()); } inline OriginList HDDM::getOrigins() { return OriginList(&m_origin_plist, m_origin_plist.begin(), m_origin_plist.end()); } inline ProductList HDDM::getProducts() { return ProductList(&m_product_plist, m_product_plist.begin(), m_product_plist.end()); } inline ReactionList HDDM::getReactions() { return ReactionList(&m_reaction_plist, m_reaction_plist.begin(), m_reaction_plist.end()); } inline StartHitList HDDM::getStartHits() { return StartHitList(&m_startHit_plist, m_startHit_plist.begin(), m_startHit_plist.end()); } inline TaggerHitList HDDM::getTaggerHits() { return TaggerHitList(&m_taggerHit_plist, m_taggerHit_plist.begin(), m_taggerHit_plist.end()); } inline TofPointList HDDM::getTofPoints() { return TofPointList(&m_tofPoint_plist, m_tofPoint_plist.begin(), m_tofPoint_plist.end()); } inline TrackFitList HDDM::getTrackFits() { return TrackFitList(&m_trackFit_plist, m_trackFit_plist.begin(), m_trackFit_plist.end()); } inline TriggerList HDDM::getTriggers() { return TriggerList(&m_trigger_plist, m_trigger_plist.begin(), m_trigger_plist.end()); } inline VertexList HDDM::getVertices() { return VertexList(&m_vertex_plist, m_vertex_plist.begin(), m_vertex_plist.end()); } inline void Comment::streamer(istream &istr) { *istr.m_xstr >> m_text; } inline void Comment::streamer(ostream &ostr) { *ostr.m_xstr << m_text; } inline void Origin::streamer(istream &istr) { *istr.m_xstr >> m_t >> m_vx >> m_vy >> m_vz; } inline void Origin::streamer(ostream &ostr) { *ostr.m_xstr << m_t << m_vx << m_vy << m_vz; } inline void Momentum::streamer(istream &istr) { *istr.m_xstr >> m_E >> m_px >> m_py >> m_pz; } inline void Momentum::streamer(ostream &ostr) { *ostr.m_xstr << m_E << m_px << m_py << m_pz; } inline void Product::streamer(istream &istr) { *istr.m_xstr >> m_id >> m_parentId >> m_pdgtype; istr >> m_momentum_link; } inline void Product::streamer(ostream &ostr) { *ostr.m_xstr << m_id << m_parentId << m_pdgtype; ostr << m_momentum_link; } inline void Vertex::streamer(istream &istr) { istr >> m_origin_link >> m_product_list; } inline void Vertex::streamer(ostream &ostr) { ostr << m_origin_link << m_product_list; } inline void Reaction::streamer(istream &istr) { *istr.m_xstr >> m_Ebeam >> m_jtag >> m_targetType >> m_type >> m_weight; istr >> m_vertex_list; } inline void Reaction::streamer(ostream &ostr) { *ostr.m_xstr << m_Ebeam << m_jtag << m_targetType << m_type << m_weight; ostr << m_vertex_list; } inline void TaggerHit::streamer(istream &istr) { *istr.m_xstr >> m_E >> m_jtag >> m_t; } inline void TaggerHit::streamer(ostream &ostr) { *ostr.m_xstr << m_E << m_jtag << m_t; } inline void CalorimeterCluster::streamer(istream &istr) { *istr.m_xstr >> m_E >> m_Eerr >> m_Ezcorr >> m_jtag >> m_t >> m_terr >> m_tzcorr >> m_x >> m_xerr >> m_xycorr >> m_xzcorr >> m_y >> m_yerr >> m_yzcorr >> m_z >> m_zerr; } inline void CalorimeterCluster::streamer(ostream &ostr) { *ostr.m_xstr << m_E << m_Eerr << m_Ezcorr << m_jtag << m_t << m_terr << m_tzcorr << m_x << m_xerr << m_xycorr << m_xzcorr << m_y << m_yerr << m_yzcorr << m_z << m_zerr; } inline void TrackFit::streamer(istream &istr) { *istr.m_xstr >> m_Ndof >> m_chisq >> m_e11 >> m_e12 >> m_e13 >> m_e14 >> m_e15 >> m_e22 >> m_e23 >> m_e24 >> m_e25 >> m_e33 >> m_e34 >> m_e35 >> m_e44 >> m_e45 >> m_e55 >> m_px >> m_py >> m_pz >> m_t0 >> m_t0det >> m_t0err >> m_x0 >> m_y0 >> m_z0; } inline void TrackFit::streamer(ostream &ostr) { *ostr.m_xstr << m_Ndof << m_chisq << m_e11 << m_e12 << m_e13 << m_e14 << m_e15 << m_e22 << m_e23 << m_e24 << m_e25 << m_e33 << m_e34 << m_e35 << m_e44 << m_e45 << m_e55 << m_px << m_py << m_pz << m_t0 << m_t0det << m_t0err << m_x0 << m_y0 << m_z0; } inline void DEdxDC::streamer(istream &istr) { *istr.m_xstr >> m_NsampleCDC >> m_NsampleFDC >> m_dEdxCDC >> m_dEdxFDC >> m_dxCDC >> m_dxFDC; } inline void DEdxDC::streamer(ostream &ostr) { *ostr.m_xstr << m_NsampleCDC << m_NsampleFDC << m_dEdxCDC << m_dEdxFDC << m_dxCDC << m_dxFDC; } inline void ChargedTrack::streamer(istream &istr) { *istr.m_xstr >> m_candidateId >> m_jtag >> m_ptype; istr >> m_trackFit_link >> m_dEdxDC_link; } inline void ChargedTrack::streamer(ostream &ostr) { *ostr.m_xstr << m_candidateId << m_jtag << m_ptype; ostr << m_trackFit_link << m_dEdxDC_link; } inline void StartHit::streamer(istream &istr) { *istr.m_xstr >> m_dE >> m_jtag >> m_sector >> m_t; } inline void StartHit::streamer(ostream &ostr) { *ostr.m_xstr << m_dE << m_jtag << m_sector << m_t; } inline void TofPoint::streamer(istream &istr) { *istr.m_xstr >> m_dE >> m_dEerr >> m_dEtcorr >> m_dExcorr >> m_dEycorr >> m_jtag >> m_t >> m_terr >> m_x >> m_xerr >> m_xtcorr >> m_xycorr >> m_y >> m_yerr >> m_ytcorr >> m_z >> m_zerr; } inline void TofPoint::streamer(ostream &ostr) { *ostr.m_xstr << m_dE << m_dEerr << m_dEtcorr << m_dExcorr << m_dEycorr << m_jtag << m_t << m_terr << m_x << m_xerr << m_xtcorr << m_xycorr << m_y << m_yerr << m_ytcorr << m_z << m_zerr; } inline void RFtime::streamer(istream &istr) { *istr.m_xstr >> m_jtag >> m_tsync >> m_tsyncerr; } inline void RFtime::streamer(ostream &ostr) { *ostr.m_xstr << m_jtag << m_tsync << m_tsyncerr; } inline void Trigger::streamer(istream &istr) { *istr.m_xstr >> m_L1a >> m_L1b >> m_L1c >> m_jtag; } inline void Trigger::streamer(ostream &ostr) { *ostr.m_xstr << m_L1a << m_L1b << m_L1c << m_jtag; } inline void ReconstructedPhysicsEvent::streamer(istream &istr) { *istr.m_xstr >> m_eventNo >> m_runNo; istr >> m_comment_list >> m_reaction_list >> m_taggerHit_list >> m_calorimeterCluster_list >> m_chargedTrack_list >> m_startHit_list >> m_tofPoint_list >> m_RFtime_link >> m_trigger_link; } inline void ReconstructedPhysicsEvent::streamer(ostream &ostr) { *ostr.m_xstr << m_eventNo << m_runNo; ostr << m_comment_list << m_reaction_list << m_taggerHit_list << m_calorimeterCluster_list << m_chargedTrack_list << m_startHit_list << m_tofPoint_list << m_RFtime_link << m_trigger_link; } inline void HDDM::streamer(istream &istr) { istr >> m_reconstructedPhysicsEvent_link; } inline void HDDM::streamer(ostream &ostr) { ostr << m_reconstructedPhysicsEvent_link; } inline std::string HDDM::DocumentString() { return std::string( "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" ); } } #endif /* SAW_r_HDDM */