ATLAS Offline Software
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
JiveXML::StreamToFileTool::finalize
virtual StatusCode finalize()
Finalize.
Definition:
StreamToFileTool.cxx:46
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::m_FileNamePrefix
std::string m_FileNamePrefix
Prefix put in front of JiveXML file name.
Definition:
StreamToFileTool.h:45
JiveXML::StreamToFileTool::m_onlineEDsvc
ServiceHandle< IOnlineEventDisplaysSvc > m_onlineEDsvc
Definition:
StreamToFileTool.h:40
IOnlineEventDisplaysSvc.h
sct_calib_tf.EventNumber
int EventNumber
Definition:
sct_calib_tf.py:29
JiveXML::StreamToFileTool::m_FileNameSuffix
std::string m_FileNameSuffix
Suffix put at the end of the file name (including type)
Definition:
StreamToFileTool.h:48
IStreamTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
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::StreamToFileTool
StreamToFileTool(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition:
StreamToFileTool.cxx:17
JiveXML
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
Definition:
BadLArRetriever.cxx:22
JiveXML::StreamToFileTool
Stream JiveXML event information into a file.
Definition:
StreamToFileTool.h:22
DQPostProcessTest.outFile
outFile
Comment Out Those You do not wish to run.
Definition:
DQPostProcessTest.py:37
EventInfoWrite.RunNumber
RunNumber
Definition:
EventInfoWrite.py:50
JiveXML::StreamToFileTool::m_isOnline
Gaudi::Property< bool > m_isOnline
Definition:
StreamToFileTool.h:42
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::initialize
virtual StatusCode initialize()
Initialize.
Definition:
StreamToFileTool.cxx:33
JiveXML::StreamToFileTool::CloseFile
StatusCode CloseFile(std::ofstream *&outFile) const
Closes output stream.
Definition:
StreamToFileTool.cxx:124
AthAlgTool
Definition:
AthAlgTool.h:26
JiveXML::IStreamTool
Abstract interface to JiveXML event streaming classes.
Definition:
IStreamTool.h:24
ServiceHandle< IOnlineEventDisplaysSvc >
Generated on Sun Dec 22 2024 21:18:36 for ATLAS Offline Software by
1.8.18