ATLAS Offline Software
|
This module provides a lot of global definitions, forward declarations and includes that are used by all modules. More...
Classes | |
class | DiskList |
an interface for listing directory contents, locally or on a file server More... | |
class | DiskListEOS |
a DiskList implementation for EOS More... | |
class | DiskListLocal |
a DiskList implementation for local directories More... | |
class | DiskListSRM |
a DiskList implementation for the SRM protocol More... | |
class | DiskListXRD |
a DiskList implementation for the XRD protocol More... | |
class | DiskOutput |
a class/interface representing an output location for files More... | |
class | DiskOutputLocal |
an implementation of DiskOutput for local disks More... | |
class | DiskOutputXRD |
an implementation of DiskOutput using the XRD protocol More... | |
class | DiskWriter |
an interface that manages writing a single output file More... | |
class | DiskWriterLocal |
an implementation of DiskWriter for local files More... | |
class | DiskWriterXRD |
an implementation of DiskWriter for the XRD protocol More... | |
class | Meta |
A base class for classes that implement arbitrary meta-data. More... | |
class | MetaData |
A class implementing a templatized version of the meta-data. More... | |
struct | MetaDataQuery |
an object containing the result of an AMI meta-data query More... | |
struct | MetaDataSample |
all the meta-data fields that we may try to read from AMI. More... | |
struct | MetaFields |
This class contains the known meta-data names. More... | |
struct | MetaNames |
the names of common meta-data More... | |
class | MetaObject |
A class that manages meta-data to be associated with an object. More... | |
class | MetaVector |
This class defines a templatized version of the meta-data in vector form. More... | |
struct | RucioDownloadResult |
the result from rucio_download More... | |
struct | RucioListDidsEntry |
one entry from the rucio-list-dids command More... | |
struct | RucioListFileReplicasEntry |
one entry from the rucio-list-file-replicas command More... | |
class | Sample |
a base class that manages a set of files belonging to a particular data set and the associated meta-data. More... | |
class | SampleComposite |
This module defines an implementation of Sample that contains composite samples. More... | |
class | SampleGrid |
This class implements a Sample located on the grid. More... | |
class | SampleHandler |
A class that manages a list of Sample objects. More... | |
class | SampleHist |
A sample that represents a single histogram file. More... | |
class | SampleLocal |
A Sample based on a simple file list. More... | |
class | SampleMeta |
A Sample that consists only of Meta-Information. More... | |
class | SamplePtr |
A smart pointer class that holds a single Sample object. More... | |
struct | ScanDir |
the class used for scanning local directories and file servers for samples More... | |
class | TagList |
A class that manages a list of tags for identifying samples. More... | |
Functions | |
void | fetchMetaData (MetaDataQuery &query) |
effects: fetch information on all the samples/datasets specified guarantee: basic More... | |
void | fetchMetaData (SampleHandler &sh, bool override) |
effects: fetch information on all the samples in the sample handler. More... | |
const std::string & | downloadStageEnvVar () |
the name of the environment variable containing the directory for staging files from the grid More... | |
bool | checkVomsProxy () |
return whether we have a valid VOMS proxy available More... | |
void | ensureVomsProxy () |
ensure that we have a valid VOMS proxy available More... | |
std::vector< std::string > | faxListFilesGlob (const std::string &name, const std::string &filter) |
list the FAX URLs for all the files in the dataset or dataset container matching the given filter (as glob expression) More... | |
std::vector< std::string > | faxListFilesRegex (const std::string &name, const std::string &filter) |
list the FAX URLs for all the files in the dataset or dataset container matching the given filter (as regular expression) More... | |
std::vector< std::string > | rucioDirectAccessGlob (const std::string &name, const std::string &filter, const std::string &selectOptions) |
list the rucio URLs for all the files in the dataset or dataset container matching the given filter (as glob expression) More... | |
std::vector< std::string > | rucioDirectAccessRegex (const std::string &name, const std::string &filter, const std::string &selectOptions) |
list the rucio URLs for all the files in the dataset or dataset container matching the given filter (as regular expression) More... | |
std::vector< RucioListDidsEntry > | rucioListDids (const std::string &dataset) |
run rucio-list-dids for the given dataset More... | |
std::vector< RucioListFileReplicasEntry > | rucioListFileReplicas (const std::string &dataset) |
run rucio-list-file-replicas for the given dataset More... | |
std::map< std::string, std::unique_ptr< MetaObject > > | rucioGetMetadata (const std::set< std::string > &datasets) |
run rucio-get-metadata for the given list of datasets More... | |
RucioDownloadResult | rucioDownload (const std::string &location, const std::string &dataset) |
run rucio-download More... | |
std::vector< RucioDownloadResult > | rucioDownloadList (const std::string &location, const std::vector< std::string > &datasets) |
run rucio-download with multiple datasets More... | |
std::vector< std::string > | rucioCacheDatasetGlob (const std::string &location, const std::string &dataset, const std::string &fileGlob) |
download the dataset, and return a list matching the pattern More... | |
std::string | dbg (const Meta &, unsigned) |
std::string | dbg (const TagList &obj, unsigned) |
void | scanDir (SampleHandler &sh, DiskList &list, const std::string &pattern="*.root*", const std::string &samplePattern="*", const std::string &samplePostfix="") |
effects: scan the given directory and add all subdirectories as samples that contain root files. More... | |
void | scanDir (SampleHandler &sh, const std::string &dir) |
void | scanDir (SampleHandler &sh, const std::string &dir, const std::string &prefix) |
void | scanFiles (SampleHandler &sh, DiskList &list, const std::string &pattern="*.root*") |
effects: scan the given directory tree and make a separate sample for each file (using the file name before any "." as the sample name). More... | |
Sample * | makeFromTChain (const std::string &name, const TChain &chain) |
effects: create a sample with the given name from the given TChain object guarantee: strong failures: out of memory II More... | |
void | scanSingleDir (SampleHandler &sh, const std::string &name, DiskList &list, const std::string &pattern="*.root*") |
effects: scan the given directory tree and turn it into a single sample of the given name guarantee: strong failures: out of memory III More... | |
void | scanDQ2 (SampleHandler &sh, const std::string &pattern) |
effects: make a list from DQ2 using the given pattern guarantee: basic, may add partially failures: out of memory III failures: dq2-ls errors More... | |
void | scanRucio (SampleHandler &sh, const std::string &pattern, bool alwaysQuery=false) |
make a list of grid datasets using the given pattern More... | |
void | addGrid (SampleHandler &sh, const std::string &ds) |
effects: add a grid dataset for dataset ds guarantee: strong failures: out of memory II requires: ds.find ("*") == std::string::npos More... | |
void | addGridCombined (SampleHandler &sh, const std::string &dsName, const std::vector< std::string > &dsList) |
effects: add a combined grid dataset with name dsName for dataset list dsList guarantee: strong failures: out of memory II requires: for each dataset ds: ds.find ("*") == std::string::npos More... | |
void | addGridCombinedFromFile (SampleHandler &sh, const std::string &dsName, const std::string &dsFile) |
effects: add a combined grid dataset with name dsName for dataset list file dsFile guarantee: strong failures: out of memory II requires: for each dataset ds: ds.find ("*") == std::string::npos More... | |
void | makeGridDirect (SampleHandler &sh, const std::string &disk, const std::string &from, const std::string &to, bool allow_partial) |
effects: update all grid samples in the sample handler that are located on the given disk to be opened directly. More... | |
void | scanForTrees (SampleHandler &sh, Sample &sample, const std::string &pattern=".*") |
effects: scan for trees in the given sample (or sample handler), and create a separate sample for each tree. More... | |
void | scanForTrees (SampleHandler &sh, const std::string &pattern) |
void | readFileList (SampleHandler &sh, const std::string &name, const std::string &file) |
effects: read a file list from a text file guarantee: strong failures: out of memory III failures: i/o errors More... | |
void | printDuplicateEvents (const Sample &sample) |
effects: check the given sample for duplicate events and then print them out guarantee: basic, may print partially failures: out of memory III failures: i/o errors More... | |
void | printDuplicateEventsSplit (const SampleHandler &sh) |
effects: check each sample for duplicate events and then print them out guarantee: basic, may print partially failures: out of memory III failures: i/o errors More... | |
void | printDuplicateEventsJoint (const SampleHandler &sh) |
effects: check for duplicate events between all the samples and then print them out guarantee: basic, may print partially failures: out of memory III failures: i/o errors More... | |
void | mergeSamples (SampleHandler &sh, const std::string &sampleName, const std::string &pattern) |
effects: remove all samples matching the name pattern, and join them into a single sample named sampleName guarantee: strong failures: out of memory II failures: i/o errors More... | |
void | readSusyMeta (const SampleHandler &sh, const std::string &inputFile) |
effects: read the susy-meta-data file and add its information to the samples from the given sample handler guarantee: basic failures: i/o errors warning: there are no checks for duplicate and inconsistent sample definitions More... | |
void | readSusyMetaDir (const SampleHandler &sh, const std::string &inputDir) |
effects: read an entire directory of susy-meta-data files and add their information to the samples from the given sample handle. More... | |
std::unique_ptr< TFile > | openFile (const std::string &name, const MetaObject &options) |
open a file with the given options More... | |
std::unique_ptr< SampleLocal > | mergeFiles (const Sample &sample, const std::string &location, bool overwrite) |
merge all the files in the sample into a single file in the given location More... | |
SampleHandler | mergeFiles (const SampleHandler &sh, const std::string &location, bool overwrite) |
merge all the files in the sample handles into a single file per sample in the given location More... | |
void | scanNEvents (SampleHandler &sh) |
effects: scan each sample in the sample handler and store the number of entries per file in the meta-data guarantee: basic, may only scan some failures: out of memory failures: read errors failures: invalid sample type More... | |
void | scanNEvents (Sample &sample) |
effects: scan the given sample and store the number of entries per file in the meta-data guarantee: strong failures: out of memory failures: read errors failures: invalid sample type More... | |
SampleHandler | splitSample (Sample &sample, Long64_t nevt) |
effects: split the given sample into a set of samples, with each sample containing either exactly one file or at most nevt events side effects: if scanNEvents hasn't been run on this sample, run it. More... | |
This module provides a lot of global definitions, forward declarations and includes that are used by all modules.
This module defines utility functions used for splitting samples.
This module defines utility functions used for joining samples.
As such it doesn't fall into the user vs. expert classification. This module is considered to be in the pre-alpha stage.
The interface provided in this module is intended for the general user. The module is considered to be in the pre-alpha stage.
void SH::addGrid | ( | SampleHandler & | sh, |
const std::string & | ds | ||
) |
effects: add a grid dataset for dataset ds guarantee: strong failures: out of memory II requires: ds.find ("*") == std::string::npos
Definition at line 175 of file ToolsDiscovery.cxx.
void SH::addGridCombined | ( | SampleHandler & | sh, |
const std::string & | dsName, | ||
const std::vector< std::string > & | dsList | ||
) |
effects: add a combined grid dataset with name dsName for dataset list dsList guarantee: strong failures: out of memory II requires: for each dataset ds: ds.find ("*") == std::string::npos
Definition at line 193 of file ToolsDiscovery.cxx.
void SH::addGridCombinedFromFile | ( | SampleHandler & | sh, |
const std::string & | dsName, | ||
const std::string & | dsFile | ||
) |
effects: add a combined grid dataset with name dsName for dataset list file dsFile guarantee: strong failures: out of memory II requires: for each dataset ds: ds.find ("*") == std::string::npos
Definition at line 215 of file ToolsDiscovery.cxx.
bool SH::checkVomsProxy | ( | ) |
return whether we have a valid VOMS proxy available
Definition at line 206 of file GridTools.cxx.
const std::string & SH::downloadStageEnvVar | ( | ) |
the name of the environment variable containing the directory for staging files from the grid
Definition at line 198 of file GridTools.cxx.
void SH::ensureVomsProxy | ( | ) |
ensure that we have a valid VOMS proxy available
First this checks whether we have a valid PROXY, and if not it sets up a new certificate.
Definition at line 213 of file GridTools.cxx.
std::vector< std::string > SH::faxListFilesGlob | ( | const std::string & | name, |
const std::string & | filter | ||
) |
list the FAX URLs for all the files in the dataset or dataset container matching the given filter (as glob expression)
Definition at line 221 of file GridTools.cxx.
std::vector< std::string > SH::faxListFilesRegex | ( | const std::string & | name, |
const std::string & | filter | ||
) |
list the FAX URLs for all the files in the dataset or dataset container matching the given filter (as regular expression)
Definition at line 234 of file GridTools.cxx.
void SH::fetchMetaData | ( | MetaDataQuery & | query | ) |
void SH::fetchMetaData | ( | SampleHandler & | sh, |
bool | override | ||
) |
effects: fetch information on all the samples in the sample handler.
if override is specified it will override the existing meta-data fields, otherwise they will only be used if the given fields do not yet exist guarantee: basic
Definition at line 56 of file fetch.cxx.
effects: create a sample with the given name from the given TChain object guarantee: strong failures: out of memory II
Definition at line 98 of file ToolsDiscovery.cxx.
void SH::makeGridDirect | ( | SampleHandler & | sh, |
const std::string & | disk, | ||
const std::string & | from, | ||
const std::string & | to, | ||
bool | allow_partial | ||
) |
effects: update all grid samples in the sample handler that are located on the given disk to be opened directly.
for that it replaces the from part of the file with the to part. if allow_partial is set, it allows for partial datasets (meaning you may lose some files that are not there). guarantee: basic, may convert only some samples failures: out of memory III failures: dq2-ls errors failures: from not part of file name
Definition at line 249 of file ToolsDiscovery.cxx.
std::unique_ptr< SampleLocal > SH::mergeFiles | ( | const Sample & | sample, |
const std::string & | location, | ||
bool | overwrite | ||
) |
merge all the files in the sample into a single file in the given location
This is mostly meant to allow merging histogram files (particularly in EventLoop), but in some cases it can also be used to merge n-tuple fiels together.
Definition at line 73 of file ToolsOther.cxx.
SampleHandler SH::mergeFiles | ( | const SampleHandler & | sh, |
const std::string & | location, | ||
bool | overwrite | ||
) |
merge all the files in the sample handles into a single file per sample in the given location
This is mostly meant to allow merging histogram files (particularly in EventLoop), but in some cases it can also be used to merge n-tuple files together.
Definition at line 90 of file ToolsOther.cxx.
void SH::mergeSamples | ( | SampleHandler & | sh, |
const std::string & | sampleName, | ||
const std::string & | pattern | ||
) |
effects: remove all samples matching the name pattern, and join them into a single sample named sampleName guarantee: strong failures: out of memory II failures: i/o errors
Definition at line 31 of file ToolsJoin.cxx.
std::unique_ptr< TFile > SH::openFile | ( | const std::string & | name, |
const MetaObject & | options | ||
) |
open a file with the given options
for now this is to allow opening files with retries, but in the future there may be other options as well.
Definition at line 35 of file ToolsOther.cxx.
effects: check the given sample for duplicate events and then print them out guarantee: basic, may print partially failures: out of memory III failures: i/o errors
Definition at line 142 of file ToolsDuplicates.cxx.
void SH::printDuplicateEventsJoint | ( | const SampleHandler & | sh | ) |
effects: check for duplicate events between all the samples and then print them out guarantee: basic, may print partially failures: out of memory III failures: i/o errors
Definition at line 162 of file ToolsDuplicates.cxx.
void SH::printDuplicateEventsSplit | ( | const SampleHandler & | sh | ) |
effects: check each sample for duplicate events and then print them out guarantee: basic, may print partially failures: out of memory III failures: i/o errors
Definition at line 151 of file ToolsDuplicates.cxx.
void SH::readFileList | ( | SampleHandler & | sh, |
const std::string & | name, | ||
const std::string & | file | ||
) |
effects: read a file list from a text file guarantee: strong failures: out of memory III failures: i/o errors
Definition at line 371 of file ToolsDiscovery.cxx.
void SH::readSusyMeta | ( | const SampleHandler & | sh, |
const std::string & | inputFile | ||
) |
effects: read the susy-meta-data file and add its information to the samples from the given sample handler guarantee: basic failures: i/o errors warning: there are no checks for duplicate and inconsistent sample definitions
Definition at line 30 of file ToolsMeta.cxx.
void SH::readSusyMetaDir | ( | const SampleHandler & | sh, |
const std::string & | inputDir | ||
) |
effects: read an entire directory of susy-meta-data files and add their information to the samples from the given sample handle.
for that it assumes that all files ending in ".txt" are susy-meta-data files. guarantee: basic failures: i/o errors warning: there are no checks for duplicate and inconsistent sample definitions
Definition at line 71 of file ToolsMeta.cxx.
std::vector< std::string > SH::rucioCacheDatasetGlob | ( | const std::string & | location, |
const std::string & | dataset, | ||
const std::string & | fileGlob | ||
) |
download the dataset, and return a list matching the pattern
Definition at line 535 of file GridTools.cxx.
std::vector< std::string > SH::rucioDirectAccessGlob | ( | const std::string & | name, |
const std::string & | filter, | ||
const std::string & | selectOptions | ||
) |
list the rucio URLs for all the files in the dataset or dataset container matching the given filter (as glob expression)
Definition at line 281 of file GridTools.cxx.
std::vector< std::string > SH::rucioDirectAccessRegex | ( | const std::string & | name, |
const std::string & | filter, | ||
const std::string & | selectOptions | ||
) |
list the rucio URLs for all the files in the dataset or dataset container matching the given filter (as regular expression)
Definition at line 291 of file GridTools.cxx.
RucioDownloadResult SH::rucioDownload | ( | const std::string & | location, |
const std::string & | dataset | ||
) |
std::vector< RucioDownloadResult > SH::rucioDownloadList | ( | const std::string & | location, |
const std::vector< std::string > & | datasets | ||
) |
run rucio-download with multiple datasets
Definition at line 523 of file GridTools.cxx.
std::map< std::string, std::unique_ptr< MetaObject > > SH::rucioGetMetadata | ( | const std::set< std::string > & | datasets | ) |
run rucio-get-metadata for the given list of datasets
Definition at line 426 of file GridTools.cxx.
std::vector< RucioListDidsEntry > SH::rucioListDids | ( | const std::string & | dataset | ) |
run rucio-list-dids for the given dataset
Definition at line 348 of file GridTools.cxx.
std::vector< RucioListFileReplicasEntry > SH::rucioListFileReplicas | ( | const std::string & | dataset | ) |
run rucio-list-file-replicas for the given dataset
Definition at line 384 of file GridTools.cxx.
void SH::scanDir | ( | SampleHandler & | sh, |
const std::string & | dir | ||
) |
Definition at line 62 of file ToolsDiscovery.cxx.
void SH::scanDir | ( | SampleHandler & | sh, |
const std::string & | dir, | ||
const std::string & | prefix | ||
) |
void SH::scanDir | ( | SampleHandler & | sh, |
DiskList & | list, | ||
const std::string & | pattern = "*.root*" , |
||
const std::string & | samplePattern = "*" , |
||
const std::string & | samplePostfix = "" |
||
) |
effects: scan the given directory and add all subdirectories as samples that contain root files.
if prefix is provided, use that instead of dir when constructing the file names. guarantee: basic, only some samples might be added failures: low level errors IV failures: directory not found failures: duplicate samples rationale: the prefix option is for the Tier 3 prototype, where you scan the local directory, but then access the files through xrootd
Definition at line 45 of file ToolsDiscovery.cxx.
void SH::scanDQ2 | ( | SampleHandler & | sh, |
const std::string & | pattern | ||
) |
effects: make a list from DQ2 using the given pattern guarantee: basic, may add partially failures: out of memory III failures: dq2-ls errors
Definition at line 124 of file ToolsDiscovery.cxx.
void SH::scanFiles | ( | SampleHandler & | sh, |
DiskList & | list, | ||
const std::string & | pattern = "*.root*" |
||
) |
effects: scan the given directory tree and make a separate sample for each file (using the file name before any "." as the sample name).
guarantee: basic, only some samples might be added failures: out of memory III failures: i/o errors failures: duplicate samples
Definition at line 86 of file ToolsDiscovery.cxx.
void SH::scanForTrees | ( | SampleHandler & | sh, |
const std::string & | pattern | ||
) |
Definition at line 357 of file ToolsDiscovery.cxx.
void SH::scanForTrees | ( | SampleHandler & | sh, |
Sample & | sample, | ||
const std::string & | pattern = ".*" |
||
) |
effects: scan for trees in the given sample (or sample handler), and create a separate sample for each tree.
if pattern is specified it is applied to the allowed tree names. guarantee: strong failures: out of memory III failures: i/o errors
Definition at line 326 of file ToolsDiscovery.cxx.
void SH::scanNEvents | ( | Sample & | sample | ) |
effects: scan the given sample and store the number of entries per file in the meta-data guarantee: strong failures: out of memory failures: read errors failures: invalid sample type
Definition at line 47 of file ToolsSplit.cxx.
void SH::scanNEvents | ( | SampleHandler & | sh | ) |
effects: scan each sample in the sample handler and store the number of entries per file in the meta-data guarantee: basic, may only scan some failures: out of memory failures: read errors failures: invalid sample type
Definition at line 38 of file ToolsSplit.cxx.
void SH::scanRucio | ( | SampleHandler & | sh, |
const std::string & | pattern, | ||
bool | alwaysQuery = false |
||
) |
make a list of grid datasets using the given pattern
This will first look for dataset containers, and if none are found, it will instead look for datasets. If those are also not found it will produce an error.
For patterns that don't contain a wild-card (i.e. that can only match one dataset/container) it instead adds the dataset directly without querying rucio. This is a performance optimization based on the assumption that you probably checked the dataset names beforehand, and that if you made a mistake it will pop up at a later stage anyways. If you want to query rucio even in those cases set alwaysQuery to true.
Definition at line 146 of file ToolsDiscovery.cxx.
void SH::scanSingleDir | ( | SampleHandler & | sh, |
const std::string & | name, | ||
DiskList & | list, | ||
const std::string & | pattern | ||
) |
effects: scan the given directory tree and turn it into a single sample of the given name guarantee: strong failures: out of memory III
Definition at line 112 of file ToolsDiscovery.cxx.
SampleHandler SH::splitSample | ( | Sample & | sample, |
Long64_t | nevt | ||
) |
effects: split the given sample into a set of samples, with each sample containing either exactly one file or at most nevt events side effects: if scanNEvents hasn't been run on this sample, run it.
guarantee: strong failures: out of memory failures: scanning errors
Definition at line 79 of file ToolsSplit.cxx.