|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef XAODROOTACCESS_TOOLS_TFILEMERGER_H
9 #define XAODROOTACCESS_TOOLS_TFILEMERGER_H
57 const std::string&
mode =
"RECREATE" );
61 bool copyLocally =
false );
127 std::map< std::string, std::unique_ptr< TEvent > >
m_events;
152 #endif // XAODROOTACCESS_TOOLS_TFILEMERGER_H
int m_verbosity
Verbosity level.
StatusCode merge(EMergeMode mode=kFastMerge, ::Long64_t entries=kBigNumber)
Execute the file merge itself.
int verbosity() const
The current verbosity level.
std::vector< ::TFile * > m_helperFiles
Helper in-memory files used during fast merging.
void setVerbosity(int value)
Set verbosity level (meant for debugging mainly)
StatusCode addFile(const std::string &name, bool copyLocally=false)
Add a file to the list to be merged, by name.
TEvent::EAuxMode m_mode
Access mode for the created TEvent objects.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
StatusCode closeFiles()
Close all the open files.
StatusCode createMetaDataTools()
Instantiate the metadata handling tools.
std::vector< bool > m_copiedInput
Whether the files were copied locally before being merged.
StatusCode addAuxBranch(::TTree *otree, ::TBranch *ibranch) const
Duplicate an auxiliary branch from the input into the output.
@ kSlowMerge
Merging is done using TEvent.
StatusCode addMetaDataTool(const std::string &typeName)
Add a metadata tool to be used during the merging.
std::map< std::string, THolder > m_metaDataTools
Metadata tools instantiated for the file merging.
std::set< std::string > m_treesToSkip
Names of the TTrees to skip from the merge.
std::vector< ::TBranch * > getSkippedBranches(::TTree *tree) const
Get the branches that should be skipped from merging.
::StatusCode StatusCode
StatusCode definition for legacy code.
~TFileMerger()
Destructor.
TFileMerger()
Default constructor.
TEvent::EAuxMode accessMode() const
The access mode used for slow and metadata merging.
::TFile * m_output
The output file to write to.
std::set< std::string > m_metaDataToolNames
Names of the metadata handling tools.
StatusCode setOutputFileName(const std::string &name, const std::string &mode="RECREATE")
Set the name of the output file that should be created.
Helper class for merging xAOD files.
@ kFastMerge
Merging is done using fast TTree merge.
const std::set< std::string > & treesSkipped() const
Get the names of the trees that will be skipped from the merge.
EAuxMode
Auxiliary store "mode".
std::vector< ::TFile * > m_input
The list of input files to be merged.
void setAccessMode(TEvent::EAuxMode mode)
Set the access mode used for slow and metadata merging.
EMergeMode
Types of merging that can be done.
::Long64_t m_entriesToMerge
Events to merge into the output.
static const ::Long64_t kBigNumber
Number of entries that are assumed to be never exceeded in a file.
StatusCode mergeDirectory(::TDirectory &input, ::TDirectory &output, EMergeMode mode, bool topLevelDir)
Merge the contents of one directory from the input files.
void addTreeToSkip(const std::string &name)
Add a tree name that should be skipped during the merging.
StatusCode mergeObject(::TObject &input, ::TObject &output)
Merge two top level objects that were found in the inputs.
std::map< std::string, std::unique_ptr< TEvent > > m_events
Helper objects for merging the xAOD Tree(s) from the input file(s)
std::vector< ::TBranch * > getMissingBranches(::TTree *first, ::TTree *second) const
Get the auxiliary branches missing in one of the trees.