Crombie Tools
InDirectoryHolder Class Reference

This class is used to facilitate running over files in a directory. More...

#include <InDirectoryHolder.h>

+ Inheritance diagram for InDirectoryHolder:

Public Member Functions

 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 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

TString fInDirectory = ""
 Stores the input directory, and always ends with a '/'. More...
 

Additional Inherited Members

- Public Types inherited from Debug
enum  DebugLevel { eQuiet = 0, eError, eInfo, eDebug }
 Different possible debug levels. More...
 

Detailed Description

This class is used to facilitate running over files in a directory.

Main purpose is to centralize function of adding input directory to the filename when considering said file.

Definition at line 41 of file InDirectoryHolder.h.

Constructor & Destructor Documentation

§ InDirectoryHolder()

InDirectoryHolder::InDirectoryHolder ( )
inline

Definition at line 44 of file InDirectoryHolder.h.

§ ~InDirectoryHolder()

virtual InDirectoryHolder::~InDirectoryHolder ( )
inlinevirtual

Definition at line 45 of file InDirectoryHolder.h.

Member Function Documentation

§ AddInDir()

TString InDirectoryHolder::AddInDir ( TString  FileName)
protected

A helper function that prepends the input directory to a filename.

Parameters
FileNameis the name of a file inside the fInDirectory or an absolute path.
Returns
FileName with the input directory prepended, unless absolute or fInDirectory is empty, where it is left alone.

Definition at line 70 of file InDirectoryHolder.h.

References AddDirectory(), test::code, Debug::eError, fInDirectory, and Debug::Message().

Referenced by PlotTriggerEfficiency::AddDataFile(), FileConfigReader::AddFile(), CorrectorApplicator::ApplyCorrections(), GetInDirectory(), LimitTreeMaker::ReadExceptionConfig(), FileConfigReader::ReadMCConfig(), and FlatSkimmer::Skim().

§ GetInDirectory()

TString InDirectoryHolder::GetInDirectory ( ) const
inline
Returns
the input directory

Definition at line 50 of file InDirectoryHolder.h.

References AddInDir(), and fInDirectory.

Referenced by FileConfigReader::ReadMCConfig().

§ SetInDirectory()

void InDirectoryHolder::SetInDirectory ( TString  dir)
inline

Sets the input directory where the MCFiles will be searched for, and adds a "/" if needed.

Definition at line 48 of file InDirectoryHolder.h.

References fInDirectory.

Referenced by LimitTreeMaker::ReadExceptionConfig(), and FileConfigReader::ReadMCConfig().

Member Data Documentation

§ fInDirectory

TString InDirectoryHolder::fInDirectory = ""
private

Stores the input directory, and always ends with a '/'.

Definition at line 64 of file InDirectoryHolder.h.

Referenced by AddInDir(), GetInDirectory(), and SetInDirectory().


The documentation for this class was generated from the following file: