ATLAS Offline Software
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 
5 #ifndef SAMPLE_HANDLER_TOOLS_DISCOVERY_H
6 #define SAMPLE_HANDLER_TOOLS_DISCOVERY_H
7 
8 //
9 // Distributed under the Boost Software License, Version 1.0.
10 // (See accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
12 
13 // Please feel free to contact me (krumnack@iastate.edu) for bug
14 // reports, feature suggestions, praise and complaints.
15 
16 
21 
22 
23 
24 //protect
25 #include <SampleHandler/Global.h>
26 
27 #include <string>
28 #include <vector>
29 
30 class TChain;
31 
32 namespace SH
33 {
44  [[deprecated("please use new ScanDir() mechanism instead")]]
45  void scanDir (SampleHandler& sh, DiskList& list,
46  const std::string& pattern = "*.root*",
47  const std::string& samplePattern = "*",
48  const std::string& samplePostfix = "");
49  [[deprecated("please use new ScanDir() mechanism instead")]]
50  void scanDir (SampleHandler& sh, const std::string& dir);
51  [[deprecated("please use new ScanDir() mechanism instead")]]
52  void scanDir (SampleHandler& sh, const std::string& dir,
53  const std::string& prefix);
54 
55 
60  [[deprecated("please use new ScanDir() mechanism instead")]]
61  void scanSingleDir (SampleHandler& sh, const std::string& name,
62  DiskList& list, const std::string& pattern = "*.root*");
63 
64 
72  [[deprecated("please use new ScanDir() mechanism instead")]]
73  void scanFiles (SampleHandler& sh, DiskList& list,
74  const std::string& pattern = "*.root*");
75 
76 
81  Sample *makeFromTChain (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, 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
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
SH::scanDir
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.
Definition: ToolsDiscovery.cxx:45
SH::scanDQ2
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...
Definition: ToolsDiscovery.cxx:124
SH::scanFiles
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 ...
Definition: ToolsDiscovery.cxx:86
taskman.dsName
dsName
Definition: taskman.py:292
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
RCU::Shell
Definition: ShellExec.cxx:28
SH::makeFromTChain
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:...
Definition: ToolsDiscovery.cxx:98
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
file
TFile * file
Definition: tile_monitor.h:29
SH::scanRucio
void scanRucio(SampleHandler &sh, const std::string &pattern, bool alwaysQuery)
make a list of grid datasets using the given pattern
Definition: ToolsDiscovery.cxx:146
SH::scanSingleDir
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: ...
Definition: ToolsDiscovery.cxx:112
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
SH::addGrid
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....
Definition: ToolsDiscovery.cxx:175
beamspotman.dir
string dir
Definition: beamspotman.py:623
SH::addGridCombined
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...
Definition: ToolsDiscovery.cxx:193
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CxxUtils::to
CONT to(RANGE &&r)
Definition: ranges.h:32
runJobs.deprecated
deprecated
Definition: runJobs.py:191
SH::makeGridDirect
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...
Definition: ToolsDiscovery.cxx:249
SH::scanForTrees
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 eac...
Definition: ToolsDiscovery.cxx:326
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
SH::addGridCombinedFromFile
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 ...
Definition: ToolsDiscovery.cxx:215
Global.h
SH::readFileList
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/...
Definition: ToolsDiscovery.cxx:371