ATLAS Offline Software
Loading...
Searching...
No Matches
ToolsDiscovery.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#ifndef SAMPLE_HANDLER_TOOLS_DISCOVERY_H
8#define SAMPLE_HANDLER_TOOLS_DISCOVERY_H
9
12
13
14
15//protect
17
18#include <memory>
19#include <string>
20#include <vector>
21
22class TChain;
23
24namespace SH
25{
36 [[deprecated("please use new ScanDir() mechanism instead")]]
37 void scanDir (SampleHandler& sh, DiskList& list,
38 const std::string& pattern = "*.root*",
39 const std::string& samplePattern = "*",
40 const std::string& samplePostfix = "");
41 [[deprecated("please use new ScanDir() mechanism instead")]]
42 void scanDir (SampleHandler& sh, const std::string& dir);
43 [[deprecated("please use new ScanDir() mechanism instead")]]
44 void scanDir (SampleHandler& sh, const std::string& dir,
45 const std::string& prefix);
46
47
52 [[deprecated("please use new ScanDir() mechanism instead")]]
53 void scanSingleDir (SampleHandler& sh, const std::string& name,
54 DiskList& list, const std::string& pattern = "*.root*");
55
56
64 [[deprecated("please use new ScanDir() mechanism instead")]]
65 void scanFiles (SampleHandler& sh, DiskList& list,
66 const std::string& pattern = "*.root*");
67
68
73 [[deprecated("use makeFromTChainUnique() instead")]]
74 Sample *makeFromTChain (const std::string& name, const TChain& chain);
75
76
81 std::unique_ptr<Sample> makeFromTChainUnique (const std::string& name, const TChain& chain);
82
83
88 [[deprecated("please use scanRucio instead")]]
89 void scanDQ2 (SampleHandler& sh, const std::string& pattern);
90
91
112 void scanRucio (SampleHandler& sh, const std::string& pattern,
113 bool alwaysQuery = false);
114
115
120 void addGrid (SampleHandler& sh, const std::string& ds);
121
122
127 void addGridCombined (SampleHandler& sh, const std::string& dsName,
128 const std::vector<std::string>& dsList);
129
130
135 void addGridCombinedFromFile (SampleHandler& sh, const std::string& dsName,
136 const std::string& dsFile);
137
138
148 void makeGridDirect (SampleHandler& sh, const std::string& disk,
149 const std::string& from, const std::string& to,
150 bool allow_partial);
151
152
159 void scanForTrees (SampleHandler& sh, const std::shared_ptr<Sample>& sample,
160 const std::string& pattern = ".*");
161 void scanForTrees (SampleHandler& sh, const std::string& pattern = ".*");
162
163
168 void readFileList (SampleHandler& sh, const std::string& name,
169 const std::string& file);
170}
171
172#endif
an interface for listing directory contents, locally or on a file server
Definition DiskList.h:25
A class that manages a list of Sample objects.
a base class that manages a set of files belonging to a particular data set and the associated meta-d...
Definition Sample.h:49
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition DiskList.cxx:21
void 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: ...
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....
void scanDQ2(SampleHandler &sh, const std::string &pattern)
effects: make a list from DQ2 using the given pattern guarantee: basic, may add partially failures: o...
void scanForTrees(SampleHandler &sh, const std::shared_ptr< Sample > &sample, const std::string &pattern)
effects: scan for trees in the given sample (or sample handler), and create a separate sample for eac...
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/...
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:...
void scanFiles(SampleHandler &sh, DiskList &list, const std::string &pattern)
effects: scan the given directory tree and make a separate sample for each file (using the file name ...
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 opene...
void scanDir(SampleHandler &sh, DiskList &list, const std::string &pattern, const std::string &samplePattern, const std::string &samplePostfix)
effects: scan the given directory and add all subdirectories as samples that contain root files.
void scanRucio(SampleHandler &sh, const std::string &pattern, bool alwaysQuery)
make a list of grid datasets using the given pattern
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 failu...
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 ...
std::unique_ptr< Sample > makeFromTChainUnique(const std::string &name, const TChain &chain)
effects: create a sample with the given name from the given TChain object guarantee: strong failures:...
TFile * file