ATLAS Offline Software
Loading...
Searching...
No Matches
GridTools.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef SAMPLE_HANDLER__GRID_TOOLS_H
6#define SAMPLE_HANDLER__GRID_TOOLS_H
7
9
11#include <map>
12#include <memory>
13#include <set>
14#include <vector>
15
16namespace SH
17{
18 ANA_MSG_HEADER (msgGridTools)
19
20
21
23 const std::string& downloadStageEnvVar ();
24
25
31 bool checkVomsProxy ();
32
33
44 void ensureVomsProxy ();
45
46
56 [[deprecated("please use rucioDirectAccessGlob instead")]]
57 std::vector<std::string>
58 faxListFilesGlob (const std::string& name, const std::string& filter);
59
60
71 [[deprecated("please use rucioDirectAccessRegex instead")]]
72 std::vector<std::string>
73 faxListFilesRegex (const std::string& name, const std::string& filter);
74
75
85 std::vector<std::string>
86 rucioDirectAccessGlob (const std::string& name, const std::string& filter,
87 const std::string& selectOptions);
88
89
100 std::vector<std::string>
101 rucioDirectAccessRegex (const std::string& name, const std::string& filter,
102 const std::string& selectOptions);
103
104
107 {
109 std::string scope;
110
112 std::string name;
113
115 std::string type;
116 };
117
124 std::vector<RucioListDidsEntry>
125 rucioListDids (const std::string& dataset);
126
127
128
131 {
133 std::string scope;
134
136 std::string name;
137
139 std::string filesize;
140
142 std::string adler32;
143
145 std::string disk;
146
148 std::string replica;
149 };
150
157 std::vector<RucioListFileReplicasEntry>
158 rucioListFileReplicas (const std::string& dataset);
159
160
161
169 std::map<std::string,std::unique_ptr<MetaObject> >
170 rucioGetMetadata (const std::set<std::string>& datasets);
171
172
175 {
176 std::string did;
177 unsigned totalFiles = 0;
178 unsigned downloadedFiles = 0;
179 unsigned alreadyLocal = 0;
180 unsigned notDownloaded = 0;
181 };
182
189 rucioDownload (const std::string& location,
190 const std::string& dataset);
191
197 std::vector<RucioDownloadResult>
198 rucioDownloadList (const std::string& location,
199 const std::vector<std::string>& datasets);
200
201
209 std::vector<std::string>
210 rucioCacheDatasetGlob (const std::string& location,
211 const std::string& dataset,
212 const std::string& fileGlob);
213}
214
215#endif
macros for messaging and checking status codes
#define ANA_MSG_HEADER(NAME)
for standalone code this creates a new message category
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition PrunDriver.h:15
std::vector< RucioDownloadResult > rucioDownloadList(const std::string &location, const std::vector< std::string > &datasets)
run rucio-download with multiple datasets
RucioDownloadResult rucioDownload(const std::string &location, const std::string &dataset)
run rucio-download
const std::string & downloadStageEnvVar()
the name of the environment variable containing the directory for staging files from the grid
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...
std::vector< RucioListFileReplicasEntry > rucioListFileReplicas(const std::string &dataset)
run rucio-list-file-replicas for the given dataset
std::vector< RucioListDidsEntry > rucioListDids(const std::string &dataset)
run rucio-list-dids for the given dataset
void ensureVomsProxy()
ensure that we have a valid VOMS proxy available
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
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 (...
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
bool checkVomsProxy()
return whether we have a valid VOMS proxy available
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...
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 (...
the result from rucio_download
Definition GridTools.h:175
one entry from the rucio-list-dids command
Definition GridTools.h:107
std::string scope
the scope
Definition GridTools.h:109
std::string name
the name
Definition GridTools.h:112
std::string type
the type
Definition GridTools.h:115
one entry from the rucio-list-file-replicas command
Definition GridTools.h:131
std::string filesize
the file size
Definition GridTools.h:139
std::string disk
the disk the replica is on
Definition GridTools.h:145
std::string adler32
the checksum
Definition GridTools.h:142
std::string name
the name
Definition GridTools.h:136
std::string scope
the scope
Definition GridTools.h:133
std::string replica
the replica
Definition GridTools.h:148