Fork me on GitHub

Changeset 572 in svn for trunk


Ignore:
Timestamp:
Nov 2, 2011, 5:39:26 PM (13 years ago)
Author:
cp3-support
Message:

upgrade HepMC to version 2.06.05

Location:
trunk/Utilities/HepMC/interface
Files:
5 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/HepMC/interface/Flow.h

    r349 r572  
    179179    inline void Flow::clear() { m_icode.clear(); }
    180180    inline bool Flow::erase( int code_index ) {
    181         return (bool)m_icode.erase( code_index );
     181        // this will return true if the number of elements removed is nonzero
     182        return m_icode.erase( code_index )==0 ? false : true ;
    182183    }
    183184    inline Flow::iterator Flow::begin() { return m_icode.begin(); }
  • trunk/Utilities/HepMC/interface/GenEvent.h

    r349 r572  
    119119//   parent_event() return value will return a pointer to the event which owns
    120120//   it (or null if its an orphan).
     121// - Please note that the barcodes are intended for internal use within HepMC
     122//   as a unique identifier for the particles and vertices.
     123//   Using the barcode to encode extra information is an abuse of
     124//   the barcode data member and causes confusion among users.
    121125//
    122126
     
    124128#include "GenParticle.h"
    125129#include "WeightContainer.h"
     130#include "GenCrossSection.h"
    126131#include "HeavyIon.h"
    127132#include "PdfInfo.h"
    128133#include "Units.h"
     134#include "HepMCDefs.h"
    129135#include <map>
    130136#include <string>
     
    134140
    135141namespace HepMC {
     142
     143    class GenEventVertexRange;
     144    class ConstGenEventVertexRange;
     145    class GenEventParticleRange;
     146    class ConstGenEventParticleRange;
    136147
    137148    //! The GenEvent class is the core of HepMC
     
    146157        friend class GenVertex; 
    147158    public:
    148         /// default constructor creates null pointers to HeavyIon and PdfInfo
     159        /// default constructor creates null pointers to HeavyIon, PdfInfo, and GenCrossSection
    149160        GenEvent( int signal_process_id = 0, int event_number = 0,
    150161                  GenVertex* signal_vertex = 0,
     
    202213        /// pair of pointers to the two incoming beam particles
    203214        std::pair<HepMC::GenParticle*,HepMC::GenParticle*> beam_particles() const;
     215        /// check GenEvent for validity
     216        /// A GenEvent is presumed valid if it has particles and/or vertices.
     217        bool is_valid() const;
    204218
    205219        /// direct access to the weights container is allowed.
     
    211225        const WeightContainer&  weights() const; //!< direct access to WeightContainer
    212226
     227        /// access the GenCrossSection container if it exists
     228        GenCrossSection const *     cross_section() const;
     229        GenCrossSection*            cross_section();
    213230        /// access the HeavyIon container if it exists
    214         HeavyIon const *          heavy_ion() const;
     231        HeavyIon const *         heavy_ion() const;
    215232        HeavyIon*                heavy_ion();
    216233        /// access the PdfInfo container if it exists
    217         PdfInfo const *           pdf_info() const;
     234        PdfInfo const *          pdf_info() const;
    218235        PdfInfo*                 pdf_info();
    219236
     
    230247        bool    vertices_empty() const;
    231248
     249        /// Write the unit information to an output stream. 
     250        /// If the output stream is not defined, use std::cout.
    232251        void write_units( std::ostream & os = std::cout ) const;
     252        /// If the cross section is defined,
     253        /// write the cross section information to an output stream. 
     254        /// If the output stream is not defined, use std::cout.
     255        void write_cross_section( std::ostream& ostr = std::cout ) const;
    233256
    234257        /// Units used by the GenParticle momentum FourVector.
     
    236259        /// Units used by the GenVertex position FourVector.
    237260        Units::LengthUnit   length_unit()   const;
     261       
     262        std::ostream& write(std::ostream&);
     263        std::istream& read(std::istream&);
    238264
    239265        /////////////////////
     
    261287        void set_random_states( const std::vector<long>& randomstates );
    262288
     289        /// provide a pointer to the GenCrossSection container
     290        void set_cross_section( const GenCrossSection& );
    263291        /// provide a pointer to the HeavyIon container
    264292        void set_heavy_ion( const HeavyIon& ion );
     
    271299        /// the string must match the enum exactly
    272300        void use_units( std::string&, std::string& );
     301       
     302        /// vertex range
     303        GenEventVertexRange vertex_range();
     304        /// vertex range
     305        ConstGenEventVertexRange vertex_range() const;
     306        /// particle range
     307        GenEventParticleRange particle_range();
     308        /// particle range
     309        ConstGenEventParticleRange particle_range() const;
    273310
    274311    public:
     
    320357            std::map<int,HepMC::GenVertex*,std::greater<int> >::const_iterator
    321358                                                                m_map_iterator;
     359        private:
     360            /// Pre-fix increment -- is not allowed
     361            vertex_const_iterator&  operator--(void);
     362            /// Post-fix increment -- is not allowed
     363            vertex_const_iterator   operator--(int);
    322364        };
    323365        friend class vertex_const_iterator;
     
    377419            std::map<int,HepMC::GenVertex*,std::greater<int> >::iterator
    378420                                                               m_map_iterator;
     421        private:
     422            /// Pre-fix increment
     423            vertex_iterator&  operator--(void);
     424            /// Post-fix increment
     425            vertex_iterator   operator--(int);
     426
    379427        };
    380428        friend class vertex_iterator;
     
    439487            /// const iterator to the GenParticle map
    440488            std::map<int,HepMC::GenParticle*>::const_iterator m_map_iterator;
     489        private:
     490            /// Pre-fix increment
     491            particle_const_iterator&  operator--(void);
     492            /// Post-fix increment
     493            particle_const_iterator   operator--(int);
    441494        };     
    442495        friend class particle_const_iterator;
     
    492545            /// iterator for GenParticle map
    493546            std::map<int,HepMC::GenParticle*>::iterator m_map_iterator;
     547        private:
     548            /// Pre-fix increment
     549            particle_iterator&  operator--(void);
     550            /// Post-fix increment
     551            particle_iterator   operator--(int);
    494552        };
    495553        friend class particle_iterator;
     
    526584        bool use_length_unit( Units::LengthUnit );
    527585        bool use_length_unit( std::string& );
     586       
     587        // the following internal methods are used by read() and write()
     588
     589        /// send the beam particles to ASCII output
     590        std::ostream & write_beam_particles( std::ostream &,
     591                             std::pair<HepMC::GenParticle *,HepMC::GenParticle *> );
     592        /// send a GenVertex to ASCII output
     593        std::ostream & write_vertex( std::ostream &, GenVertex const * );
     594        /// send a GenParticle to ASCII output
     595        std::ostream & write_particle( std::ostream&, GenParticle const * );
     596        /// find the file type
     597        std::istream & find_file_type( std::istream & );
     598        /// find the key at the end of the block
     599        std::istream & find_end_key( std::istream &, int & );
     600        /// get unit information from ASCII input
     601        std::istream & read_units( std::istream & );
     602        /// get weight names from ASCII input
     603        std::istream & read_weight_names( std::istream & );
     604        /// read the event header line
     605        std::istream & process_event_line( std::istream &, int &, int &, int &, int & );
    528606
    529607    private: // data members
     
    544622        std::map< int,HepMC::GenVertex*,std::greater<int> >   m_vertex_barcodes;
    545623        std::map< int,HepMC::GenParticle*,std::less<int> >    m_particle_barcodes;
     624        GenCrossSection*         m_cross_section;             // undefined by default
    546625        HeavyIon*             m_heavy_ion;            // undefined by default
    547626        PdfInfo*              m_pdf_info;             // undefined by default
     
    549628        Units::LengthUnit     m_position_unit;    // default value set by configure switch
    550629
    551         //static unsigned int   s_counter;
    552630    };
     631
     632
     633    ///////////////////////////
     634    // IO Free Functions     //
     635    ///////////////////////////
     636 
     637    /// standard streaming IO output operator
     638    std::ostream & operator << (std::ostream &, GenEvent &);
     639    /// standard streaming IO input operator
     640    std::istream & operator >> (std::istream &, GenEvent &);
     641    /// set the units for this input stream
     642    std::istream & set_input_units(std::istream &,
     643                                   Units::MomentumUnit, Units::LengthUnit);
     644    /// Explicitly write the begin block lines that IO_GenEvent uses
     645    std::ostream & write_HepMC_IO_block_begin(std::ostream & );
     646    /// Explicitly write the end block line that IO_GenEvent uses
     647    std::ostream & write_HepMC_IO_block_end(std::ostream & );
    553648
    554649
     
    596691    inline const WeightContainer& GenEvent::weights() const
    597692    { return m_weights; }
     693
     694    inline GenCrossSection const * GenEvent::cross_section() const
     695    { return m_cross_section; }
     696
     697    inline GenCrossSection*  GenEvent::cross_section() 
     698    { return m_cross_section; }
    598699
    599700    inline HeavyIon const * GenEvent::heavy_ion() const
     
    639740    }
    640741
     742    inline void GenEvent::set_cross_section( const GenCrossSection& xs )
     743    {
     744        delete m_cross_section;
     745        m_cross_section = new GenCrossSection(xs);
     746    }
     747
    641748    inline void GenEvent::set_heavy_ion( const HeavyIon& ion )
    642     { m_heavy_ion = new HeavyIon(ion); }
     749    {
     750        delete m_heavy_ion;
     751        m_heavy_ion = new HeavyIon(ion);
     752    }
    643753
    644754    inline void GenEvent::set_pdf_info( const PdfInfo& p )
    645     { m_pdf_info = new PdfInfo(p); }
     755    {
     756        delete m_pdf_info;
     757        m_pdf_info = new PdfInfo(p);
     758    }
    646759
    647760    inline void GenEvent::set_random_states( const std::vector<long>&
     
    649762    { m_random_states = randomstates; }
    650763
    651     inline void GenEvent::remove_barcode( HepMC::GenParticle* p )
     764    inline void GenEvent::remove_barcode( GenParticle* p )
    652765    { m_particle_barcodes.erase( p->barcode() ); }
    653766
     
    668781    /// The barcodes are chosen and set automatically when a vertex or particle
    669782    /// comes under the ownership of an event (i.e. it is contained in an event).
     783    ///
     784    /// Please note that the barcodes are intended for internal use within
     785    /// HepMC as a unique identifier for the particles and vertices.
     786    /// Using the barcode to encode extra information is an abuse of
     787    /// the barcode data member and causes confusion among users.
    670788    inline GenParticle* GenEvent::barcode_to_particle( int barCode ) const
    671789    {
     
    688806    /// The barcodes are chosen and set automatically when a vertex or particle
    689807    /// comes under the ownership of an event (i.e. it is contained in an event).
     808    ///
     809    /// Please note that the barcodes are intended for internal use within
     810    /// HepMC as a unique identifier for the particles and vertices.
     811    /// Using the barcode to encode extra information is an abuse of
     812    /// the barcode data member and causes confusion among users.
    690813    inline GenVertex* GenEvent::barcode_to_vertex( int barCode ) const
    691814    {
     
    709832   
    710833    // beam particles
    711     inline std::pair<HepMC::GenParticle*,HepMC::GenParticle*> GenEvent::beam_particles() const {
    712         return std::pair<GenParticle*,GenParticle*> (m_beam_particle_1, m_beam_particle_2);
     834    inline std::pair<HepMC::GenParticle *,HepMC::GenParticle *> GenEvent::beam_particles() const {
     835        return std::pair<GenParticle *,GenParticle *> (m_beam_particle_1, m_beam_particle_2);
    713836    }
    714837
  • trunk/Utilities/HepMC/interface/GenParticle.h

    r349 r572  
    3030#include "Polarization.h"
    3131#include "SimpleVector.h"
     32#include "IteratorRange.h"
    3233#include <iostream>
    3334#ifdef _WIN32
     
    4344    class GenEvent;
    4445
     46    class GenParticleProductionRange;
     47    class ConstGenParticleProductionRange;
     48    class GenParticleEndRange;
     49    class ConstGenParticleEndRange;
    4550
    4651    //! The GenParticle class contains information about generated particles
     
    119124        ///
    120125        /// The barcode is the particle's reference number, every vertex in the
    121         ///  event has a unique barcode. Particle barcodes are positive numbers,
    122         ///  vertex barcodes are negative numbers.
     126        /// event has a unique barcode. Particle barcodes are positive numbers,
     127        /// vertex barcodes are negative numbers.
     128        ///
     129        /// Please note that the barcodes are intended for internal use within
     130        /// HepMC as a unique identifier for the particles and vertices.
     131        /// Using the barcode to encode extra information is an abuse of
     132        /// the barcode data member and causes confusion among users.
     133        ///
    123134        int                  barcode() const; //!< particle barcode
     135       
     136        /// Convenience method.  Returns true if status==1
     137        bool                 is_undecayed() const;
     138        /// Convenience method.  Returns true if status==2
     139        bool                 has_decayed() const;
     140        /// Convenience method.  Returns true if status==4
     141        /// Note that using status 4 for beam particles is a new convention which
     142        /// may not have been implemented by the code originating this GenEvent.
     143        bool                 is_beam() const;
     144
     145        /// incoming particle range
     146        GenParticleProductionRange particles_in( IteratorRange range = relatives );
     147        /// incoming particle range
     148        ConstGenParticleProductionRange particles_in( IteratorRange range = relatives ) const;
     149        /// outgoing particle range
     150        GenParticleEndRange particles_out( IteratorRange range = relatives );
     151        /// outgoing particle range
     152        ConstGenParticleEndRange particles_out( IteratorRange range = relatives ) const;
    124153
    125154        /////////////////////
     
    225254    inline void GenParticle::set_barcode_( int bc ) { m_barcode = bc; }
    226255
     256    inline bool GenParticle::is_undecayed() const {
     257        return ( m_status==1 ) ?  true : false;
     258    }
     259    inline bool GenParticle::has_decayed() const {
     260        return ( m_status==2 ) ?  true : false;
     261    }
     262    inline bool GenParticle::is_beam() const {
     263        return ( m_status==4 ) ?  true : false;
     264    }
     265
    227266} // HepMC
    228267
  • trunk/Utilities/HepMC/interface/GenVertex.h

    r349 r572  
    2424#include "WeightContainer.h"
    2525#include "SimpleVector.h"
     26#include "IteratorRange.h"
    2627#include <iostream>
    2728#include <iterator>
     
    2930#include <set>
    3031#include <algorithm>
     32#include <cstddef>
    3133
    3234namespace HepMC {
    3335
    34     /// type of iteration
    35     enum IteratorRange { parents, children, family,
    36                          ancestors, descendants, relatives };
     36    class GenVertexParticleRange;
     37    class GenParticleProductionRange;
     38    class ConstGenParticleProductionRange;
     39    class GenParticleEndRange;
     40    class ConstGenParticleEndRange;
     41
    3742    class GenParticle;
    3843    class GenEvent;
     
    110115        ///
    111116        /// The barcode is the vertex's reference number, every vertex in the
    112         ///  event has a unique barcode. Vertex barcodes are negative numbers,
    113         ///  particle barcodes are positive numbers.
     117        /// event has a unique barcode. Vertex barcodes are negative numbers,
     118        /// particle barcodes are positive numbers.
     119        ///
     120        /// Please note that the barcodes are intended for internal use within
     121        /// HepMC as a unique identifier for the particles and vertices.
     122        /// Using the barcode to encode extra information is an abuse of
     123        /// the barcode data member and causes confusion among users.
     124        ///
    114125        int                     barcode() const; //!< unique identifier
    115126
     
    121132        /// const direct access to the weights container
    122133        const WeightContainer&  weights() const;
     134
     135        /// particle range
     136        GenVertexParticleRange particles( IteratorRange range = relatives );
     137        /// incoming particle range
     138        GenParticleProductionRange particles_in( GenParticle&, IteratorRange range = relatives );
     139        /// incoming particle range
     140        ConstGenParticleProductionRange particles_in( GenParticle const &, IteratorRange range = relatives ) const;
     141        /// outgoing particle range
     142        GenParticleEndRange particles_out( GenParticle&, IteratorRange range = relatives );
     143        /// outgoing particle range
     144        ConstGenParticleEndRange particles_out( GenParticle const &, IteratorRange range = relatives ) const;
    123145
    124146        ////////////////////
     
    197219            /// root vertex of this iteration
    198220            const GenVertex*  vertex_root() const;
     221        private:
     222            /// Pre-fix increment -- is not allowed
     223            edge_iterator& operator--(void);
     224            /// Post-fix increment -- is not allowed
     225            edge_iterator  operator--(int);
    199226        private:
    200227            const GenVertex*  m_vertex;
     
    275302                                              recursive_v_iter );
    276303        private:
     304            /// Pre-fix increment -- is not allowed
     305            vertex_iterator&    operator--(void);
     306            /// Post-fix increment -- is not allowed
     307            vertex_iterator     operator--(int);
     308
     309        private:
    277310            GenVertex*       m_vertex;   // the vertex associated to this iter
    278311            IteratorRange    m_range;
  • trunk/Utilities/HepMC/interface/HeavyIon.h

    r349 r572  
    112112    float sigma_inel_NN()                const { return m_sigma_inel_NN; }
    113113
     114    /// verify that the instance contains non-zero information
     115    bool  is_valid()                     const;
     116
    114117  // ---  mutators:
    115118    /// set number of hard scatterings
     
    158161};
    159162
     163// Free Functions
     164
     165/// Write the contents of HeavyIon to an output stream.
     166std::ostream & operator << (std::ostream &, HeavyIon const *);
     167/// Read the contents of HeavyIon from an input stream.
     168std::istream & operator >> (std::istream &, HeavyIon *);
     169
    160170// inline operators
    161171  /// Required members are
     
    248258}
    249259
     260inline bool  HeavyIon::is_valid() const
     261{
     262    if( m_Ncoll_hard != 0 ) return true;
     263    if( m_Npart_proj != 0 ) return true;
     264    if( m_Npart_targ != 0 ) return true;
     265    if( m_Ncoll != 0 ) return true;
     266    if( m_spectator_neutrons != 0 ) return true;
     267    if( m_spectator_protons != 0 ) return true;
     268    if( m_N_Nwounded_collisions != 0 ) return true;
     269    if( m_Nwounded_N_collisions != 0 ) return true;
     270    if( m_Nwounded_Nwounded_collisions != 0 ) return true;
     271    if( m_impact_parameter != 0 ) return true;
     272    if( m_event_plane_angle != 0 ) return true;
     273    if( m_eccentricity != 0 ) return true;
     274    if( m_sigma_inel_NN != 0 ) return true;
     275    return false;
     276}
     277
    250278} // HepMC
    251279
  • trunk/Utilities/HepMC/interface/IO_AsciiParticles.h

    r349 r572  
    88//////////////////////////////////////////////////////////////////////////
    99//
    10 // Strategy for reading or writing events/particleData as machine readable
     10// Strategy for reading or writing events as machine readable
    1111//  ascii to a file. When instantiating, the mode of file to be created
    1212//  must be specified. Options are:
     
    4848    ///
    4949    /// \class IO_AsciiParticles
    50     /// Strategy for reading or writing events/particleData as machine readable
     50    /// Strategy for reading or writing events as machine readable
    5151    ///  ascii to a file. When instantiating, the mode of file to be created
    5252    ///  must be specified.
     
    6363        /// get the next event
    6464        bool          fill_next_event( GenEvent* evt );
    65     inline void          write_particle_data_table(const ParticleDataTable*);
    66     inline bool          fill_particle_data_table( ParticleDataTable* );
    6765        /// insert a comment directly into the output file --- normally you
    6866        ///  only want to do this at the beginning or end of the file. All
     
    10098    inline void IO_AsciiParticles::setPrecision(int iprec) { m_precision=iprec; }
    10199
    102     /////////////////////
    103     // Inline dummies  //
    104     /////////////////////
    105 
    106   void IO_AsciiParticles::write_particle_data_table(const ParticleDataTable*) {;}
    107   bool IO_AsciiParticles::fill_particle_data_table( ParticleDataTable* ) {return false;}
    108 
    109100} // HepMC
    110101
  • trunk/Utilities/HepMC/interface/IO_BaseClass.h

    r349 r572  
    2020
    2121#include <iostream>
    22 #include "ParticleDataTable.h"
    2322#include "GenEvent.h"
    2423
     
    4140        /// fill this GenEvent
    4241        virtual bool fill_next_event( GenEvent* ) =0;
    43         /// write this ParticleDataTable
    44         virtual void write_particle_data_table( const ParticleDataTable* ) =0;
    45         /// fill this ParticleDataTable
    46         virtual bool fill_particle_data_table( ParticleDataTable* ) =0;
    4742        /// write output to ostr
    4843        virtual void print( std::ostream& ostr = std::cout ) const;
    4944        //
    50         // the read_next_event() and read_particle_data_table() differ from
    51         // the fill_***() methods in that they create a new event or pdt
     45        // the read_next_event() differs from
     46        // the fill_***() methods in that it creates a new event
    5247        // before calling the  corresponding fill_*** method
    5348        // (they are not intended to be over-ridden)
    5449        GenEvent*    read_next_event();  //!< do not over-ride
    55         ParticleDataTable* read_particle_data_table();  //!< do not over-ride
    5650        //
    5751        // The overloaded stream operators >>,<< are identical to
     
    7266        /// the same as write_event
    7367        virtual       GenEvent*& operator<<( GenEvent*& );
    74         /// the same as read_particle_data_table
    75         virtual       ParticleDataTable*& operator>>( ParticleDataTable*& );
    76         /// the same as write_particle_data_table
    77         virtual const ParticleDataTable*& operator<<( const
    78                                                       ParticleDataTable*& );
    79         /// the same as write_particle_data_table
    80         virtual       ParticleDataTable*& operator<<( ParticleDataTable*& );
    8168    };
    8269
     
    9885        //       since this statement is rarely reached
    9986        delete evt;
    100         return 0;
    101     }
    102 
    103     inline ParticleDataTable* IO_BaseClass::read_particle_data_table() {
    104         /// creates a new particle data table and fills it by calling
    105         /// the sister method read_particle_data_table( ParticleDataTable* )
    106         //
    107         // 1. create an empty pdt
    108         ParticleDataTable* pdt = new ParticleDataTable();
    109         // 2. fill the pdt container - if the read is successful, return the
    110         //    pointer, otherwise return null and delete the evt
    111         if ( fill_particle_data_table( pdt ) ) return pdt;
    112         // next statement is only reached if read fails
    113         delete pdt;
    11487        return 0;
    11588    }
     
    135108    }
    136109
    137     inline ParticleDataTable*& IO_BaseClass::operator>>(
    138                                            ParticleDataTable*& pdt ){
    139         pdt = read_particle_data_table();
    140         return pdt;
    141     }
    142 
    143     inline const ParticleDataTable*& IO_BaseClass::operator<<(
    144                                              const ParticleDataTable*& pdt ) {
    145         write_particle_data_table( pdt );
    146         return pdt;
    147     }
    148 
    149     inline ParticleDataTable*& IO_BaseClass::operator<<(
    150                                                     ParticleDataTable*& pdt ) {
    151         write_particle_data_table( pdt );
    152         return pdt;
    153     }
    154 
    155110} // HepMC
    156111
  • trunk/Utilities/HepMC/interface/IO_GenEvent.h

    r349 r572  
    1616#include <vector>
    1717#include "IO_BaseClass.h"
    18 #include "TempParticleMap.h"
    19 #include "CommonIO.h"
     18#include "IO_Exception.h"
    2019#include "Units.h"
    2120
    2221namespace HepMC {
    2322
    24     class GenEvent;
    25     class GenVertex;
    26     class GenParticle;
    27     class ParticleData;
    28     class HeavyIon;
    29     class PdfInfo;
     23class GenEvent;
     24class GenVertex;
     25class GenParticle;
     26class HeavyIon;
     27class PdfInfo;
    3028
    31     //! IO_GenEvent also deals with HeavyIon and PdfInfo
     29//! IO_GenEvent also deals with HeavyIon and PdfInfo
    3230
    33     ///
    34     /// \class  IO_GenEvent
    35     /// event input/output in ascii format for machine reading
    36     /// extended format contains HeavyIon and PdfInfo classes
    37     ///
    38     /// Strategy for reading or writing events using iostreams
    39     /// When instantiating with a file name, the mode of file to be created
    40     ///  must be specified. Options are:
    41     ///      std::ios::in     open file for input
    42     ///      std::ios::out    open file for output
    43     ///      std::ios::trunc  erase old file when opening (i.e. ios::out|ios::trunc
    44     ///                    removes oldfile, and creates a new one for output )
    45     ///      std::ios::app    append output to end of file
    46     ///  for the purposes of this class, simultaneous input and output mode
    47     ///  ( std::ios::in | std::ios::out ) is not allowed.
    48     ///
    49     /// Event listings are preceded by the key:
    50     ///  "HepMC::IO_GenEvent-START_EVENT_LISTING\n"
    51     ///  and terminated by the key:
    52     ///  "HepMC::IO_GenEvent-END_EVENT_LISTING\n"
    53     /// GenParticle Data tables are preceded by the key:
    54     ///  "HepMC::IO_GenEvent-START_PARTICLE_DATA\n"
    55     ///  and terminated by the key:
    56     ///  "HepMC::IO_GenEvent-END_PARTICLE_DATA\n"
    57     /// Comments are allowed. They need not be preceded by anything, though if
    58     ///  a comment is written using write_comment( const string ) then it will be
    59     ///  preceded by "HepMC::IO_GenEvent-COMMENT\n"
    60     /// Each event, vertex, particle, particle data, heavy ion, or pdf info line
    61     ///  is preceded by   "E ","V ","P ","D ","H ","F "    respectively.
    62     /// Comments may appear anywhere in the file -- so long as they do not contain
    63     ///  any of the start/stop keys.
    64     ///
    65     class IO_GenEvent : public IO_BaseClass {
    66     public:
    67         /// constructor requiring a file name and std::ios mode
    68         IO_GenEvent( const std::string& filename="IO_GenEvent.dat",
    69                   std::ios::openmode mode=std::ios::out );
    70         /// constructor requiring an input stream
    71         IO_GenEvent( std::istream & );
    72         /// constructor requiring an output stream
    73         IO_GenEvent( std::ostream & );
    74         virtual       ~IO_GenEvent();
     31///
     32/// \class  IO_GenEvent
     33/// event input/output in ascii format for machine reading
     34/// extended format contains HeavyIon and PdfInfo classes
     35///
     36/// Strategy for reading or writing events using iostreams
     37/// When instantiating with a file name, the mode of file to be created
     38///  must be specified. Options are:
     39///      std::ios::in     open file for input
     40///      std::ios::out    open file for output
     41///      std::ios::trunc  erase old file when opening (i.e. ios::out|ios::trunc
     42///                    removes oldfile, and creates a new one for output )
     43///      std::ios::app    append output to end of file
     44///  for the purposes of this class, simultaneous input and output mode
     45///  ( std::ios::in | std::ios::out ) is not allowed.
     46///
     47/// Event listings are preceded by the key:
     48///  "HepMC::IO_GenEvent-START_EVENT_LISTING\n"
     49///  and terminated by the key:
     50///  "HepMC::IO_GenEvent-END_EVENT_LISTING\n"
     51/// GenParticle Data tables are preceded by the key:
     52///  "HepMC::IO_GenEvent-START_PARTICLE_DATA\n"
     53///  and terminated by the key:
     54///  "HepMC::IO_GenEvent-END_PARTICLE_DATA\n"
     55/// Comments are allowed. They need not be preceded by anything, though if
     56///  a comment is written using write_comment( const string ) then it will be
     57///  preceded by "HepMC::IO_GenEvent-COMMENT\n"
     58/// Each event, vertex, particle, particle data, heavy ion, or pdf info line
     59///  is preceded by   "E ","V ","P ","D ","H ","F "    respectively.
     60/// Comments may appear anywhere in the file -- so long as they do not contain
     61///  any of the start/stop keys.
     62///
     63class IO_GenEvent : public IO_BaseClass {
     64public:
     65    /// constructor requiring a file name and std::ios mode
     66    IO_GenEvent( const std::string& filename="IO_GenEvent.dat",
     67              std::ios::openmode mode=std::ios::out );
     68    /// constructor requiring an input stream
     69    IO_GenEvent( std::istream & );
     70    /// constructor requiring an output stream
     71    IO_GenEvent( std::ostream & );
     72    virtual       ~IO_GenEvent();
    7573
    76         /// write this event
    77         void          write_event( const GenEvent* evt );
    78         /// get the next event
    79         bool          fill_next_event( GenEvent* evt );
    80         void          write_particle_data_table(const ParticleDataTable*);
    81         bool          fill_particle_data_table( ParticleDataTable* );
    82         /// insert a comment directly into the output file --- normally you
    83         ///  only want to do this at the beginning or end of the file. All
    84         ///  comments are preceded with "HepMC::IO_GenEvent-COMMENT\n"
    85         void          write_comment( const std::string comment );
     74    /// write this event
     75    void          write_event( const GenEvent* evt );
     76    /// get the next event
     77    bool          fill_next_event( GenEvent* evt );
     78    /// insert a comment directly into the output file --- normally you
     79    ///  only want to do this at the beginning or end of the file. All
     80    ///  comments are preceded with "HepMC::IO_GenEvent-COMMENT\n"
     81    void          write_comment( const std::string comment );
    8682
    87         int           rdstate() const;  //!< check the state of the IO stream
    88         void          clear();  //!< clear the IO stream
     83    int           rdstate() const;  //!< check the state of the IO stream
     84    void          clear();  //!< clear the IO stream
    8985
    90         /// write to ostr
    91         void          print( std::ostream& ostr = std::cout ) const;
     86    /// write to ostr
     87    void          print( std::ostream& ostr = std::cout ) const;
    9288
    93         /// needed when reading a file without units if those units are
    94         /// different than the declared default units
    95         /// (e.g., the default units are MeV, but the file was written with GeV)
    96         /// This method is not necessary if the units are written in the file
    97         void use_input_units( Units::MomentumUnit, Units::LengthUnit );
     89    /// needed when reading a file without units if those units are
     90    /// different than the declared default units
     91    /// (e.g., the default units are MeV, but the file was written with GeV)
     92    /// This method is not necessary if the units are written in the file
     93    void use_input_units( Units::MomentumUnit, Units::LengthUnit );
    9894
    99     protected: // for internal use only
    100         /// write vertex information
    101         void          write_vertex( GenVertex* );
    102         /// write beam particle information
    103         void          write_beam_particles( std::pair<HepMC::GenParticle *,HepMC::GenParticle *> );
    104         /// write heavy ion information
    105         void          write_heavy_ion( HeavyIon const * );
    106         /// write PDF information
    107         void          write_pdf_info( PdfInfo const * );
    108         /// write units
    109         void          write_unit_info( const GenEvent* evt );
    110         /// write particle information
    111         void          write_particle( GenParticle* p );
    112         /// write particle data information
    113         void          write_particle_data( const ParticleData* d );
    114         /// read vertex information
    115         GenVertex*    read_vertex( TempParticleMap& particle_to_end_vertex );
    116         /// read GenParticle information
    117         GenParticle*  read_particle( TempParticleMap& particle_to_end_vertex );
    118         /// read particle data table information
    119         ParticleData* read_particle_data( ParticleDataTable* );
    120         /// read heavy ion information
    121         HeavyIon*     read_heavy_ion(  );
    122         /// read units
    123         void          read_unit_info( GenEvent* evt );
    124         /// write end tag
    125         bool          write_end_listing();
     95    /// set output precision
     96    /// The default precision is 16.
     97    void precision( int );
     98       
     99    /// integer (enum) associated with read error
     100    int           error_type()    const;
     101    /// the read error message string
     102    const std::string & error_message() const;
    126103
    127         void          output( const double& );  //!< write double
    128         void          output( const float& );  //!< write float
    129         void          output( const int& ); //!< write int
    130         void          output( const long& ); //!< write long
    131         void          output( const char& );  //!< write a single character
    132     private: // use of copy constructor is not allowed
    133         IO_GenEvent( const IO_GenEvent& ) : IO_BaseClass() {}
    134     private: // data members
    135         std::ios::openmode  m_mode;
    136         std::fstream        m_file;
    137         std::ostream *      m_ostr;
    138         std::istream *      m_istr;
    139         std::ios *          m_iostr;
    140         bool                m_finished_first_event_io;
    141         bool                m_have_file;
    142         CommonIO            m_common_io;
    143        
    144     };
     104private: // use of copy constructor is not allowed
     105    IO_GenEvent( const IO_GenEvent& ) : IO_BaseClass() {}
    145106
    146     //////////////
    147     // Inlines  //
    148     //////////////
     107private: // data members
     108    std::ios::openmode  m_mode;
     109    std::fstream        m_file;
     110    std::ostream *      m_ostr;
     111    std::istream *      m_istr;
     112    std::ios *          m_iostr;
     113    bool                m_have_file;
     114    IO_Exception::ErrorType m_error_type;
     115    std::string         m_error_message;
    149116
    150     inline void IO_GenEvent::output( const double& d ) {
    151         if( m_ostr  ) {
    152             if ( d == 0. ) {
    153                 *m_ostr << ' ' << (int)0;
    154             } else {
    155                 *m_ostr << ' ' << d;
    156             }
    157         }
     117};
     118
     119//////////////
     120// Inlines  //
     121//////////////
     122
     123inline int  IO_GenEvent::rdstate() const {
     124    int state;
     125    if( m_istr ) {
     126        state =  (int)m_istr->rdstate();
     127    } else {
     128        state =  (int)m_ostr->rdstate();
    158129    }
    159     inline void IO_GenEvent::output( const float& d ) {
    160         if( m_ostr  ) {
    161             if ( d == 0. ) {
    162                 *m_ostr << ' ' << (int)0;
    163             } else {
    164                 *m_ostr << ' ' << d;
    165             }
    166         }
     130    return state;
     131}
     132
     133inline void IO_GenEvent::clear() {
     134    if( m_istr ) {
     135        m_istr->clear();
     136    } else {
     137        m_ostr->clear();
    167138    }
    168     inline void IO_GenEvent::output( const int& i ) {
    169         if( m_ostr  ) {
    170             if ( i == 0. ) {
    171                 *m_ostr << ' ' << (int)0;
    172             } else {
    173                 *m_ostr << ' ' << i;
    174             }
    175         }
    176     }
    177     inline void IO_GenEvent::output( const long& i ) {
    178         if( m_ostr  ) {
    179             if ( i == 0. ) {
    180                 *m_ostr << ' ' << (int)0;
    181             } else {
    182                 *m_ostr << ' ' << i;
    183             }
    184         }
    185     }
    186     inline void IO_GenEvent::output( const char& c ) {
    187         if( m_ostr  ) {
    188             if ( c ) {
    189                 *m_ostr << c;
    190             } else {
    191                 *m_ostr << ' ' ;
    192             }
    193         }
    194     }
    195     inline int  IO_GenEvent::rdstate() const {
    196         int state;
    197         if( m_istr ) {
    198             state =  (int)m_istr->rdstate();
    199         } else {
    200             state =  (int)m_ostr->rdstate();
    201         }
    202         return state;
    203     }
    204     inline void IO_GenEvent::clear() {
    205         if( m_istr ) {
    206             m_istr->clear();
    207         } else {
    208             m_ostr->clear();
    209         }
    210     }
    211     // these are required by IO_BaseClass, but not used here
    212     inline void IO_GenEvent::write_particle_data_table(const ParticleDataTable*) {;}
    213     inline bool IO_GenEvent::fill_particle_data_table( ParticleDataTable* )
    214     { return false;}
     139}
     140
     141inline int IO_GenEvent::error_type() const {
     142    return m_error_type;
     143}
     144
     145inline const std::string & IO_GenEvent::error_message() const {
     146    return m_error_message;
     147}
    215148
    216149} // HepMC
  • trunk/Utilities/HepMC/interface/PdfInfo.h

    r349 r572  
    9191    double pdf2()                 const { return m_pdf2; }
    9292
     93    /// verify that the instance contains non-zero information
     94    bool  is_valid()                     const;
     95
    9396  // ---  mutators:
    9497    /// set flavour code of first parton
     
    124127};
    125128
     129// Free Functions
     130
     131// IO
     132std::ostream & operator << (std::ostream &, PdfInfo const *);
     133std::istream & operator >> (std::istream &, PdfInfo *);
     134
    126135// inline operators
    127136inline PdfInfo::PdfInfo( int i1, int i2, double x1, double x2,
     
    191200}
    192201
     202inline bool  PdfInfo::is_valid() const
     203{
     204    if( m_id1 != 0 ) return true;
     205    if( m_id2 != 0 ) return true;
     206    if( m_pdf_id1 != 0 ) return true;
     207    if( m_pdf_id2 != 0 ) return true;
     208    if( m_x1 != 0 ) return true;
     209    if( m_x2 != 0 ) return true;
     210    if( m_scalePDF != 0 ) return true;
     211    if( m_pdf1 != 0 ) return true;
     212    if( m_pdf2 != 0 ) return true;
     213    return false;
     214}
     215
    193216} // HepMC
    194217
  • trunk/Utilities/HepMC/interface/Polarization.h

    r349 r572  
    3434    public:
    3535        /// default constructor
    36         Polarization( double theta = 0, double phi = 0 );
     36        Polarization( );
     37        /// constructor requiring at least one value
     38        Polarization( double theta, double phi = 0 );
    3739        /// construct from another polarization object
    3840        Polarization( const Polarization& inpolar );
     
    5961        double        phi() const;      //!< returns azimuthal angle in radians
    6062        ThreeVector   normal3d() const; //!< unit 3 vector for easy manipulation
     63        bool          is_defined() const;   //!< returns true if the Polarization has been defined
    6164
    6265        /// set polar angle in radians
     
    6871        /// sets polarization according to direction of 3 vec
    6972        ThreeVector   set_normal3d( const ThreeVector& vec3in );
     73        /// declares the Polarization as undefined and zeros the values
     74        void          set_undefined();
    7075
    7176    private:
     
    7883        double m_theta; //polar angle of polarization in radians 0< theta <pi
    7984        double m_phi;   //azimuthal angle of polarization in rad. 0< phi <2pi
     85        bool   m_defined; //used to flag if the Polarization has been defined
    8086    };
    8187
     
    9399    inline bool Polarization::operator==( const Polarization& a ) const
    94100    {
    95         return ( a.theta() == this->theta() && a.phi() == this->phi() );
     101        return ( a.theta() == this->theta() && a.phi() == this->phi() && a.is_defined() == this->is_defined() );
    96102    }
    97103
  • trunk/Utilities/HepMC/interface/SimpleVector.h

    r349 r572  
    8383  double perp2() const;  //!< Transverse component of the spatial vector squared.
    8484  double perp() const;   //!< Transverse component of the spatial vector (R in cylindrical system).
    85   double mag() const;    //!< Magnitude of the spatial vector
    8685
    8786  // Get spatial vector components in spherical coordinate system.
     
    167166  double r()     const;  //!< The magnitude
    168167
    169   double mag() const;  //!< The magnitude (r in spherical coordinate system).
    170 
    171   void setPhi(double);  //!< Set phi keeping mag and theta constant (BaBar).
    172   void setTheta(double);  //!< Set theta keeping mag and phi constant (BaBar).
     168  void setPhi(double);  //!< Set phi keeping magnitude and theta constant (BaBar).
     169  void setTheta(double);  //!< Set theta keeping magnitude and phi constant (BaBar).
    173170
    174171  double perp2() const;  //!< The transverse component squared (rho^2 in cylindrical coordinate system).
  • trunk/Utilities/HepMC/interface/SimpleVector.icc

    r349 r572  
    4949}
    5050
    51 inline double  FourVector::mag() const {
    52 return std::sqrt( m_x*m_x + m_y*m_y + m_z*m_z );
    53 }
    54 
    5551inline double FourVector::perp2() const { return m_x*m_x + m_y*m_y; }
    5652
     
    7874
    7975inline double FourVector::pseudoRapidity() const {
    80   double m = mag();
     76  double m = std::sqrt( m_x*m_x + m_y*m_y + m_z*m_z );
    8177  if ( m==  0   ) return  0.0;   
    8278  if ( m==  z() ) return  1.0E72;
     
    106102}
    107103
    108 inline double  ThreeVector::mag() const {
     104inline double ThreeVector::r()    const {
    109105return std::sqrt( m_x*m_x + m_y*m_y + m_z*m_z );
    110106}
    111 
    112 inline double ThreeVector::r()    const { return mag(); }
    113107
    114108inline void ThreeVector::set(double x, double y, double z) {
     
    125119
    126120inline void ThreeVector::setTheta(double th) {
    127   double ma   = mag();
     121  double ma   = r();
    128122  double ph   = phi();
    129123  setX(ma*std::sin(th)*std::cos(ph));
  • trunk/Utilities/HepMC/interface/TempParticleMap.h

    r349 r572  
    6060        m_particle_order[p->barcode()] = p;
    6161        m_particle_to_end_vertex[p] = end_vtx_code;
    62     }
     62    }       
    6363
    6464} // HepMC
  • trunk/Utilities/HepMC/interface/Version.h

    r349 r572  
    1212#include <string>
    1313#include <iostream>
     14#include "HepMCDefs.h"
    1415
    1516namespace HepMC {
    1617
    17 void version( );                        //!< print HepMC version
     18void version( std::ostream & os = std::cout );                  //!< print HepMC version
    1819void writeVersion( std::ostream & os ); //!< write HepMC version to os
    1920std::string versionName( );     //!< return HepMC version
     
    2122inline std::string versionName( )
    2223{
    23     return "2.04.01";
     24    return HEPMC_VERSION;
    2425}
    2526
    26 inline void version( )
     27inline void version( std::ostream & os )
    2728{
    28     std::cout << " --------------- HepMC Version " << versionName()
    29               << " --------------- " << std::endl;
     29    os << " --------------- HepMC Version " << versionName()
     30       << " --------------- " << std::endl;
    3031}
    3132
  • trunk/Utilities/HepMC/interface/WeightContainer.h

    r349 r572  
    99//
    1010// Container for the Weights associated with an event or vertex.
    11 // Basically just an interface to STL vector.
     11//
     12// This implementation adds a map-like interface in addition to the
     13// vector-like interface.
    1214//////////////////////////////////////////////////////////////////////////
    1315
    1416#include <iostream>
    1517#include <vector>
     18#include <string>
     19#include <map>
    1620
    1721namespace HepMC {
     
    2125    ///
    2226    /// \class  WeightContainer
    23     /// Basically just an interface to STL vector.
     27    /// This class has both map-like and vector-like functionality.
     28    /// Named weights are now supported.
    2429    class WeightContainer {
     30        friend class GenEvent;
    2531
    2632    public:
     33        /// defining the size type used by vector and map
     34        typedef std::size_t size_type;
     35        /// iterator for the weight container
     36        typedef std::vector<double>::iterator iterator;
     37        /// const iterator for the weight container
     38        typedef std::vector<double>::const_iterator const_iterator;
     39       
    2740        /// default constructor
    28         WeightContainer( unsigned int n = 0, const double& value = 0. );
     41        explicit WeightContainer( size_type n = 0, double value = 0. );
    2942        /// construct from a vector of weights
    3043        WeightContainer( const std::vector<double>& weights );
    3144        /// copy
    3245        WeightContainer( const WeightContainer& in );
    33         virtual ~WeightContainer();
     46        ~WeightContainer();
    3447
    3548        /// swap
    3649        void swap( WeightContainer & other);
    37         /// copy
     50        /// copy assignment
    3851        WeightContainer& operator=( const WeightContainer& );
    39         /// copy
     52        /// alternate assignment using a vector of doubles
    4053        WeightContainer& operator=( const std::vector<double>& in );
    4154
    4255        /// print weights
    4356        void          print( std::ostream& ostr = std::cout ) const;
     57        /// write weights in a readable table
     58        void          write( std::ostream& ostr = std::cout ) const;
    4459
    4560        /// size of weight container
    46         int           size() const;
     61        size_type     size() const;
    4762        /// return true if weight container is empty
    4863        bool          empty() const;
     
    5469        void          clear();
    5570
    56         /// access the weight container
    57         double&       operator[]( unsigned int n );  // unchecked access
    58         /// access the weight container
    59         const double& operator[]( unsigned int n ) const;
    60        
     71        /// check to see if a name exists in the map
     72        bool          has_key( const std::string& s ) const;
     73
     74        /// access the weight container
     75        double&       operator[]( size_type n );  // unchecked access
     76        /// access the weight container
     77        const double& operator[]( size_type n ) const;
     78        /// access the weight container
     79        double&       operator[]( const std::string& s );  // unchecked access
     80        /// access the weight container
     81        const double& operator[]( const std::string& s ) const;
     82
     83        /// equality
     84        bool operator==( const WeightContainer & ) const;
     85        /// inequality
     86        bool operator!=( const WeightContainer & ) const;
     87       
    6188        /// returns the first element
    6289        double&       front();
     
    6895        const double& back() const;
    6996
    70         /// iterator for the weight container
    71         typedef std::vector<double>::iterator iterator;
     97        /// begining of the weight container
     98        iterator            begin();
     99        /// end of the weight container
     100        iterator            end();
     101        /// begining of the weight container
     102        const_iterator      begin() const;
     103        /// end of the weight container
     104        const_iterator      end() const;
     105
     106    private:
     107        // for internal use only
     108
     109        /// maplike iterator for the weight container
     110        /// for internal use only
     111        typedef std::map<std::string,size_type>::iterator       map_iterator;
    72112        /// const iterator for the weight container
    73         typedef std::vector<double>::const_iterator const_iterator;
    74         /// begining of the weight container
    75         iterator            begin();
    76         /// end of the weight container
    77         iterator            end();
    78         /// begining of the weight container
    79         const_iterator      begin() const;
    80         /// end of the weight container
    81         const_iterator      end() const;
     113        /// for internal use only
     114        typedef std::map<std::string,size_type>::const_iterator const_map_iterator;
     115        /// begining of the weight container
     116        /// for internal use only
     117        map_iterator            map_begin();
     118        /// end of the weight container
     119        /// for internal use only
     120        map_iterator            map_end();
     121        /// begining of the weight container
     122        /// for internal use only
     123        const_map_iterator      map_begin() const;
     124        /// end of the weight container
     125        /// for internal use only
     126        const_map_iterator      map_end() const;
     127       
     128        /// used by the constructors to set initial names
     129        /// for internal use only
     130        void set_default_names( size_type n );
    82131       
    83132    private:
    84         std::vector<double>  m_weights;
     133        std::vector<double>          m_weights;
     134        std::map<std::string,size_type> m_names;
    85135    };
    86136
     
    89139    ///////////////////////////
    90140
    91     inline WeightContainer::WeightContainer( unsigned int n,
    92                                              const double& value )
    93         : m_weights(n,value)
     141    inline WeightContainer::WeightContainer( const WeightContainer& in )
     142        : m_weights(in.m_weights), m_names(in.m_names)
    94143    {}
    95144
    96     inline WeightContainer::WeightContainer( const std::vector<double>& wgts )
    97         : m_weights(wgts)
    98     {}
    99 
    100     inline WeightContainer::WeightContainer( const WeightContainer& in )
    101         : m_weights(in.m_weights)
    102     {}
    103 
    104145    inline WeightContainer::~WeightContainer() {}
    105146
    106147    inline void WeightContainer::swap( WeightContainer & other)
    107     { m_weights.swap( other.m_weights ); }
     148    {
     149        m_weights.swap( other.m_weights );
     150        m_names.swap( other.m_names );
     151    }
    108152
    109153    inline WeightContainer& WeightContainer::operator=
     
    123167    }
    124168
    125     inline void WeightContainer::print( std::ostream& ostr ) const
     169    inline WeightContainer::size_type WeightContainer::size() const { return m_weights.size(); }
     170
     171    inline bool WeightContainer::empty() const { return m_weights.empty(); }
     172
     173    inline void WeightContainer::clear()
    126174    {
    127         for ( const_iterator w = begin(); w != end(); ++w )
    128         {
    129             ostr << *w << " ";
    130         }
    131         ostr << std::endl;
    132     }
    133 
    134     inline int WeightContainer::size() const { return m_weights.size(); }
    135 
    136     inline bool WeightContainer::empty() const { return m_weights.empty(); }
    137 
    138     inline void WeightContainer::push_back( const double& value)
    139     { m_weights.push_back(value); }
    140 
    141     inline void WeightContainer::pop_back() { m_weights.pop_back(); }
    142 
    143     inline void WeightContainer::clear() { m_weights.clear(); }
    144 
    145     inline double& WeightContainer::operator[]( unsigned int n )
    146     { return m_weights[(int)n]; }
    147 
    148     inline const double& WeightContainer::operator[]( unsigned int n ) const
    149     { return m_weights[(int)n]; }
     175        m_weights.clear();
     176        m_names.clear();
     177    }
     178
     179    inline double& WeightContainer::operator[]( size_type n )
     180    { return m_weights[n]; }
     181
     182    inline const double& WeightContainer::operator[]( size_type n ) const
     183    { return m_weights[n]; }
    150184
    151185    inline double& WeightContainer::front() { return m_weights.front(); }
     
    171205    { return m_weights.end(); }
    172206
     207    inline WeightContainer::map_iterator WeightContainer::map_begin()
     208    { return m_names.begin(); }
     209
     210    inline WeightContainer::map_iterator WeightContainer::map_end()
     211    { return m_names.end(); }
     212
     213    inline WeightContainer::const_map_iterator WeightContainer::map_begin() const
     214    { return m_names.begin(); }
     215
     216    inline WeightContainer::const_map_iterator WeightContainer::map_end() const
     217    { return m_names.end(); }
     218
    173219} // HepMC
    174220
Note: See TracChangeset for help on using the changeset viewer.