Index: trunk/Utilities/HepMC/interface/CommonIO.h
===================================================================
--- trunk/Utilities/HepMC/interface/CommonIO.h	(revision 572)
+++ 	(revision )
@@ -1,147 +1,0 @@
-#ifndef HEPMC_COMMON_IO_H
-#define HEPMC_COMMON_IO_H
-// ----------------------------------------------------------------------
-//
-// CommonIO.h
-// Author:  Lynn Garren
-//
-//  Allowed keys used at the beginning and end of HepMC data dumps
-//
-// ----------------------------------------------------------------------
-
-#include <fstream>
-#include <string>
-
-#include "GenEvent.h"
-#include "TempParticleMap.h"
-#include "ParticleDataTable.h"
-
-namespace HepMC {
-
-/// The known_io enum is used to track which type of input is being read
-enum known_io { gen=1, ascii, extascii, ascii_pdt, extascii_pdt };
-
-class CommonIO {
-
-public:
-
-  CommonIO();
-  ~CommonIO() {;}
-
-  // input keys - IO_GenEvent is strongly recommended
-  std::string IO_GenEvent_Key()          const { return m_io_genevent_start; }
-  std::string IO_GenEvent_End()          const { return m_io_genevent_end; }
-  // IO_Ascii is deprecated, but we want to be able to read these files
-  std::string IO_Ascii_Key()             const { return m_io_ascii_start; }
-  std::string IO_Ascii_End()             const { return m_io_ascii_end; }
-  // IO_ExtendedAscii has been removed, but we want to be able to read these files
-  std::string IO_ExtendedAscii_Key()     const { return m_io_extendedascii_start; }
-  std::string IO_ExtendedAscii_End()     const { return m_io_extendedascii_end; }
-  /// get IO type
-  int io_type() const { return m_io_type; }
-
-  // write keys
-  void write_IO_GenEvent_Key( std::ostream& );
-  void write_IO_GenEvent_End( std::ostream& );
-  // write keys for deprecated IO methods
-  void write_IO_Ascii_Key( std::ostream& );
-  void write_IO_Ascii_End( std::ostream& );
-  // write keys for deprecated particle data IO methods
-  void write_IO_Ascii_PDT_Key( std::ostream& );
-  void write_IO_Ascii_PDT_End( std::ostream& );
-
-  // methods to read input
-
-  /// look for line type (key)
-  int find_file_type( std::istream& );
-
-  /// look for line type (key)
-  int find_end_key( std::istream& );
-
-  bool read_io_ascii( std::istream* is, GenEvent* evt );
-
-  bool read_io_extendedascii( std::istream* is, GenEvent* evt );
-
-  bool read_io_genevent( std::istream* is, GenEvent* evt );
-
-  bool read_units( std::istream* is, GenEvent* evt );
-
-  /// needed when reading a file without units if those units are 
-  /// different than the declared default units 
-  /// (e.g., the default units are MeV, but the file was written with GeV)
-  /// This method is not necessary if the units are written in the file
-  void use_input_units( Units::MomentumUnit, Units::LengthUnit );
-
-  /// ParticleDataTable is deprecated.
-  /// We include this method for reading old files which may have ParticleData information.
-  bool read_io_particle_data_table( std::istream*, ParticleDataTable* );
- 
-protected:
-  // methods used by the read_io* methods
-  HeavyIon*    read_heavy_ion( std::istream* );
-  PdfInfo*     read_pdf_info( std::istream* );
-  GenParticle* read_particle( std::istream*, TempParticleMap&  );
-  GenVertex*   read_vertex( std::istream*, TempParticleMap&  );
-  /// ParticleDataTable is deprecated.
-  /// We include this method for reading old files which may have ParticleData information.
-  ParticleData* read_particle_data( std::istream*, ParticleDataTable* );
-
-private:
-  std::string m_io_genevent_start;
-  std::string m_io_ascii_start;
-  std::string m_io_extendedascii_start;
-  std::string m_io_genevent_end;
-  std::string m_io_ascii_end;
-  std::string m_io_extendedascii_end;
-  // particle data method keys
-  std::string m_io_ascii_pdt_start;
-  std::string m_io_extendedascii_pdt_start;
-  std::string m_io_ascii_pdt_end;
-  std::string m_io_extendedascii_pdt_end;
-  // io type
-  int         m_io_type;
-  // default io units - used only when reading a file with no units
-  Units::MomentumUnit m_io_momentum_unit;
-  Units::LengthUnit   m_io_position_unit;
-
-};
-
-// inline methods
-
-inline CommonIO::CommonIO()
-: m_io_genevent_start("HepMC::IO_GenEvent-START_EVENT_LISTING"),
-  m_io_ascii_start("HepMC::IO_Ascii-START_EVENT_LISTING"),
-  m_io_extendedascii_start("HepMC::IO_ExtendedAscii-START_EVENT_LISTING"),
-  m_io_genevent_end("HepMC::IO_GenEvent-END_EVENT_LISTING"),
-  m_io_ascii_end("HepMC::IO_Ascii-END_EVENT_LISTING"),
-  m_io_extendedascii_end("HepMC::IO_ExtendedAscii-END_EVENT_LISTING"),
-  m_io_ascii_pdt_start("HepMC::IO_Ascii-START_PARTICLE_DATA"),
-  m_io_extendedascii_pdt_start("HepMC::IO_ExtendedAscii-START_PARTICLE_DATA"),
-  m_io_ascii_pdt_end("HepMC::IO_Ascii-END_PARTICLE_DATA"),
-  m_io_extendedascii_pdt_end("HepMC::IO_ExtendedAscii-END_PARTICLE_DATA"),
-  m_io_type(0),
-  m_io_momentum_unit(Units::default_momentum_unit()),
-  m_io_position_unit(Units::default_length_unit())
-  {}
-
-inline void CommonIO::write_IO_GenEvent_Key( std::ostream& os )
-{ os << m_io_genevent_start << "\n"; }
-
-inline void CommonIO::write_IO_GenEvent_End( std::ostream& os )
-{ os << m_io_genevent_end << "\n"; }
-
-inline void CommonIO::write_IO_Ascii_Key( std::ostream& os )
-{ os << m_io_ascii_start << "\n"; }
-
-inline void CommonIO::write_IO_Ascii_End( std::ostream& os )
-{ os << m_io_ascii_end << "\n"; }
-
-inline void CommonIO::write_IO_Ascii_PDT_Key( std::ostream& os )
-{ os << m_io_ascii_pdt_start << "\n"; }
-
-inline void CommonIO::write_IO_Ascii_PDT_End( std::ostream& os )
-{ os << m_io_ascii_pdt_end << "\n"; }
-
-} // HepMC
-
-#endif // HEPMC_COMMON_IO_H
Index: trunk/Utilities/HepMC/interface/IO_Ascii.h
===================================================================
--- trunk/Utilities/HepMC/interface/IO_Ascii.h	(revision 572)
+++ 	(revision )
@@ -1,134 +1,0 @@
-//--------------------------------------------------------------------------
-#ifndef HEPMC_IO_ASCII_H
-#define HEPMC_IO_ASCII_H
-
-//////////////////////////////////////////////////////////////////////////
-// Matt.Dobbs@Cern.CH, January 2000, refer to:
-// M. Dobbs and J.B. Hansen, "The HepMC C++ Monte Carlo Event Record for
-// High Energy Physics", Computer Physics Communications (to be published).
-//
-// event input/output in ascii format for machine reading
-//////////////////////////////////////////////////////////////////////////
-//
-// Strategy for reading or writing events/particleData as machine readable
-//  ascii to a file. When instantiating, the mode of file to be created 
-//  must be specified. Options are:
-//      std::ios::in     open file for input 
-//      std::ios::out    open file for output
-//      std::ios::trunc  erase old file when opening (i.e. ios::out|ios::trunc
-//                    removes oldfile, and creates a new one for output )
-//      std::ios::app    append output to end of file
-//  for the purposes of this class, simultaneous input and output mode 
-//  ( std::ios::in | std::ios::out ) is not allowed.
-// 
-// Event listings are preceded by the key:
-//  "HepMC::IO_Ascii-START_EVENT_LISTING\n"
-//  and terminated by the key:
-//  "HepMC::IO_Ascii-END_EVENT_LISTING\n"
-// GenParticle Data tables are preceded by the key:
-//  "HepMC::IO_Ascii-START_PARTICLE_DATA\n"
-//  and terminated by the key:
-//  "HepMC::IO_Ascii-END_PARTICLE_DATA\n"
-// Comments are allowed. They need not be preceded by anything, though if
-//  a comment is written using write_comment( const string ) then it will be
-//  preceded by "HepMC::IO_Ascii-COMMENT\n"
-// Each event, vertex, particle, particle data is preceded by 
-//  "E ","V ","P ","D "    respectively.
-// Comments may appear anywhere in the file -- so long as they do not contain
-//  any of the 4 start/stop keys.
-//
-
-#include <fstream>
-#include <string>
-#include <map>
-#include <vector>
-#include "IO_BaseClass.h"
-#include "TempParticleMap.h"
-#include "CommonIO.h"
-
-namespace HepMC {
-
-    class GenEvent;
-    class GenVertex;
-    class GenParticle;
-    class ParticleData;
-
-    //! IO_Ascii is used to read or write from an ascii file
-
-    ///
-    /// \class  IO_Ascii
-    /// Strategy for reading or writing events/particleData as machine readable
-    ///  ascii to a file. When instantiating, the mode of file to be created 
-    ///  must be specified. 
-    ///
-    class IO_Ascii : public IO_BaseClass {
-    public:
-        /// constructor requiring a file name and std::ios mode
-	IO_Ascii( const char* filename="IO_Ascii.dat", 
-		  std::ios::openmode mode=std::ios::out );
-	virtual       ~IO_Ascii();
-
-        /// write this event
-	void          write_event( const GenEvent* evt );
-        /// get the next event
-	bool          fill_next_event( GenEvent* evt );
-	void          write_particle_data_table(const ParticleDataTable*);
-	bool          fill_particle_data_table( ParticleDataTable* );
-	/// insert a comment directly into the output file --- normally you
-	///  only want to do this at the beginning or end of the file. All
-	///  comments are preceded with "HepMC::IO_Ascii-COMMENT\n"
-  	void          write_comment( const std::string comment );
-
-	int           rdstate() const;  //!< check the state of the IO stream
-	void          clear();  //!< clear the IO stream
-
-        /// write to ostr
-	void          print( std::ostream& ostr = std::cout ) const;
-
-    protected: // for internal use only
-	/// write vertex information
-	void          write_vertex( GenVertex* );
-	/// write particle information
-	void          write_particle( GenParticle* p );
-	/// write ParticleDataTable information
-	void          write_particle_data( const ParticleData* d );
-	/// write end tag
-	bool          write_end_listing();
-
-	void          output( const double& );  //!< write double
-	void          output( const int& );  //!< write int
-	void          output( const long int& );  //!< write long int
-	void          output( const char& );  //!< write a single character
-    private: // use of copy constructor is not allowed
-	IO_Ascii( const IO_Ascii& ) : IO_BaseClass() {}
-    private: // data members
-	std::ios::openmode  m_mode;
-	std::fstream        m_file;
-	bool                m_finished_first_event_io;
-	CommonIO            m_common_io;
-    };
-
-    //////////////
-    // Inlines  //
-    //////////////
-
-    inline void IO_Ascii::output( const double& d ) {
-	if ( d == 0. ) {
-	    m_file << ' ' << (int)0;
-	} else {
-	    m_file << ' ' << d;
-	}
-    }
-    inline void IO_Ascii::output( const int& i ) { m_file << ' ' << i; }
-    inline void IO_Ascii::output( const long int& i ) { m_file << ' ' << i; }
-    inline void IO_Ascii::output( const char& c ) { m_file << c; }
-    inline int  IO_Ascii::rdstate() const { return (int)m_file.rdstate(); }
-    inline void IO_Ascii::clear() { m_file.clear(); }
-
-} // HepMC
-
-#endif  // HEPMC_IO_ASCII_H
-//--------------------------------------------------------------------------
-
-
-
Index: trunk/Utilities/HepMC/interface/IO_PDG_ParticleDataTable.h
===================================================================
--- trunk/Utilities/HepMC/interface/IO_PDG_ParticleDataTable.h	(revision 572)
+++ 	(revision )
@@ -1,104 +1,0 @@
-//--------------------------------------------------------------------------
-#ifndef HEPMC_IO_PDG_PARTICLEDATATABLE_H
-#define HEPMC_IO_PDG_PARTICLEDATATABLE_H
-
-//////////////////////////////////////////////////////////////////////////
-// Matt.Dobbs@Cern.CH, November 1999, refer to:
-// M. Dobbs and J.B. Hansen, "The HepMC C++ Monte Carlo Event Record for
-// High Energy Physics", Computer Physics Communications (to be published).
-//
-// Reads a particle data table from file supplied in PDG format
-// For the most recent table see: http://pdg.lbl.gov/computer_read.html
-//////////////////////////////////////////////////////////////////////////
-//
-// Example of reading from file PDG98_ParticleDataTable.txt
-//
-//	IO_PDG_ParticleDataTable pdg_io("PDG98_ParticleDataTable.txt");
-// 	ParticleDataTable pdt = *pdg_io.read_particle_data_table();
-//      (note the read_particle_data_table method comes from the IO_Baseclass)
-//  or
-//	IO_PDG_ParticleDataTable pdg_io("PDG98_ParticleDataTable.txt");
-// 	ParticleDataTable* pdt;
-//      pdg_io >> pdt;       
-//  in both cases IO_PDG_ParticleDataTable creates an instance of the 
-//  ParticleDataTable which the user becomes owner of (i.e. user is 
-//  responsible for deleting)
-//
-// Note the PDG table does not include antiparticles nor quarks (except top)
-// You can make anti-particle entries corresponding to each charged entry with
-// the method make_antiparticles_from_particles() and you can make default
-// entries for the 6 quarks + anti-quarks with the method add_quarks_to_table()
-// Continuing with the above example:
-//      pdt->make_antiparticles_from_particles();
-//      pdg_io.add_quarks_to_table( *pdt );
-//
-
-#include "IO_BaseClass.h"
-#include <fstream>
-
-namespace HepMC {
-
-    class GenEvent;
-
-    //! an example ParticleDataTable IO method
-    
-    ///
-    /// \class IO_PDG_ParticleDataTable
-    /// Example of reading from file PDG98_ParticleDataTable.txt
-    ///
-    class IO_PDG_ParticleDataTable : public IO_BaseClass {
-    public:
-        /// constructor using filename
-	IO_PDG_ParticleDataTable( const char* filename
-				  ="PDG98_ParticleDataTable.txt" );
-	virtual ~IO_PDG_ParticleDataTable();
-	/// read the input and fill the table
-	bool    fill_particle_data_table( ParticleDataTable* );
-	/// add u, d, s, c, b, and t
-	void    add_quarks_to_table( ParticleDataTable& );
-	/// write to ostr
-	void    print( std::ostream& ostr = std::cout ) const;
-
-        /// check the IO state
-	int     rdstate() const { return (int)m_file.rdstate(); }
-    protected: // for internal use only
-        /// for internal use
-	bool search_for_key_end( std::istream& in, const char* key );
-	/// read a line
-	void read_entry( ParticleDataTable* );
-    private: // following are not implemented
-	void write_event( const GenEvent* ){}
-	bool fill_next_event( GenEvent* ){ return false; }
-	void write_particle_data_table( const ParticleDataTable* ){}
-    private: // use of copy constructor is not allowed
-	IO_PDG_ParticleDataTable( const IO_PDG_ParticleDataTable& ) : 
-	    IO_BaseClass() {}
-    private: // member data
-	std::string   m_filename;
-	std::ifstream m_file;
-    };
-
-    //////////////
-    // Inlines  //
-    //////////////
-
-    inline void IO_PDG_ParticleDataTable::print( std::ostream& ostr ) const { 
-	ostr << "IO_PDG_ParticleDataTable: for computer readable PDG tables.\n"
-             << " file state: " << m_file.rdstate()
-             << " bad:" << (m_file.rdstate()&std::ios::badbit)
-             << " eof:" << (m_file.rdstate()&std::ios::eofbit)
-             << " fail:" << (m_file.rdstate()&std::ios::failbit)
-             << " good:" << (m_file.rdstate()&std::ios::goodbit) << std::endl;
-    }
-
-} // HepMC
-
-#endif  // HEPMC_IO_BASECLASS_H
-//--------------------------------------------------------------------------
-
-
-
-
-
-
-
Index: trunk/Utilities/HepMC/interface/ParticleData.h
===================================================================
--- trunk/Utilities/HepMC/interface/ParticleData.h	(revision 572)
+++ 	(revision )
@@ -1,233 +1,0 @@
-//--------------------------------------------------------------------------
-#ifndef HEPMC_PARTICLE_DATA_H
-#define HEPMC_PARTICLE_DATA_H
-
-//////////////////////////////////////////////////////////////////////////
-// Matt.Dobbs@Cern.CH, September 1999, refer to:
-// M. Dobbs and J.B. Hansen, "The HepMC C++ Monte Carlo Event Record for
-// High Energy Physics", Computer Physics Communications (to be published).
-//
-// GenParticle Data common to all particles of a given PDG id
-//////////////////////////////////////////////////////////////////////////
-//
-// Units  ID: defined by PDG group (particles are +ve, antiparticles are -ve) 
-//              also consistent with the Pythia definitions
-//              See: http://d0lblt.lbl.gov/wwwpdg/mc_numbers.htm
-//        charge: fraction of proton charge
-//        mass in user defined energy units
-//        width:  ( stored as cLifetime = hbar / Width )
-//        cLifetime: c*time
-//        spin: fraction of photon spin (always a positive number)
-//
-// Default mass is 0.
-// Default cLifetime is -1 which means stable (setting width = 0 gives this)
-//     (we define cLifetime = -1 --> width = 0 (i.e stable), 
-//                    width = -1 --> cLifetime = 0 (i.e. prompt)  )
-// These defaults exist because many very basic MC generators
-//     may produce only massless stable particles in the event record.
-//
-// It is intended that a different ParticleData object is created for each 
-//     particle and its anti-particle - useful for CP violation studies.
-//
-// There are few set methods for this class, there should be no reason
-//     to change anything after instantiating. If you need to, then
-//     create a new object and kill the old one.
-//
-// Example: 
-//  HepMC::ParticleData* pd_electron = 
-//                    new HepMC::ParticleData("electron",11,-1,0.000511,-1,.5);
-// A method is provided to allow you to set the lifetime from the
-//     width in the constructor
-// Example: new HepMC::ParticleData("W+",24,+1,80.396,
-//                                  HepMC::clifetime_from_width(2.06),1);
-// Example of finding a ParticleData object from its PDG ID 
-// in ParticleDataTable pdt:
-//        HepMC::ParticleData* electron = pdt.find(11);
-// or if you just wanted two know the electron mass, you could do:
-//        pdt.find(11)->mass();
-
-#include <iostream>
-#include <string>
-#include <stdlib.h>	// for integer abs()
-
-namespace HepMC {
-
-    /// hbar * c --> calculated with units of [mm*GeV]
-    static const double HepMC_hbarc   = (6.6260755e-34 * (1.e-6/1.60217733e-19) / (2*3.14159265358979323846))
-                                        * (2.99792458e+8 * 1000.) * 1.e+3;
-
-    // if you want to instantiate the particle lifetime from its width,
-    // use this static method inside the constructor:
-    double clifetime_from_width( double width );  //!< set lifetime from width
-
-    //! an example ParticleData class
-    
-    ///
-    /// \class ParticleData
-    /// Particle Data common to all particles of a given PDG id
-    ///
-    class ParticleData {
-  
-	friend std::ostream&  operator<<( std::ostream&, const ParticleData& );
-
-    public:
-        /// constructor requiring name, ID, and charge
-	ParticleData( std::string name, int id, double charge, double mass = 0,
-		      double cLifetime = -1, double spin = 0 );
-        /// constructor requiring name, ID, and charge
-	ParticleData( const char* name, int id, double charge, double mass = 0,
-		      double cLifetime = -1, double spin = 0 );
-	virtual ~ParticleData();
-
-	bool    operator==( const ParticleData& ) const; //!< equality
-	bool    operator!=( const ParticleData& ) const; //!< inequality
-
-        /// write particle data information to ostr
-	void    print( std::ostream& ostr = std::cout ) const;
-
-	bool    is_lepton() const;        //!< true if charged lepton /neutrino
-	bool    is_charged_lepton() const;//!< true if a charged lepton
-	bool    is_em() const;            //!< true if an electron or photon
-	bool    is_neutrino() const;      //!< true if a neutrino
-	bool    is_hadron() const;        //!< true if a hadron
-	bool    is_boson() const;         //!< true if a gauge or higgs boson
-
-	////////////////////
-	// access methods //
-	////////////////////
-	
-	/// description of the particle according to PDG, i.e. "Delta(1900) S_31"
-	std::string  name() const;
-	/// PDG ID number
-	int          pdg_id() const;
-	/// charge
-	double       charge() const;
-	/// nominal mass
-	double       mass() const;
-	/// width as calculated from clifetime
-	double       width() const; 
-	/// lifetime in mm
-	double       clifetime() const;
-	/// J spin
-	double       spin() const;
-
-	void         set_charge( double ); //!< set charge
-	void         set_mass( double ); //!< set nominal mass
-	void         set_width( double ); //!< set width
-	void         set_clifetime( double ); //!< set lifetime in mm
-	void         set_spin( double ); //!< set J spin
-
-    protected:
-	static unsigned int counter(); //!< num ParticleData objects in memory
-    
-	/// omits susy/excited/technicolor digit from returned ID
-	int    model_independent_pdg_id_() const;
-
-    private:
-	std::string   m_name;   // description of the particle according to PDG
-                                // i.e. "Delta(1900) S_31"
-	int           m_pdg_id; // PDG ID number (note we allow -ve)
-	int           m_3charge;// 3*electric charge in units of proton charge
-	double        m_mass;   // nominal mass in user defined energy units
-	double        m_clifetime; // [mm]
-	unsigned char m_2spin;  // 2*spin (J) of particle
-
-	static unsigned int s_counter;
-    };
-
-    ///////////////////////////
-    // INLINES               //
-    ///////////////////////////
-
-    inline bool ParticleData::is_lepton() const {
-	/// true if a charged lepton or neutrino --> | 11,13,15,12,14,16,17,18 |
-	return ( abs(pdg_id()) >=11 &&  abs(pdg_id()) <= 18 );
-    }
-    inline bool ParticleData::is_charged_lepton() const {
-	/// true if a charged lepton --> | 11,13,15 |
-	return ( is_lepton() && abs(pdg_id())%2==1 );
-    }
-    inline bool ParticleData::is_neutrino() const {
-	/// true if a neutrino --> | 12,14,16 |
-	return ( is_lepton() && abs(pdg_id())%2==0 );
-    }
-    inline bool ParticleData::is_em() const {
-	/// true if an electron or photon --> | 11, 22 |
-	return ( abs(pdg_id()) == 11 || abs(pdg_id()) == 22 );
-    }
-    inline bool ParticleData::is_hadron() const {
-	/// true if a hadron --> q,g,meson,baryon
-	return ( abs(pdg_id()) <= 9 || abs(pdg_id()) == 21 
-		 || abs(pdg_id()) >100 );
-    }
-    inline bool ParticleData::is_boson() const {
-	/// true if a gauge or higgs boson --> | 9, 21-39 | 
-	return ( ( abs(pdg_id()) >20 && abs(pdg_id()) <=40 )
-		 || abs(pdg_id()) == 9 );
-    }
-
-    ///////////////////////////
-    // INLINE Access Methods //
-    ///////////////////////////
-
-    inline std::string ParticleData::name() const { return m_name; }
-    inline int         ParticleData::pdg_id() const { return m_pdg_id; }
-    inline double      ParticleData::charge() const { 
-	return ( (double)m_3charge )/3.; 
-    }
-    inline double      ParticleData::mass() const { return m_mass; }
-    inline double      ParticleData::clifetime() const { return m_clifetime; }
-    inline double      ParticleData::spin() const { return m_2spin/2.; }
-    inline void        ParticleData::set_charge( double charge ) {
-	if ( charge > 0 ) { 
-	    m_3charge = (int)(3.*charge+.1); 
-	} else if ( charge < 0. ) { 
-	    m_3charge = (int)(3.*charge-.1); 
-	} else { 
-	    m_3charge = 0; 
-	}
-    }
-    inline void        ParticleData::set_mass( double its_mass ) {
-	m_mass = its_mass;
-    }
-    inline void        ParticleData::set_width( double width ) {
-	if ( width > 0 ) { 
-	    m_clifetime = HepMC_hbarc/width;
-	} else if ( width == 0. ) { 
-	    m_clifetime = -1.;
-	} else { 
-	    m_clifetime = 0.; 
-	}
-    }
-    inline void        ParticleData::set_clifetime( double its_clifetime ) {
-	m_clifetime = its_clifetime; 
-    }
-    inline void        ParticleData::set_spin( double spin ) {
-	m_2spin = (unsigned char)(2.*spin+.1);
-    }
-
-    ///////////////////////////
-    // INLINE Operators      //
-    ///////////////////////////
-
-    inline bool ParticleData::operator==( const ParticleData& a ) const {
-	// compares everything except the particle's name
-	return ( a.m_pdg_id != m_pdg_id ||
-		 a.m_mass != m_mass ||
-		 a.m_clifetime != m_clifetime ||
-		 a.m_3charge != m_3charge ||
-		 a.m_2spin != m_2spin            ) ? 0 : 1;
-    }
-
-    inline bool ParticleData::operator!=( const ParticleData& a ) const {
-	// compares everything except the particle's name
-	return ( a.pdg_id() != this->pdg_id() );
-    }
-
-} // HepMC
-
-#endif  // HEPMC_PARTICLE_DATA_H
-//--------------------------------------------------------------------------
-
-
-
Index: trunk/Utilities/HepMC/interface/ParticleDataTable.h
===================================================================
--- trunk/Utilities/HepMC/interface/ParticleDataTable.h	(revision 572)
+++ 	(revision )
@@ -1,270 +1,0 @@
-//--------------------------------------------------------------------------
-#ifndef HEPMC_PARTICLE_DATA_TABLE_H
-#define HEPMC_PARTICLE_DATA_TABLE_H
-
-//////////////////////////////////////////////////////////////////////////
-// Matt.Dobbs@Cern.CH, Jan 2000, refer to:
-// M. Dobbs and J.B. Hansen, "The HepMC C++ Monte Carlo Event Record for
-// High Energy Physics", Computer Physics Communications (to be published).
-//
-// Container for GenParticle Data Instances --- basically just an interface
-//   to STL map -- the same naming conventions are used
-// A GenParticle may belong to any number of ParticleDataTables. 
-// The ParticleDataTable does not own the ParticleData objects and will NOT
-//   delete them unless explicity told to do so with the delete_all method.
-// Each ParticleData entry in the table MUST have a unique pdg_id (otherwise
-//   an attempt to insert it as a new entry will fail).
-// Updated 2000.02.08 M.Dobbs added merge_table and 
-//                            make_antiparticles_from_particles
-//////////////////////////////////////////////////////////////////////////
-
-#include <iostream>
-#include <map>
-#include <cstdio>       // needed for formatted output using sprintf 
-#include "ParticleData.h"
-
-namespace HepMC {
-
-    //! an example ParticleDataTable class
-    
-    ///
-    /// \class ParticleDataTable
-    /// Example container for ParticleData instances. 
-    /// Basically just an interface to STL map.
-    ///
-    class ParticleDataTable {
-  
-    public:
-        /// constructor with optional description
-	ParticleDataTable( std::string description = std::string() );
-        /// constructor with description
-	ParticleDataTable( const char description );
-	/// copy constructor
-	ParticleDataTable( const ParticleDataTable& );
-        /// Shallow: does not delete ParticleData entries
-	virtual ~ParticleDataTable(); 
-	/// shallow: does not copy the entries, only makes new pointers 
-	ParticleDataTable& operator=( const ParticleDataTable& );
-
-        /// make corresponding anti-particles for all particles in table
-	void    make_antiparticles_from_particles();
-	/// merge two tables
-	int     merge_table( const ParticleDataTable& );
-
-        /// write the table to ostr
-	void    print( std::ostream& ostr = std::cout ) const;
-
-	void    delete_all(); //!<delete all ParticleData instances in this table
-	void    clear();      //!<clears table without deleting
-
-        /// return pointer to requested ParticleData
-	ParticleData*       operator[]( int id ) const;
-        /// return pointer to requested ParticleData
-	ParticleData*       find( int id ) const;
-	/// size of table
-	int                 size() const;
-	/// true if the table is empty
-	bool                empty() const;
-	/// true if successful
-	bool                insert( ParticleData* ); 
-	/// removes from table - does not delete
-	bool                erase( ParticleData* );  
-	/// removes from table - does not delete
-	bool                erase( int id );       
-	/// iterator for ParticleData map
-	typedef std::map<int,HepMC::ParticleData*>::iterator iterator;
-	/// const iterator for ParticleData map
-	typedef std::map<int,HepMC::ParticleData*>::const_iterator const_iterator;
-	/// begin iteration
-	iterator            begin();
-	/// end iteration
-	iterator            end();
-	/// begin const iteration
-	const_iterator      begin() const;
-	/// end const iteration
-	const_iterator      end() const;
-	
-	////////////////////
-	// access methods //
-	////////////////////
-	
-	/// table description
-	std::string description() const;
-	/// set table description
-	void        set_description( std::string );
-	/// set table description
-	void        set_description( const char );
-
-    private:
-	std::string                        m_description;
-	std::map<int,HepMC::ParticleData*> m_data_table;
-    };
-
-    ///////////////////////////
-    // INLINES               //
-    ///////////////////////////
-
-    inline ParticleDataTable::ParticleDataTable( std::string description ) 
-	: m_description(description) {
-	std::cout << "-------------------------------------------------------" << std::endl;
-	std::cout << "Use of HepMC/ParticleDataTable is deprecated" << std::endl;
-	std::cout << "-------------------------------------------------------" << std::endl;
-    }
-
-    inline ParticleDataTable::ParticleDataTable( const char description ) {
-	m_description = description; 
-
-        std::cout << "-------------------------------------------------------" << std::endl;
-        std::cout << "Use of HepMC/ParticleDataTable is deprecated" << std::endl;
-        std::cout << "-------------------------------------------------------" << std::endl;
-    }
-
-    inline ParticleDataTable::ParticleDataTable( const ParticleDataTable& pdt){
-	*this = pdt;
-    }
-
-    inline ParticleDataTable::~ParticleDataTable(){}
-
-    inline ParticleDataTable& ParticleDataTable::operator=( const 
-							    ParticleDataTable& 
-							    pdt) {
-	m_description = pdt.m_description;
-	m_data_table = pdt.m_data_table;
-	return *this;
-    }
-
-    inline void ParticleDataTable::make_antiparticles_from_particles() {
-        /// make corresponding anti-particles for all particles in table
-	ParticleDataTable new_data;
-	for ( ParticleDataTable::iterator p = begin(); p != end(); ++p ) {
-	    ParticleData* pdata = p->second;
-	    if ( pdata->charge() ) {
-		new_data.insert( new ParticleData( pdata->name()+"~",
-						   -1*pdata->pdg_id(),
-						   -1.*pdata->charge(), 
-						   pdata->mass(),
-						   pdata->clifetime(), 
-						   pdata->spin() ));
-	    }
-	}
-	merge_table( new_data );
-    }
-
-    inline void ParticleDataTable::print( std::ostream& ostr ) const {
-        /// prints a summary of all particle Data currently in memory
-        //
-        ostr << "________________________________________"
-             << "________________________________________\n";
-	ostr << "ParticleData:   *****  ParticleDataTable"
-             << "  *****   ( " << size() 
-             << " entries )\n";
-	ostr << " Description: " << m_description << "\n";
-        ostr << "   PDG ID " << "       PARTICLE NAME "
-             << "CHARGE" <<    "     MASS     "
-             << "  C*LIFETIME (CM) " << " SPIN\n";
-        for ( std::map< int,ParticleData* >::const_iterator pd 
-                  = m_data_table.begin(); pd != m_data_table.end(); pd++ ) {
-            ostr << *(pd->second) << "\n";
-        }
-        ostr << "________________________________________"
-             << "________________________________________" << std::endl;
-    }      
-
-    inline ParticleData* ParticleDataTable::find( int id ) const {
-	/// finds a ParticleData pointer corresponding to id IF it exists in
-	///  the table. If not returns NULL
-	std::map<int,ParticleData*>::const_iterator iter 
-	    = m_data_table.find(id);
-	return ( iter == m_data_table.end() ) ? 0 : iter->second;
-    }
-
-    inline ParticleData* ParticleDataTable::operator[]( int id ) const {
-	return find(id);
-    }
-
-    inline int ParticleDataTable::size() const { 
-	return (int)m_data_table.size();
-    }
-
-    inline bool ParticleDataTable::empty() const {
-	return (bool)m_data_table.empty();
-    }
-
-    inline bool ParticleDataTable::insert( ParticleData* pdata ) {
-	/// inserts pdata in the table IFF pdata's id has not already been used.
-	/// It does NOT replace entries with the same id. True if successful.
-	/// If you wish to overwrite another entry, first use erase()
-	if ( m_data_table.count(pdata->pdg_id()) ) return 0;
-	return ( m_data_table[pdata->pdg_id()] = pdata ); // true is success
-    }
-
-    inline bool ParticleDataTable::erase( ParticleData* pdata ) {
-	/// removes from table does not delete
-	/// returns True is an entry pdata existed in the table and was erased
-	return (bool)m_data_table.erase( pdata->pdg_id() );
-    }
-
-
-    inline bool ParticleDataTable::erase( int id ) {
-	/// removes from table does not delete
-	/// returns True is an entry pdata existed in the table and was erased
-	return (bool)m_data_table.erase( id );
-    }
-
-    inline ParticleDataTable::iterator ParticleDataTable::begin() { 
-	return m_data_table.begin(); 
-    }
-
-    inline ParticleDataTable::iterator ParticleDataTable::end() { 
-	return m_data_table.end(); 
-    }
-
-    inline ParticleDataTable::const_iterator ParticleDataTable::begin() const {
-	return m_data_table.begin(); 
-    }
-
-    inline ParticleDataTable::const_iterator ParticleDataTable::end() const { 
-	return m_data_table.end(); 
-    }
-
-    inline std::string ParticleDataTable::description() const { 
-	return m_description; 
-    }
-
-    inline void ParticleDataTable::set_description( std::string description ) {
-	m_description = description;
-    }
-
-    inline void ParticleDataTable::set_description( const char description ) {
-	m_description = description;
-    }
-
-    inline void ParticleDataTable::delete_all() {
-        /// deletes all ParticleData instances in this table
-        for ( std::map<int,ParticleData*>::iterator pd = m_data_table.begin();
-              pd != m_data_table.end(); pd++) delete pd->second;
-	clear();
-    }
-
-    inline void ParticleDataTable::clear() { m_data_table.clear(); }
-
-    inline int ParticleDataTable::merge_table( const ParticleDataTable& pdt ) {
-	/// merges pdt into this table
-	/// each entry from pdt is inserted only if this table does not
-	///  already have an entry matching the ParticleData's id
-	/// returns the number of new entries inserted into this table.
-	int count_number_insertions =0;
-	for ( ParticleDataTable::const_iterator p = pdt.begin(); 
-	      p != pdt.end(); ++p ) {
-	    if ( insert(p->second) ) ++count_number_insertions;
-	}
-	return count_number_insertions;
-    }
-
-} // HepMC
-
-#endif  // HEPMC_PARTICLE_DATA_TABLE_H
-//--------------------------------------------------------------------------
-
-
-
Index: trunk/Utilities/HepMC/interface/StreamInfo.h
===================================================================
--- trunk/Utilities/HepMC/interface/StreamInfo.h	(revision 574)
+++ trunk/Utilities/HepMC/interface/StreamInfo.h	(revision 574)
@@ -0,0 +1,128 @@
+//--------------------------------------------------------------------------
+#ifndef HEPMC_STREAM_INFO_H
+#define HEPMC_STREAM_INFO_H
+
+//////////////////////////////////////////////////////////////////////////
+// garren@fnal.gov, March 2009
+//
+// This class contains the extra information needed when using streaming IO
+//////////////////////////////////////////////////////////////////////////
+
+#include <string>
+#include "Units.h"
+
+namespace HepMC {
+
+/// The known_io enum is used to track which type of input is being read
+enum known_io { gen=1, ascii, extascii, ascii_pdt, extascii_pdt };
+
+//! StreamInfo contains extra information needed when using streaming IO.
+
+///
+/// \class  StreamInfo
+/// This class contains the extra information needed when using streaming IO
+/// to process HepMC GenEvents
+///
+class StreamInfo {
+public:
+    /// default constructor
+    StreamInfo( );
+    /// destructor
+    ~StreamInfo() {}
+
+    /// IO_GenEvent begin event block key
+    std::string IO_GenEvent_Key()          const { return m_io_genevent_start; }
+    /// IO_GenEvent end event block key
+    std::string IO_GenEvent_End()          const { return m_io_genevent_end; }
+
+    /// IO_Ascii begin event block key
+    /// IO_Ascii has been removed, but we want to be able to read 
+    /// existing files written by IO_Ascii
+    std::string IO_Ascii_Key()             const { return m_io_ascii_start; }
+    /// IO_Ascii end event block key
+    std::string IO_Ascii_End()             const { return m_io_ascii_end; }
+    /// IO_Ascii begin particle data block key
+    std::string IO_Ascii_PDT_Key()             const { return m_io_ascii_pdt_start; }
+    /// IO_Ascii end particle data block key
+    std::string IO_Ascii_PDT_End()             const { return m_io_ascii_pdt_end; }
+
+    /// IO_ExtendedAscii begin event block key
+    /// IO_ExtendedAscii has been removed, but we want to be able to read 
+    /// existing files written by IO_ExtendedAscii
+    std::string IO_ExtendedAscii_Key()     const { return m_io_extendedascii_start; }
+    /// IO_ExtendedAscii end event block key
+    std::string IO_ExtendedAscii_End()     const { return m_io_extendedascii_end; }
+    /// IO_ExtendedAscii begin particle data block key
+    std::string IO_ExtendedAscii_PDT_Key()             const { return m_io_extendedascii_pdt_start; }
+    /// IO_ExtendedAscii end particle data block key
+    std::string IO_ExtendedAscii_PDT_End()             const { return m_io_extendedascii_pdt_end; }
+
+    /// get IO type
+    int io_type() const { return m_io_type; }
+    /// set IO type
+    void set_io_type( int );
+
+    /// true if the stream has a file type key
+    /// has_key is true by default
+    bool has_key() const { return m_has_key; }
+    /// set to false if the stream does not have a file type key
+    void set_has_key( bool );
+    
+    /// get the I/O momentum units
+    Units::MomentumUnit io_momentum_unit() const { return m_io_momentum_unit; }
+    /// get the I/O length units
+    Units::LengthUnit io_position_unit() const { return m_io_position_unit; }
+
+    /// get the I/O stream id
+    /// This is used for sanity checking.
+    int stream_id() const { return m_stream_id; }
+    
+    /// Special information is processed the first time we use the IO
+    bool finished_first_event() const { return m_finished_first_event_io; }
+    /// Special information is processed the first time we use the IO
+    void set_finished_first_event( bool b ) { m_finished_first_event_io = b; }
+
+    /// needed when reading a file without units if those units are 
+    /// different than the declared default units 
+    /// (e.g., the default units are MeV, but the file was written with GeV)
+    /// This method is not necessary if the units are written in the file
+    void use_input_units( Units::MomentumUnit, Units::LengthUnit );
+    
+    /// reading_event_header will return true when streaming input is 
+    /// processing the GenEvent header information
+    bool reading_event_header();
+    /// set the reading_event_header flag
+    void set_reading_event_header(bool);
+
+private: // data members
+    bool        m_finished_first_event_io;
+    // GenEvent I/O method keys
+    std::string m_io_genevent_start;
+    std::string m_io_ascii_start;
+    std::string m_io_extendedascii_start;
+    std::string m_io_genevent_end;
+    std::string m_io_ascii_end;
+    std::string m_io_extendedascii_end;
+    // particle data I/O method keys
+    std::string m_io_ascii_pdt_start;
+    std::string m_io_extendedascii_pdt_start;
+    std::string m_io_ascii_pdt_end;
+    std::string m_io_extendedascii_pdt_end;
+    // io information
+    int         m_io_type;
+    bool        m_has_key;
+    // default io units - used only when reading a file with no units
+    Units::MomentumUnit m_io_momentum_unit;
+    Units::LengthUnit   m_io_position_unit;
+    // used to keep identify the I/O stream
+    unsigned int m_stream_id;
+    static unsigned int m_stream_counter;
+    // used to keep track when reading event
+    bool m_reading_event_header;
+
+};
+
+} // HepMC
+
+#endif  // HEPMC_STREAM_INFO_H
+//--------------------------------------------------------------------------
