Crombie Tools
|
nThis class is used to facilitate writing files to a directory. More...
#include <InOutDirectoryHolder.h>
Public Member Functions | |
InOutDirectoryHolder () | |
virtual | ~InOutDirectoryHolder () |
TString | GetOutDirectory () const |
void | SetInputOutputMap (TString input, TString output) |
Adds a mapping from input to output file name. More... | |
void | SetOutDirectory (TString dir) |
Sets the output directory where the files will be written, and adds a "/" if needed. More... | |
void | SetOverwriteFiles (Bool_t overwrite) |
Sets whether or not to overwrite files. More... | |
Public Member Functions inherited from InDirectoryHolder | |
InDirectoryHolder () | |
virtual | ~InDirectoryHolder () |
TString | GetInDirectory () const |
void | SetInDirectory (TString dir) |
Sets the input directory where the MCFiles will be searched for, and adds a "/" if needed. More... | |
Public Member Functions inherited from Debug | |
Debug () | |
virtual | ~Debug () |
DebugLevel | GetDebugLevel () |
Gets the verbosity for a class. More... | |
template<typename T , typename... V> | |
void | Message (DebugLevel level, T message, V... more) |
Sends a message if the verbosity level is appropriate. More... | |
void | Message (DebugLevel level) |
void | SetDebugLevel (DebugLevel level) |
Sets the verbosity for a class. More... | |
Protected Member Functions | |
TString | AddOutDir (TString FileName) const |
A helper function that prepends the output directory to a filename. More... | |
Protected Member Functions inherited from InDirectoryHolder | |
TString | AddInDir (TString FileName) |
A helper function that prepends the input directory to a filename. More... | |
Protected Member Functions inherited from Debug | |
void | DisplayFunc (const char *func) |
Sends the name of the function during debuggin. More... | |
Private Attributes | |
std::map< TString, TString > | fInOutMap |
Stores name changes from input to output directories. More... | |
TString | fOutDirectory = "" |
Stores the output directory, and always ends with a '/'. More... | |
Bool_t | fOverwriteFiles = true |
Sets whether or not to overwrite output files. More... | |
Additional Inherited Members | |
Public Types inherited from Debug | |
enum | DebugLevel { eQuiet = 0, eError, eInfo, eDebug } |
Different possible debug levels. More... | |
n
This class is used to facilitate writing files to a directory.
Main purpose is to centralize function of adding output directory to the filename when considering said file.
Definition at line 24 of file InOutDirectoryHolder.h.
|
inline |
Definition at line 27 of file InOutDirectoryHolder.h.
|
inlinevirtual |
Definition at line 28 of file InOutDirectoryHolder.h.
|
protected |
A helper function that prepends the output directory to a filename.
FileName | is the name of a file inside the fOutDirectory or an absolute path. |
Definition at line 60 of file InOutDirectoryHolder.h.
References AddDirectory(), test::code, fInOutMap, fOutDirectory, and fOverwriteFiles.
Referenced by PlotFitParameters::DoFit(), Plot2D::DoFit(), PlotStack::MakeCanvas(), LimitTreeMaker::MakeTrees(), SetInputOutputMap(), and FlatSkimmer::Skim().
|
inline |
Definition at line 33 of file InOutDirectoryHolder.h.
References fOutDirectory.
|
inline |
Adds a mapping from input to output file name.
Definition at line 38 of file InOutDirectoryHolder.h.
References AddOutDir(), fInOutMap, and hadd::input.
|
inline |
Sets the output directory where the files will be written, and adds a "/" if needed.
Definition at line 31 of file InOutDirectoryHolder.h.
References fOutDirectory.
|
inline |
Sets whether or not to overwrite files.
Definition at line 35 of file InOutDirectoryHolder.h.
References fOverwriteFiles.
|
private |
Stores name changes from input to output directories.
Definition at line 52 of file InOutDirectoryHolder.h.
Referenced by AddOutDir(), and SetInputOutputMap().
|
private |
Stores the output directory, and always ends with a '/'.
Definition at line 53 of file InOutDirectoryHolder.h.
Referenced by AddOutDir(), GetOutDirectory(), and SetOutDirectory().
|
private |
Sets whether or not to overwrite output files.
Definition at line 54 of file InOutDirectoryHolder.h.
Referenced by AddOutDir(), and SetOverwriteFiles().