ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
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. More...
 
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. More...
 

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. More...
 

Private Attributes

const std::string m_fileKey
 

Detailed Description

Definition at line 787 of file ManagedMonitorToolBase.h.

Constructor & Destructor Documentation

◆ DefaultStream()

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

Definition at line 789 of file ManagedMonitorToolBase.h.

790  : m_fileKey(fileKey) { }

◆ ~DefaultStream()

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

Definition at line 791 of file ManagedMonitorToolBase.h.

791 { }

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 2154 of file ManagedMonitorToolBase.cxx.

2156 {
2157  std::string streamName = getStreamName(tool, group, objName, usePreviousInterval);
2158  std::string root, rem;
2159  parseString(streamName, root, rem);
2160  // Remove object name at the end
2161  // to obtain directory path
2162  rem.erase(rem.rfind('/'), rem.length());
2163  return rem;
2164 }

◆ 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 2142 of file ManagedMonitorToolBase.cxx.

2144 {
2145  std::ostringstream streamName;
2146 
2147  streamName << "/" << m_fileKey << "/";
2148 
2149  streamName << group.system() << "/" << objName;
2150  return streamName.str();
2151 }

◆ 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 2415 of file ManagedMonitorToolBase.cxx.

2416  {
2417  std::string::size_type pos = streamName.find('/');
2418 
2419  if (pos == std::string::npos) {
2420  root = "";
2421  rem = streamName;
2422  return;
2423  }
2424 
2425  if (pos == 0) {
2426  parseString(streamName.substr(1,streamName.length()),root,rem);
2427  } else {
2428  root = streamName.substr(0,pos);
2429  rem = streamName.substr(pos+1,streamName.length());
2430  }
2431 
2432 }

Member Data Documentation

◆ m_fileKey

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

Definition at line 796 of file ManagedMonitorToolBase.h.


The documentation for this class was generated from the following files:
RunTileMonitoring.fileKey
fileKey
Definition: RunTileMonitoring.py:419
sendEI_SPB.root
root
Definition: sendEI_SPB.py:34
ManagedMonitorToolBase::DefaultStream::getStreamName
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.
Definition: ManagedMonitorToolBase.cxx:2143
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
AthenaPoolExample_Copy.streamName
string streamName
Definition: AthenaPoolExample_Copy.py:39
ManagedMonitorToolBase::StreamNameFcn::parseString
static void parseString(const std::string &streamName, std::string &root, std::string &rem)
A helper non-virtual function, parses id string.
Definition: ManagedMonitorToolBase.cxx:2416
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
ManagedMonitorToolBase::DefaultStream::m_fileKey
const std::string m_fileKey
Definition: ManagedMonitorToolBase.h:796