Fork me on GitHub

source: svn/trunk/Utilities/HepMC/src/StreamInfo.cc@ 771

Last change on this file since 771 was 571, checked in by cp3-support, 13 years ago

upgrade HepMC to version 2.06.05

File size: 1.7 KB
RevLine 
[571]1//--------------------------------------------------------------------------
2//
3// StreamInfo.cc
4// Author: Lynn Garren
5//
6// ----------------------------------------------------------------------
7
8#include <string>
9#include "StreamInfo.h"
10
11namespace HepMC {
12
13StreamInfo::StreamInfo( )
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
35/// static counter
36unsigned int StreamInfo::m_stream_counter = 0;
37
38void StreamInfo::use_input_units( Units::MomentumUnit mom, Units::LengthUnit len ) {
39 m_io_momentum_unit = mom;
40 m_io_position_unit = len;
41}
42
43void StreamInfo::set_io_type( int io ) {
44 m_io_type = io;
45}
46
47void StreamInfo::set_has_key( bool io ) {
48 m_has_key = io;
49}
50
51bool StreamInfo::reading_event_header() {
52 return m_reading_event_header;
53}
54
55void StreamInfo::set_reading_event_header(bool tf) {
56 m_reading_event_header = tf;
57}
58
59} // HepMC
Note: See TracBrowser for help on using the repository browser.