|
Crombie Tools
|
Can be created using the CrombieTools.SkimmingTools.FlatSkimmer module. More...
#include <FlatSkimmer.h>
Inheritance diagram for FlatSkimmer:Public Member Functions | |
| FlatSkimmer () | |
| virtual | ~FlatSkimmer () |
| void | AddCopyObject (TString name) |
| Add name of TObject to copy from input file to output file unchanged. More... | |
| void | AddEventFilter (TString filterName) |
| Adds an event filter list to be removed during skimming. More... | |
| FlatSkimmer * | Copy () |
| Copy this FlatSkimmer for parallelization. More... | |
| void | RunOnFile (TString name) |
| Wrapper to be used by CrombieTools.Parallelization.RunOnDirectory() More... | |
| void | SetCheckDuplicates (Bool_t check) |
| Set flag to check for duplicate events. More... | |
| void | SetCut (TString cut) |
| Set cut that events must pass. More... | |
| void | SetDisableFile (TString name) |
| Gives a file that contains names of branches to not activate. More... | |
| void | SetEventExpr (TString expr) |
| Set branch name for event number. More... | |
| void | SetGoodLumiFilter (GoodLumiFilter *filter) |
| Set GoodLumiFilter to determine good events. More... | |
| void | SetKeepFile (TString name) |
| Gives a file that contains names of branches to activate. More... | |
| void | SetLumiExpr (TString expr) |
| Set branch name for lumi number. More... | |
| void | SetRunExpr (TString expr) |
| Set branch name for run number. More... | |
| void | SetTreeName (TString name) |
| Set input tree name. More... | |
| void | Skim (TString fileName) |
| Skims a file from the input directory and places it in the output. More... | |
Public Member Functions inherited from InOutDirectoryHolder | |
| 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... | |
Public Member Functions inherited from ProgressReporter | |
| ProgressReporter () | |
| virtual | ~ProgressReporter () |
| void | SetReportFrequency (Long64_t freq) |
| Sets the frequency of reporting progress to terminal. More... | |
Private Attributes | |
| Int_t | fCheckDuplicates = false |
| Flag to check duplicates. More... | |
| std::vector< TString > | fCopyObjects |
| List of TObject names to also copy from original file. More... | |
| TString | fCut = "1" |
| Event cut. More... | |
| TString | fDisableFile = "" |
| File to look for branches to disable. More... | |
| TString | fEventExpr = "eventNumber" |
| Branch for event number. More... | |
| std::set< TString > | fEventFilter |
| Events to skim out. More... | |
| GoodLumiFilter | fGoodLumiFilter |
| GoodLumiFilter for this FlatSkimmer. More... | |
| TString | fKeepFile = "" |
| File to look for branches to keep. More... | |
| TString | fLumiExpr = "lumiNumber" |
| Branch for lumi number. More... | |
| TString | fRunExpr = "runNumber" |
| Branch for run number. More... | |
| TString | fTreeName = "events" |
| Tree name of flat tree to read. More... | |
Additional Inherited Members | |
Public Types inherited from Debug | |
| enum | DebugLevel { eQuiet = 0, eError, eInfo, eDebug } |
| Different possible debug levels. More... | |
Protected Member Functions inherited from InOutDirectoryHolder | |
| 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... | |
Protected Member Functions inherited from ProgressReporter | |
| void | ReportProgress (Long64_t entry) |
| Sends report to the terminal if needed. More... | |
| void | SetNumberOfEntries (Long64_t nentries) |
| Sets the number of entries to process. More... | |
| Long64_t | SetNumberOfEntries (TTree *tree) |
| Sets the number of entries to process from a tree. More... | |
| void | SetReportFile (TString name) |
| Sets the name of the file to report to the terminal. More... | |
Protected Attributes inherited from ProgressReporter | |
| Long64_t | fNumberOfEntries = 0 |
| Number of entries being run over. More... | |
Can be created using the CrombieTools.SkimmingTools.FlatSkimmer module.
Skims events out of a flat tree. Takes files from one directory, and writes copies to another directory, taking out events based on a cut string, event filters, a GoodLumiFilter, and duplicate events.
Definition at line 30 of file FlatSkimmer.h.
| FlatSkimmer::FlatSkimmer | ( | ) |
Referenced by Copy().
|
virtual |
Definition at line 24 of file FlatSkimmer.cc.
|
inline |
Add name of TObject to copy from input file to output file unchanged.
Definition at line 57 of file FlatSkimmer.h.
References fCopyObjects.
| void FlatSkimmer::AddEventFilter | ( | TString | filterName | ) |
Adds an event filter list to be removed during skimming.
And event filter list must be a text file consisting of events to remove in the format <RunNumber>:<LumiNumber>:<EventNumber>. Multiple event filters can be added.
Definition at line 36 of file FlatSkimmer.cc.
References fEventFilter.
| FlatSkimmer * FlatSkimmer::Copy | ( | ) |
Copy this FlatSkimmer for parallelization.
Definition at line 175 of file FlatSkimmer.cc.
References FlatSkimmer().
|
inline |
Wrapper to be used by CrombieTools.Parallelization.RunOnDirectory()
Definition at line 60 of file FlatSkimmer.h.
References Skim().
|
inline |
Set flag to check for duplicate events.
Definition at line 55 of file FlatSkimmer.h.
References fCheckDuplicates.
|
inline |
|
inline |
Gives a file that contains names of branches to not activate.
Definition at line 63 of file FlatSkimmer.h.
References fDisableFile.
|
inline |
Set branch name for event number.
Definition at line 53 of file FlatSkimmer.h.
References fEventExpr.
|
inline |
Set GoodLumiFilter to determine good events.
Definition at line 43 of file FlatSkimmer.h.
References fGoodLumiFilter.
|
inline |
Gives a file that contains names of branches to activate.
Definition at line 66 of file FlatSkimmer.h.
References fKeepFile.
|
inline |
|
inline |
|
inline |
| void FlatSkimmer::Skim | ( | TString | fileName | ) |
Skims a file from the input directory and places it in the output.
Skimming is done using a cut, GoodLumiFilter, event filters, and possibly removing duplicate events. The duplicate events flag is false by default because it's a very expensive check. The function reports the number of events removed from the file from each mechanism.
Definition at line 58 of file FlatSkimmer.cc.
References InDirectoryHolder::AddInDir(), InOutDirectoryHolder::AddOutDir(), oldmaketree::branch, fCheckDuplicates, fCopyObjects, fCut, fDisableFile, fEventExpr, fEventFilter, fGoodLumiFilter, fKeepFile, fLumiExpr, fRunExpr, fTreeName, localslim::inFile, GoodLumiFilter::IsGood(), dojob::outFile, ProgressReporter::ReportProgress(), ProgressReporter::SetNumberOfEntries(), and ProgressReporter::SetReportFile().
Referenced by RunOnFile().
|
private |
Flag to check duplicates.
Definition at line 78 of file FlatSkimmer.h.
Referenced by SetCheckDuplicates(), and Skim().
|
private |
List of TObject names to also copy from original file.
Definition at line 79 of file FlatSkimmer.h.
Referenced by AddCopyObject(), and Skim().
|
private |
|
private |
File to look for branches to disable.
Definition at line 76 of file FlatSkimmer.h.
Referenced by SetDisableFile(), and Skim().
|
private |
Branch for event number.
Definition at line 75 of file FlatSkimmer.h.
Referenced by SetEventExpr(), and Skim().
|
private |
Events to skim out.
Definition at line 69 of file FlatSkimmer.h.
Referenced by AddEventFilter(), and Skim().
|
private |
GoodLumiFilter for this FlatSkimmer.
Definition at line 70 of file FlatSkimmer.h.
Referenced by SetGoodLumiFilter(), and Skim().
|
private |
File to look for branches to keep.
Definition at line 77 of file FlatSkimmer.h.
Referenced by SetKeepFile(), and Skim().
|
private |
Branch for lumi number.
Definition at line 74 of file FlatSkimmer.h.
Referenced by SetLumiExpr(), and Skim().
|
private |
Branch for run number.
Definition at line 73 of file FlatSkimmer.h.
Referenced by SetRunExpr(), and Skim().
|
private |
Tree name of flat tree to read.
Definition at line 72 of file FlatSkimmer.h.
Referenced by SetTreeName(), and Skim().