ATLAS Offline Software
Public Member Functions | Private Attributes | Friends | List of all members
JetStreamer Class Reference

#include <JetStreamer.h>

Collaboration diagram for JetStreamer:

Public Member Functions

 JetStreamer (std::unique_ptr< IJetStream > &&stream)
 
std::vector< std::size_t > next ()
 
bool isValid () const
 

Private Attributes

std::unique_ptr< IJetStreamm_stream
 
bool m_done {false}
 
bool m_valid {false}
 

Friends

std::ostream & operator<< (std::ostream &, const JetStreamer &)
 
std::ostream & operator<< (std::stringstream &, const JetStreamer &)
 

Detailed Description

Definition at line 25 of file JetStreamer.h.

Constructor & Destructor Documentation

◆ JetStreamer()

JetStreamer::JetStreamer ( std::unique_ptr< IJetStream > &&  stream)
inline

Definition at line 33 of file JetStreamer.h.

33  :
34  m_stream(std::move(stream))
35  {
36  m_valid = m_stream != nullptr and m_stream->valid();
37  }

Member Function Documentation

◆ isValid()

bool JetStreamer::isValid ( ) const
inline

Definition at line 54 of file JetStreamer.h.

54 {return m_valid;}

◆ next()

std::vector<std::size_t> JetStreamer::next ( )
inline

Definition at line 40 of file JetStreamer.h.

40  {
41 
42  if (!m_valid) {
43  return std::vector<std::size_t>();
44  }
45 
46  if (m_done) {return std::vector<std::size_t>();}
47  auto result = m_stream->get(); // stream always as legal data
48 
49  m_done = m_stream->bump();
50 
51  return result;
52  }

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  ,
const JetStreamer  
)
friend

Definition at line 9 of file JetStreamer.cxx.

9  {
10  os << "JetStreamer\n" << js.m_stream->dump() << '\n';
11  return os;
12 }

◆ operator<< [2/2]

std::ostream& operator<< ( std::stringstream &  ,
const JetStreamer  
)
friend

Member Data Documentation

◆ m_done

bool JetStreamer::m_done {false}
private

Definition at line 58 of file JetStreamer.h.

◆ m_stream

std::unique_ptr<IJetStream> JetStreamer::m_stream
private

Definition at line 57 of file JetStreamer.h.

◆ m_valid

bool JetStreamer::m_valid {false}
private

Definition at line 59 of file JetStreamer.h.


The documentation for this class was generated from the following file:
get_generator_info.result
result
Definition: get_generator_info.py:21
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
JetStreamer::m_stream
std::unique_ptr< IJetStream > m_stream
Definition: JetStreamer.h:57
JetStreamer::m_valid
bool m_valid
Definition: JetStreamer.h:59
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
JetStreamer::m_done
bool m_done
Definition: JetStreamer.h:58