31#include <TDirectory.h>
33#include <TObjString.h>
40#define S_OK StatusCode::SUCCESS
41#define S_FAIL StatusCode::FAILURE
58 if ( !status.
isSuccess() )
return error(
"Failed to initialize Service base class." );
61 if ( !
m_incidentSvc )
return error(
"Unable to localize interface from service:IncidentSvc" );
69 TDirectory::TContext ctxt(
nullptr );
73 if ( !(
m_perfTree =
new TTree(
"T",
"performance measurement" ) ) )
return error(
"Could not create tree." );
89 auto map =
new TMap();
94 map->Write(
"params", TObject::kSingleKey );
110 std::string t = incident.
type();
111 if ( !t.compare( IncidentType::BeginEvent ) ) {
123 auto map =
new TMap();
125 const char* fn = i.c_str();
126 Long_t id, siz, flags, tim;
127 if ( 0 == gSystem->GetPathInfo( fn, &
id, &siz, &flags, &tim ) ) {
128 ::snprintf( text,
sizeof( text ),
"%ld", siz );
129 map->Add(
new TObjString( fn ),
new TObjString( text ) );
133 map->Write(
"Outputs", TObject::kSingleKey );
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
constexpr auto data(_Container &__cont) noexcept(noexcept(__cont.data())) -> decltype(__cont.data())
void insert(_InputIterator __first, _InputIterator __last)
constexpr void reset(pointer __p=pointer()) noexcept
constexpr pointer get() const noexcept
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
const ValueType & value() const
StatusCode stop() override
Gaudi::Property< std::string > m_setStreams
StatusCode finalize() override
Service overload: Finalize the service.
MsgStream & log() const
Helper: Use message streamer.
std::set< std::string > m_outputs
SmartIF< IIncidentSvc > m_incidentSvc
Reference to incident service.
void handle(const Incident &incident) override
IIncidentListener override: Inform that a new incident has occurred.
virtual void record(EventType eventType)
Gaudi::Property< std::string > m_splitLevel
Gaudi::Property< std::string > m_ioPerfStats
Gaudi::Property< std::string > m_basketSize
std::unique_ptr< TFile > m_perfFile
StatusCode initialize() override
Service overload: initialize the service.
Gaudi::Property< std::string > m_bufferSize
StatusCode error(const std::string &msg)
Standard way to print errors.
std::unique_ptr< MsgStream > m_log
Message streamer.
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
Base class for all Incidents (computing events).
const std::string & type() const
Access to the incident type.
const std::string & source() const
Access to the source of the incident.
Definition of the MsgStream class used to transmit messages.
GAUDI_API MsgStream(IMessageSvc *svc, int buffer_length=128)
Standard constructor: Connect to message service for output.
StatusCode finalize() override
const std::string & name() const override
Retrieve name of the service.
SmartIF< IFace > service(const std::string &name, bool createIf=true) const
StatusCode initialize() override
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
This class is used for returning status codes from appropriate routines.
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...