ATLAS Offline Software
Public Member Functions | Protected Member Functions | List of all members
SH::DiskOutput Class Referenceabstract

a class/interface representing an output location for files More...

#include <DiskOutput.h>

Inheritance diagram for SH::DiskOutput:
Collaboration diagram for SH::DiskOutput:

Public Member Functions

void testInvariant () const
 test the invariant of this object More...
 
 DiskOutput ()
 standard constructor More...
 
std::unique_ptr< DiskWritermakeWriter (const std::string &sampleName, const std::string &segmentName, const std::string &suffix) const
 create a DiskWriter object managing an output file More...
 
std::string targetURL (const std::string &sampleName, const std::string &segmentName, const std::string &suffix) const
 the final output location for the given segment More...
 

Protected Member Functions

virtual std::unique_ptr< DiskWriterdoMakeWriter (const std::string &sampleName, const std::string &segmentName, const std::string &suffix) const =0
 create a DiskWriter object managing an output file More...
 
virtual std::string getTargetURL (const std::string &sampleName, const std::string &segmentName, const std::string &suffix) const =0
 
 ClassDef (DiskOutput, 1)
 

Detailed Description

a class/interface representing an output location for files

This is primarily used to allow placing EventLoop outputs in other locations than the submit-directory. This is particularly useful for placing large n-tuples directly onto a storage element, instead of putting them onto a local disk that has neither the capacity nor the bandwith.

In principle this ought to be handle to any kind of storage element, but for now (04 Feb 19) it only supports local disks and xrootd servers. If you need anything else ask for it.

Files created are identified both by a sample name and a segment identifier. The sample name is what's configured in the EventLoop job. The segment identifier is generated by EventLoop if more than one job is run per sample.

This class derives from TObject to allow streaming the objects as part of the EventLoop job configuration. As such all derived objects need to be designed to be streamable.

\warn This interface is not considered fixed, it can change as the needs of EventLoop change or as more output location types are added.

Definition at line 45 of file DiskOutput.h.

Constructor & Destructor Documentation

◆ DiskOutput()

SH::DiskOutput::DiskOutput ( )

standard constructor

Guarantee
strong
Failures
out of memory I

Member Function Documentation

◆ ClassDef()

SH::DiskOutput::ClassDef ( DiskOutput  ,
 
)
protected

◆ doMakeWriter()

virtual std::unique_ptr<DiskWriter> SH::DiskOutput::doMakeWriter ( const std::string &  sampleName,
const std::string &  segmentName,
const std::string &  suffix 
) const
protectedpure virtual

create a DiskWriter object managing an output file

Precondition
!sampleName.empty()
Postcondition
result != nullptr
Guarantee
strong
Failures
out of memory II
i/o errors
Rationale
the virtual part of DiskOutput::makeWriter

Implemented in SH::DiskOutputLocal, and SH::DiskOutputXRD.

◆ getTargetURL()

virtual std::string SH::DiskOutput::getTargetURL ( const std::string &  sampleName,
const std::string &  segmentName,
const std::string &  suffix 
) const
protectedpure virtual

Rationale
the virtual part of DiskOutput::targetURL

Implemented in SH::DiskOutputLocal, and SH::DiskOutputXRD.

◆ makeWriter()

std::unique_ptr<DiskWriter> SH::DiskOutput::makeWriter ( const std::string &  sampleName,
const std::string &  segmentName,
const std::string &  suffix 
) const

create a DiskWriter object managing an output file

Precondition
!sampleName.empty()
Postcondition
result != nullptr
Guarantee
strong
Failures
out of memory II
i/o errors

◆ targetURL()

std::string SH::DiskOutput::targetURL ( const std::string &  sampleName,
const std::string &  segmentName,
const std::string &  suffix 
) const

the final output location for the given segment

Precondition
!sampleName.empty()
Postcondition
!result.empty()
Guarantee
strong
Failures
out of memory II

◆ testInvariant()

void SH::DiskOutput::testInvariant ( ) const

test the invariant of this object

Guarantee
no-fail

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