ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
JiveXML
JiveXML
StreamToFileTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef JIVEXML__STREAMTOFILETOOL_H
6
#define JIVEXML__STREAMTOFILETOOL_H
7
8
//IAlgTool interface
9
#include "
JiveXML/IStreamTool.h
"
10
#include "
AthenaBaseComps/AthAlgTool.h
"
11
#include "GaudiKernel/ServiceHandle.h"
12
#include "
EventDisplaysOnline/IOnlineEventDisplaysSvc.h
"
13
14
namespace
JiveXML
{
15
22
class
StreamToFileTool
:
virtual
public
IStreamTool
,
public
AthAlgTool
{
23
24
public
:
25
27
StreamToFileTool
(
const
std::string&,
const
std::string&,
const
IInterface*);
28
30
virtual
StatusCode
initialize
();
31
33
virtual
StatusCode
finalize
();
34
36
virtual
StatusCode
StreamEvent
(
const
unsigned
long
EventNumber,
const
unsigned
int
RunNumber,
const
std::ostringstream* EventBuffer ) ;
37
38
private
:
39
40
ServiceHandle<IOnlineEventDisplaysSvc>
m_onlineEDsvc
{
this
,
"OnlineEventDisplaysSvc"
,
"Online Event Displays Service"
};
41
42
Gaudi::Property<bool>
m_isOnline
{
this
,
"IsOnline"
,
false
,
"If running at point 1"
};
43
45
std::string
m_FileNamePrefix
;
46
48
std::string
m_FileNameSuffix
;
49
51
std::string
MakeFileName
(
const
unsigned
long
EventNumber,
const
unsigned
int
RunNumber )
const
;
52
54
StatusCode
NewFile
(
const
unsigned
long
EventNumber,
const
unsigned
int
RunNumber, std::ofstream *& outFile )
const
;
55
57
StatusCode
CloseFile
( std::ofstream *& outFile )
const
;
58
59
};
60
61
}
//Namespace
62
63
#endif
AthAlgTool.h
IOnlineEventDisplaysSvc.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
JiveXML::IStreamTool
Abstract interface to JiveXML event streaming classes.
Definition
graphics/JiveXML/JiveXML/IStreamTool.h:24
JiveXML::StreamToFileTool::MakeFileName
std::string MakeFileName(const unsigned long EventNumber, const unsigned int RunNumber) const
Generate a file name.
Definition
StreamToFileTool.cxx:88
JiveXML::StreamToFileTool::finalize
virtual StatusCode finalize()
Finalize.
Definition
StreamToFileTool.cxx:46
JiveXML::StreamToFileTool::StreamToFileTool
StreamToFileTool(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition
StreamToFileTool.cxx:17
JiveXML::StreamToFileTool::StreamEvent
virtual StatusCode StreamEvent(const unsigned long EventNumber, const unsigned int RunNumber, const std::ostringstream *EventBuffer)
Stream one event.
Definition
StreamToFileTool.cxx:56
JiveXML::StreamToFileTool::CloseFile
StatusCode CloseFile(std::ofstream *&outFile) const
Closes output stream.
Definition
StreamToFileTool.cxx:124
JiveXML::StreamToFileTool::m_isOnline
Gaudi::Property< bool > m_isOnline
Definition
StreamToFileTool.h:42
JiveXML::StreamToFileTool::m_onlineEDsvc
ServiceHandle< IOnlineEventDisplaysSvc > m_onlineEDsvc
Definition
StreamToFileTool.h:40
JiveXML::StreamToFileTool::NewFile
StatusCode NewFile(const unsigned long EventNumber, const unsigned int RunNumber, std::ofstream *&outFile) const
Creates a new output stream to write XML to.
Definition
StreamToFileTool.cxx:104
JiveXML::StreamToFileTool::initialize
virtual StatusCode initialize()
Initialize.
Definition
StreamToFileTool.cxx:33
JiveXML::StreamToFileTool::m_FileNamePrefix
std::string m_FileNamePrefix
Prefix put in front of JiveXML file name.
Definition
StreamToFileTool.h:45
JiveXML::StreamToFileTool::m_FileNameSuffix
std::string m_FileNameSuffix
Suffix put at the end of the file name (including type).
Definition
StreamToFileTool.h:48
ServiceHandle
Definition
ClusterMakerTool.h:36
IStreamTool.h
JiveXML
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
Definition
BadLArRetriever.cxx:22
Generated on
for ATLAS Offline Software by
1.17.0