ATLAS Offline Software
Loading...
Searching...
No Matches
ManagedMonitorToolBase::StreamNameFcn Class Referenceabstract

A function-object base class allowing the specific implementation of getStreamName to be decided at runtime. More...

#include <ManagedMonitorToolBase.h>

Inheritance diagram for ManagedMonitorToolBase::StreamNameFcn:
Collaboration diagram for ManagedMonitorToolBase::StreamNameFcn:

Public Member Functions

virtual ~StreamNameFcn ()
virtual std::string getStreamName (const ManagedMonitorToolBase *tool, const MonGroup &group, const std::string &objName, bool usePreviousInterval=false)=0
 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)=0
 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.

Detailed Description

A function-object base class allowing the specific implementation of getStreamName to be decided at runtime.

Definition at line 325 of file ManagedMonitorToolBase.h.

Constructor & Destructor Documentation

◆ ~StreamNameFcn()

virtual ManagedMonitorToolBase::StreamNameFcn::~StreamNameFcn ( )
inlinevirtual

Definition at line 327 of file ManagedMonitorToolBase.h.

327{};

Member Function Documentation

◆ getDirectoryName()

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

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

Implemented in ManagedMonitorToolBase::DefaultStream, ManagedMonitorToolBase::NoOutputStream, ManagedMonitorToolBase::OfflineStream, and ManagedMonitorToolBase::OnlineStream.

◆ getStreamName()

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

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

Implemented in ManagedMonitorToolBase::DefaultStream, ManagedMonitorToolBase::NoOutputStream, ManagedMonitorToolBase::OfflineStream, and ManagedMonitorToolBase::OnlineStream.

◆ parseString()

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

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}
static void parseString(const std::string &streamName, std::string &root, std::string &rem)
A helper non-virtual function, parses id string.

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