Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TDirectoryHelper.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TDirectoryHelper.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef FUN4ALL_TDIRECTORYHELPER_H
4 #define FUN4ALL_TDIRECTORYHELPER_H
5 
6 #include <string>
7 #include <vector>
8 
9 class TH1;
10 class TDirectory;
11 class TFile;
12 
14 {
15  public:
16  static void duplicateDir(TDirectory* dest, TDirectory* source);
17 
18  static TH1* getHisto(TDirectory* dir, const std::string& histoname,
19  const std::string& where);
20 
21  static TDirectory* mkdir(TDirectory* topDir,
22  const std::string& path,
23  std::vector<std::string>* titles = 0);
24 
25  static bool mkpath(TDirectory* dir, const std::string& path);
26 
27  static void copyToFile(TDirectory* src, TFile* dest);
28 
29  static bool pathIsInDir(const std::string& path, TDirectory* dir);
30 
31  static void splitPath(const std::string& path,
32  std::vector<std::string>& paths);
33 };
34 
35 #endif