SH::SampleGrid Class Reference

This class implements a Sample located on the grid. More...

#include <SampleGrid.h>

Inheritance diagram for SH::SampleGrid:
SH::Sample

List of all members.

Public Member Functions

void testInvariant () const
 test the invariant of this object
 SampleGrid ()
 standard constructor
 SampleGrid (const std::string &name)
 standard constructor

Protected Member Functions

virtual std::size_t getNumFiles () const
virtual std::string getFileName (std::size_t index) const
virtual SamplePtr doMakeLocal () const
virtual std::vector< std::string > doMakeFileList () const
 ClassDef (SampleGrid, 1)

Detailed Description

This class implements a Sample located on the grid.

This sample is (somewhat) special, in that it doesn't contain a file list per se. Instead it relies on its meta-data entries to identify a grid dataset or dataset container, and a pattern for the files to use within.

The main purpose as such is to pass it as an input sample into the EL::GridDriver. However, in practice one can still use this like a regular sample (using direct access via FAX, or pre-loading via rucio).

Normally you will not create these samples directly, but rely on the various data discovery methods, or one at a time via addGrid()

See also:
https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/SampleHandler#Grid_Data_Discovery_Using_DQ2

Constructor & Destructor Documentation

SH::SampleGrid::SampleGrid (  ) 

standard constructor

Guarantee
strong
Failures
out of memory I
Warning:
only to be used by serialization code
SH::SampleGrid::SampleGrid ( const std::string &  name  ) 

standard constructor

Parameters:
name the name of the sample
Guarantee
strong
Failures
low level errors II

Member Function Documentation

virtual std::vector<std::string> SH::SampleGrid::doMakeFileList (  )  const [protected, virtual]

make a list of all files, prestaging them if necessary

Guarantee
basic
Failures
out of memory III
file catalogue failures
prestaging failures

Rationale
the virtual part of Sample::makeFileList

Implements SH::Sample.

virtual SamplePtr SH::SampleGrid::doMakeLocal (  )  const [protected, virtual]

Make this a local sample, i.e. one which can be directly opened with TFile::Open.

Returns:
the local sample, or "this" if this already is a local sample
Guarantee
strong
Failures
out of memory III
can not make local sample

Rationale
the virtual part of SH::Sample::makeLocal()

Implements SH::Sample.

virtual std::string SH::SampleGrid::getFileName ( std::size_t  index  )  const [protected, virtual]

the name of the file with the given index

Parameters:
index the index of the file
Guarantee
no-fail
Precondition:
index < numFiles()
Postcondition:
!result.empty()
Warning:
this is meant more for debugging and may or may not do what you want, e.g. if this is a grid dataset the file may not be directly accessible.

Rationale
the virtual part of Sample::fileName()

Implements SH::Sample.

virtual std::size_t SH::SampleGrid::getNumFiles (  )  const [protected, virtual]

the number of files in the sample

Guarantee
no-fail

Rationale
the virtual part of Sample::numFiles()

Implements SH::Sample.

void SH::SampleGrid::testInvariant (  )  const

test the invariant of this object

Guarantee
no-fail

Reimplemented from SH::Sample.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1