ATLAS Offline Software
Loading...
Searching...
No Matches
ManagedMonitorToolBase::DefaultStream Class Reference

#include <ManagedMonitorToolBase.h>

Inheritance diagram for ManagedMonitorToolBase::DefaultStream:
Collaboration diagram for ManagedMonitorToolBase::DefaultStream:

Public Member Functions

 DefaultStream (const std::string &fileKey)
virtual ~DefaultStream ()
virtual std::string getStreamName (const ManagedMonitorToolBase *tool, const MonGroup &group, const std::string &objName, bool usePreviousInterval=false)
 A function that converts a MonGroup of logical parameters into a physical output stream name.
virtual std::string getDirectoryName (const ManagedMonitorToolBase *tool, const MonGroup &group, const std::string &objName, const bool usePreviousInterval)
 A function that returns TDirectory path in a file that corresponds to a given MonGroup and object name.

Static Public Member Functions

static void parseString (const std::string &streamName, std::string &root, std::string &rem)
 A helper non-virtual function, parses id string.

Private Attributes

const std::string m_fileKey

Detailed Description

Definition at line 725 of file ManagedMonitorToolBase.h.

Constructor & Destructor Documentation

◆ DefaultStream()

ManagedMonitorToolBase::DefaultStream::DefaultStream ( const std::string & fileKey)
inline

Definition at line 727 of file ManagedMonitorToolBase.h.

728 : m_fileKey(fileKey) { }

◆ ~DefaultStream()

virtual ManagedMonitorToolBase::DefaultStream::~DefaultStream ( )
inlinevirtual

Definition at line 729 of file ManagedMonitorToolBase.h.

729{ }

Member Function Documentation

◆ getDirectoryName()

std::string ManagedMonitorToolBase::DefaultStream::getDirectoryName ( const ManagedMonitorToolBase * tool,
const MonGroup & group,
const std::string & objName,
const bool usePreviousInterval )
virtual

A function that returns TDirectory path in a file that corresponds to a given MonGroup and object name.

Implements ManagedMonitorToolBase::StreamNameFcn.

Definition at line 1922 of file ManagedMonitorToolBase.cxx.

1924{
1925 std::string streamName = getStreamName(tool, group, objName, usePreviousInterval);
1926 std::string root, rem;
1927 parseString(streamName, root, rem);
1928 // Remove object name at the end
1929 // to obtain directory path
1930 rem.erase(rem.rfind('/'), rem.length());
1931 return rem;
1932}
virtual std::string getStreamName(const ManagedMonitorToolBase *tool, const MonGroup &group, const std::string &objName, bool usePreviousInterval=false)
A function that converts a MonGroup of logical parameters into a physical output stream name.
static void parseString(const std::string &streamName, std::string &root, std::string &rem)
A helper non-virtual function, parses id string.

◆ getStreamName()

std::string ManagedMonitorToolBase::DefaultStream::getStreamName ( const ManagedMonitorToolBase * tool,
const MonGroup & group,
const std::string & objName,
bool usePreviousInterval = false )
virtual

A function that converts a MonGroup of logical parameters into a physical output stream name.

Implements ManagedMonitorToolBase::StreamNameFcn.

Definition at line 1910 of file ManagedMonitorToolBase.cxx.

1912{
1913 std::ostringstream streamName;
1914
1915 streamName << "/" << m_fileKey << "/";
1916
1917 streamName << group.system() << "/" << objName;
1918 return streamName.str();
1919}

◆ parseString()

void ManagedMonitorToolBase::StreamNameFcn::parseString ( const std::string & streamName,
std::string & root,
std::string & rem )
staticinherited

A helper non-virtual function, parses id string.

String format: id = /root/rem The method is needed to separate root stream from the directory in a file. E.g. typical streamName is /TestMon/run_211670/lb_360/spacepointVsEvent_managed

  • TestMon is the stream from configuration file (svcMgr.THistSvc.Output += ["TestMon DATAFILE='TestMon.root' OPT='RECREATE'"])
  • run_211670/lb_360/ - directory path
  • spacepointVsEvent_managed - object name

in this case, root = TestMon rem = run_211670/lb_360/spacepointVsEvent_managed

Definition at line 2183 of file ManagedMonitorToolBase.cxx.

2184 {
2185 std::string::size_type pos = streamName.find('/');
2186
2187 if (pos == std::string::npos) {
2188 root = "";
2189 rem = streamName;
2190 return;
2191 }
2192
2193 if (pos == 0) {
2194 parseString(streamName.substr(1,streamName.length()),root,rem);
2195 } else {
2196 root = streamName.substr(0,pos);
2197 rem = streamName.substr(pos+1,streamName.length());
2198 }
2199
2200}

Member Data Documentation

◆ m_fileKey

const std::string ManagedMonitorToolBase::DefaultStream::m_fileKey
private

Definition at line 734 of file ManagedMonitorToolBase.h.


The documentation for this class was generated from the following files: