![]() |
ATLAS Offline Software
|
This class implements a Sample located on the grid. More...
#include <SampleGrid.h>
Public Member Functions | |
| void | testInvariant () const |
| test the invariant of this object More... | |
| SampleGrid () | |
| standard constructor More... | |
| SampleGrid (const std::string &name) | |
| standard constructor More... | |
| const std::string & | name () const |
| the name of the sample we are using More... | |
| void | name (std::string val_name) |
| set the value of name More... | |
| std::size_t | numFiles () const |
| the number of files in the sample More... | |
| std::string | fileName (std::size_t index) const |
| the name of the file with the given index More... | |
| SamplePtr | makeLocal () const |
| Make this a local sample, i.e. More... | |
| const TagList & | tags () const |
| the tag list we are using More... | |
| void | tags (const TagList &tags) |
| set the content of tags() More... | |
| void | addTag (const std::string &tag) |
| add a tag to the content of tags() More... | |
| void | updateLocation (const std::string &from, const std::string &to) |
| update all file references starting with from to to More... | |
| MetaObject * | meta () |
| the meta-information for this sample More... | |
| const MetaObject * | meta () const |
| the meta-information for this sample More... | |
| std::vector< std::string > | makeFileList () const |
| make a list of all files, prestaging them if necessary More... | |
| TChain * | makeTChain () const |
| create a TChain object, containing all these files More... | |
| TObject * | readHist (const std::string &name) const |
| read an object from a histogram file More... | |
| bool | contains (const std::string &name) const |
| whether this sample contains a sample of the given name More... | |
| void | addSamples (SampleHandler &result) |
| add all samples this sample corresponds to to the given sample handler More... | |
| void | print () const |
| print the debugging output to the screen More... | |
| void | printContent () const |
| print the debugging output to the screen More... | |
| Long64_t | getNumEntries () const |
| get the number of entries More... | |
| TCollection * | metaDataList () |
| get the meta-data list More... | |
| const TCollection * | metaDataList () const |
| get the meta-data list More... | |
| void | removeMeta (const std::string &name) |
| remove all meta-information with the given name More... | |
| void | addReplaceMeta (TNamed *meta_swallow) |
| add a meta-data object and remove any existing meta-data with the same name More... | |
| TObject * | getMeta (const std::string &name) |
| the meta-data object with the given name More... | |
| const TObject * | getMeta (const std::string &name) const |
| the meta-data object with the given name More... | |
| double | getMetaDouble (const std::string &name, double def_val=0) const |
| the meta-data double with the given name More... | |
| std::string | getMetaString (const std::string &name, const std::string &def_val="") const |
| the meta-data string with the given name More... | |
| void | setMetaDouble (const std::string &name, double value) |
| set the meta-data double with the given name More... | |
| void | setMetaString (const std::string &name, const std::string &value) |
| set the meta-data string with the given name More... | |
| void | fetchMeta (const Sample &source) |
| fetch the meta-data from the given sample. More... | |
Protected Member Functions | |
| virtual std::size_t | getNumFiles () const |
| the number of files in the sample More... | |
| virtual std::string | getFileName (std::size_t index) const |
| the name of the file with the given index More... | |
| virtual SamplePtr | doMakeLocal () const |
| Make this a local sample, i.e. More... | |
| virtual std::vector< std::string > | doMakeFileList () const |
| make a list of all files, prestaging them if necessary More... | |
| ClassDef (SampleGrid, 1) | |
| virtual void | doUpdateLocation (const std::string &from, const std::string &to) |
| update all file references starting with from to to More... | |
| virtual TObject * | doReadHist (const std::string &name) const |
| read an object from a histogram file More... | |
| virtual bool | getContains (const std::string &name) const |
| whether this sample contains a sample of the given name More... | |
| virtual void | doAddSamples (SampleHandler &result) |
| add all samples this sample corresponds to to the given sample handler More... | |
Private Member Functions | |
| void | alloc () const |
| increase the reference count by one More... | |
| void | release () const |
| decrease the reference count by one More... | |
Private Attributes | |
| std::string | m_name |
| the name of the sample we are using More... | |
| TagList | m_tags |
| the tag list we are using More... | |
| MetaObject * | m_meta |
| the meta-information for this sample More... | |
| std::atomic< unsigned > | m_references |
| the reference count More... | |
Related Functions | |
(Note that these are not member functions.) | |
| std::string | dbg (const Sample &obj, unsigned verbosity=0) |
| the debugging info of this object More... | |
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::PrunDriver. 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()
Definition at line 43 of file SampleGrid.h.
| SH::SampleGrid::SampleGrid | ( | ) |
standard constructor
| SH::SampleGrid::SampleGrid | ( | const std::string & | name | ) |
standard constructor
| name | the name of the sample |
|
inherited |
add a meta-data object and remove any existing meta-data with the same name
| meta_swallow | the meta-object to add |
|
inherited |
add all samples this sample corresponds to to the given sample handler
|
inherited |
|
privateinherited |
increase the reference count by one
|
protected |
|
inherited |
whether this sample contains a sample of the given name
|
protectedvirtualinherited |
add all samples this sample corresponds to to the given sample handler
Reimplemented in SH::SampleComposite.
|
protectedvirtual |
make a list of all files, prestaging them if necessary
Implements SH::Sample.
|
protectedvirtual |
Make this a local sample, i.e.
one which can be directly opened with TFile::Open
Implements SH::Sample.
|
protectedvirtualinherited |
read an object from a histogram file
Reimplemented in SH::SampleHist.
|
protectedvirtualinherited |
update all file references starting with from to to
| from | the original path to the data area |
| to | the new path to the data area |
Reimplemented in SH::SampleLocal, SH::SampleComposite, and SH::SampleHist.
fetch the meta-data from the given sample.
fields that have a name that starts with "nc_" are not copied.
|
inherited |
the name of the file with the given index
| index | the index of the file |
|
protectedvirtualinherited |
whether this sample contains a sample of the given name
Reimplemented in SH::SampleComposite.
|
protectedvirtual |
the name of the file with the given index
| index | the index of the file |
Implements SH::Sample.
|
inherited |
the meta-data object with the given name
| name | the name of the meta-data object |
the meta-data object with the given name
| name | the name of the meta-data object |
|
inherited |
the meta-data double with the given name
| name | the name of the meta-data object |
| dev_val | the value to return if no meta-data object of the given name exists, or if it does not have the right type |
|
inherited |
the meta-data string with the given name
| name | the name of the meta-data object |
| dev_val | the value to return if no meta-data object of the given name exists, or if it does not have the right type |
|
inherited |
get the number of entries
|
protectedvirtual |
the number of files in the sample
Implements SH::Sample.
|
inherited |
make a list of all files, prestaging them if necessary
|
inherited |
Make this a local sample, i.e.
one which can be directly opened with TFile::Open
|
inherited |
create a TChain object, containing all these files
|
inherited |
the meta-information for this sample
|
inherited |
the meta-information for this sample
|
inherited |
get the meta-data list
|
inherited |
get the meta-data list
|
inherited |
the name of the sample we are using
|
inherited |
set the value of name
|
inherited |
the number of files in the sample
|
inherited |
print the debugging output to the screen
|
inherited |
print the debugging output to the screen
|
inherited |
read an object from a histogram file
|
privateinherited |
decrease the reference count by one
|
inherited |
remove all meta-information with the given name
| name | the meta-data name to remove |
|
inherited |
set the meta-data double with the given name
| name | the name of the meta-data |
| value | the value to which it is set |
set the meta-data string with the given name
| name | the name of the meta-data |
| value | the value to which it is set |
| void SH::SampleGrid::testInvariant | ( | ) | const |
test the invariant of this object
update all file references starting with from to to
| from | the original path to the data area |
| to | the new path to the data area |
the debugging info of this object
| obj | the object to be presented |
| verbosity | the level of verbosity (higher number -> more information) |
|
privateinherited |
|
privateinherited |
|
mutableprivateinherited |
|
privateinherited |
1.8.18