HighLAND
|
#include <HighlandInputManager.hxx>
Public Member Functions | |
HighlandInputManager () | |
Constructor. | |
virtual | ~HighlandInputManager () |
Destructor, which cleans up the spills. | |
void | Reset () |
Reset the converters and the UniqueID. | |
void | DeleteSpill () |
clean up the remaining pointers to the spills. | |
bool | LoadSpill (Long64_t &entry) |
bool | InputIsOriginalTree () |
Whether an OriginalTree converter has been selected. | |
const AnaSpillC & | GetRawSpill () |
Get the current spill (constant, as read in from the input file). | |
void | SetRawSpill (AnaSpillC *RawSpill) |
Set the current spill (constant, as read in from the input file). | |
const AnaBunchC & | GetRawBunch () |
Get the current bunch (constant, as read in from the input file). | |
AnaBunchC & | GetCorrectedBunch () |
Get the current bunch (to have corrections applied to it). | |
AnaBunchC & | GetBunch () |
Get the current bunch (to have corrections and systematics applied to it). | |
void | SetCurrentBunch (int ibunch) |
Set the current bunch index. | |
void | ResetSpillToRaw () |
Create the event. More... | |
![]() | |
InputManager () | |
Constructor. | |
virtual | ~InputManager () |
Destructor, which cleans up the spills. | |
bool | Initialize (const std::string &infile_name, const std::string &conv, const bool isCosmic=false) |
bool | ReadFile (const std::string &infile_name, bool isROOTFile) |
bool | LoadEvent (Long64_t &entry, bool delPrevious=true) |
Long64_t | LoadTree (Long64_t entry) |
Call InputConverter::LoadTree() for the selected converter. | |
Long64_t | GetEntries () |
Return the number of entries in the input file tree(s). | |
Int_t | GetNEvents (Int_t entries=-1) |
Return the number of events for a given number of entries in the input file tree(s). | |
TChain * | GetChain (const std::string &name) |
Get a TChain with a specific name from the selected converter. | |
std::string | FindFirstFile (const std::string &infile_name, bool isROOTFile) |
bool | IsROOTFile (const std::string &infile_name) |
Is this a ROOT file ? | |
InputConverter & | GetConverter () |
Get the current selected converter. | |
void | SelectConverter (InputConverter *sel) |
Set this converter as the selected one. | |
void | SelectConverter (const std::string &conv) |
Set the converter with name as the selected one. | |
void | AddConverter (const std::string &name, InputConverter *conv) |
Add this converter to the vector of recognised converters. | |
void | ReplaceConverter (const std::string &name, InputConverter *conv) |
Replace an existing converter. | |
bool | HasConverter (const std::string &conv, bool err_message=true) |
Whether the vector of converters contains one registered with this name. | |
void | IncrementPOTBySpill () |
bool | InputIsFlatTree () |
Whether a FlatTree converter has been selected. | |
bool | InputIsMiniTree () |
Whether a FlatTree converter has been selected. | |
void | RemoveConverters () |
Delete all the converters that have been added. | |
void | MakeFinalSpill () |
Creates a clone of the corrected Spill. This must be done after applying corrections. | |
AnaSpillC & | GetCorrectedSpill () |
Get the current spill (to have corrections applied to it). | |
AnaSpillC & | GetSpill () |
Get the current spill (to have corrections and systematics applied to it). | |
void | SetCorrectedSpill (AnaSpillC *Spill) |
Set the current spill (to have corrections applied to it). | |
AnaSuperEventB & | GetSuperEvent () |
Create the event. More... | |
void | ResetSpillToCorrected () |
bool | AddDataFileToConverter (const std::string &infile_name, const std::string &conv, const bool isCosmic=false, bool reset=false) |
bool | GetIsMC () |
const std::string & | GetSoftwareVersion () |
Returns the software version from the header. | |
Header & | header () |
Additional Inherited Members | |
![]() | |
std::vector< InputConverter * > | _converters |
Vector of converters. | |
InputConverter * | _selected |
Selected converter. | |
AnaSpillC * | _CorrectedSpill |
The current corrected spill. | |
AnaSpillC * | _Spill |
The current spill with corrections and systematics. | |
AnaSuperEventB * | _sevent |
The super event. | |
AnaSuperEventB * | _prevSEvent |
The previous Super Event for deleting if necessary. | |
bool | _IsMC |
Data/MC status. | |
Int_t | _uniqueID |
The current Event UniqueID. | |
class to handle correctly any input file and convert it into the analysis structure. It contains a collection of InputConverters, and automatically selects the correct converter based on the file type.
The manager keeps track of the current active spill, and provides three copies:
Definition at line 17 of file HighlandInputManager.hxx.
|
virtual |
Read one or several entries in the input tree(s) to fill a raw AnaSpill, and sets the CorrectedSpill and Spill as copies of it (to be manipulated later). The argument entry (the entry number in the input tree) will be modified inside the method by the specific converter (hence the non-cont reference). The way entry is modified will depend on whether the input file is SPILL based (every call to this method will increment by one the argument entry) or EVENT based (entry number will be incremented in several units to account for several events – bunches – in the same spill). At the moment oaAnalysis and MiniTree are SPILL based while FlatTree is EVENT based.
Examples on how to use this method are available in highland2/highlandTools/vXrY/src/AnalysisLoop.cxx, and highland2/highlandTools/vXrY/src/SimpleLoopBase.cxx. Just search for LoadSpill in those files.
This method Returns whether the event was successfully filled.
Reimplemented from InputManager.
Definition at line 33 of file HighlandInputManager.cxx.
void HighlandInputManager::ResetSpillToRaw | ( | ) |
Create the event.
Reset the main spill to the raw spill. This removes all the variations applied by the systematics.
Definition at line 49 of file HighlandInputManager.cxx.