StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StreamInfo.cc
1 //--------------------------------------------------------------------------
2 //
3 // StreamInfo.cc
4 // Author: Lynn Garren
5 //
6 // ----------------------------------------------------------------------
7 
8 #include <string>
9 #include "HepMC/StreamInfo.h"
10 
11 namespace HepMC {
12 
14 : m_finished_first_event_io(false),
15  m_io_genevent_start("HepMC::IO_GenEvent-START_EVENT_LISTING"),
16  m_io_ascii_start("HepMC::IO_Ascii-START_EVENT_LISTING"),
17  m_io_extendedascii_start("HepMC::IO_ExtendedAscii-START_EVENT_LISTING"),
18  m_io_genevent_end("HepMC::IO_GenEvent-END_EVENT_LISTING"),
19  m_io_ascii_end("HepMC::IO_Ascii-END_EVENT_LISTING"),
20  m_io_extendedascii_end("HepMC::IO_ExtendedAscii-END_EVENT_LISTING"),
21  m_io_ascii_pdt_start("HepMC::IO_Ascii-START_PARTICLE_DATA"),
22  m_io_extendedascii_pdt_start("HepMC::IO_ExtendedAscii-START_PARTICLE_DATA"),
23  m_io_ascii_pdt_end("HepMC::IO_Ascii-END_PARTICLE_DATA"),
24  m_io_extendedascii_pdt_end("HepMC::IO_ExtendedAscii-END_PARTICLE_DATA"),
25  m_io_type(0),
26  m_has_key(true),
27  m_io_momentum_unit(Units::default_momentum_unit()),
28  m_io_position_unit(Units::default_length_unit()),
29  m_stream_id(m_stream_counter),
30  m_reading_event_header(false)
31 {
32  ++m_stream_counter;
33 }
34 
36 unsigned int StreamInfo::m_stream_counter = 0;
37 
38 void StreamInfo::use_input_units( Units::MomentumUnit mom, Units::LengthUnit len ) {
39  m_io_momentum_unit = mom;
40  m_io_position_unit = len;
41 }
42 
43 void StreamInfo::set_io_type( int io ) {
44  m_io_type = io;
45 }
46 
47 void StreamInfo::set_has_key( bool io ) {
48  m_has_key = io;
49 }
50 
52  return m_reading_event_header;
53 }
54 
56  m_reading_event_header = tf;
57 }
58 
59 } // HepMC
StreamInfo()
default constructor
Definition: StreamInfo.cc:13
void use_input_units(Units::MomentumUnit, Units::LengthUnit)
Definition: StreamInfo.cc:38
void set_io_type(int)
set IO type
Definition: StreamInfo.cc:43
void set_has_key(bool)
set to false if the stream does not have a file type key
Definition: StreamInfo.cc:47
bool reading_event_header()
Definition: StreamInfo.cc:51
void set_reading_event_header(bool)
set the reading_event_header flag
Definition: StreamInfo.cc:55