|
ATLAS Offline Software
|
Go to the documentation of this file.
31 cout <<
"Invalid file name (0)" << endl;
48 cout <<
"Cannot open "<<
filename << endl;
55 if (!
m_file->cd(rootDir)) {
56 cout <<
"Cannot change to directory " << rootDir << endl;
75 TString
s(getPathFromDir(
dir));
78 cout <<
"Skipping " <<
s << endl;
82 if (m_verbose) cout <<
"Reading directory "<<
dir.GetPath() << endl;
85 TList* dirList =
dir.GetListOfKeys();
101 if (skipObject(getKeyPath(
dir,*
key))) {
102 m_skippedObjects.push_back(getKeyPath(
dir,*
key).
Data());
112 cout <<
"--- processKey: " <<
key.GetName()
113 <<
" in directory " <<
dir.GetPath() << endl;
120 if (m_skipDirs.Contains(
dir.GetName()))
return kTRUE;
131 Bool_t failMatch(kFALSE);
132 Bool_t passMatch(kFALSE);
134 for (
auto&
re : m_failRE) {
142 for (
auto&
re : m_passRE) {
150 if (m_passBeforeFail)
result = (!passMatch || failMatch);
151 else result = (failMatch && !passMatch);
153 if (m_verbose &&
result) cout <<
"Skipping " <<
name << endl;
163 m_failRE.emplace_back(regexp);
172 m_passRE.emplace_back(regexp);
180 TString
s(
dir.GetPath());
181 if (
s.Index(
"../")==0)
s.Remove(0,3);
182 s.ReplaceAll(
":",
"");
190 TString
s(
dir.GetPath()+TString(
"/")+
key.GetName());
192 s.Replace(0,
s.First(
":")+2,0);
Bool_t skipDir(const TDirectory &dir)
void addFailRegexp(const char *regexp)
Skip keys that match this regexp.
void processFile(const char *filename, const char *rootDir=0)
virtual Int_t run(const char *filename, const char *rootDir=0)
Start processing.
std::unique_ptr< TFile > m_file
description: this is a custom writer for the old-school drivers that don't use an actual writer
void addPassRegexp(const char *regexp)
Never skip keys that match this regexp.
TString getPathFromDir(const TDirectory &dir)
const boost::regex re(r_e)
void processDir(TDirectory &dir)
TString getKeyPath(const TDirectory &dir, const TKey &key)
virtual void processKey(TDirectory &dir, TKey &key)
Method called for every key.
Bool_t skipObject(const char *name)