12 #include "Utils/HistogramUtils.h"
21 #include "TFileMerger.h"
43 bool ShouldSkipLine(
const std::string& line,
const std::vector<std::string>& SkipVector);
49 bool CompareTwoConfigs(
const std::string& File1,
const std::string& File2,
const std::vector<std::string>& SkipVector);
52 bool checkSoftwareVersions(TFile *file, TFile *prevFile,
const std::string& ConfigName,
const std::vector<std::string>& SkipVector = {});
55 void CopyDir(TDirectory *source);
59 bool CompareHistograms(
const TH1* h1,
const TH1* h2,
const std::string& histName,
const std::string& folderName);
62 bool CheckFolder(TFile* file, TFile* prevFile,
const std::string& FolderName,
const std::vector<std::string>& SkipVector = {});
66 void FastMergeTTrees(
const std::vector<std::string>& files,
const std::string& outFile,
const std::string& TTreeName);
#define _MaCh3_Safe_Include_Start_
KS: Avoiding warning checking for headers.
#define _MaCh3_Safe_Include_End_
Allows you to combine multiple chains or ROOT files into a single output.
void FastMergeTTrees(const std::vector< std::string > &files, const std::string &outFile, const std::string &TTreeName)
custom function for merging TTree, should be similar to what HADD is using
std::vector< std::string > inpFileList
int Run() override
Execute the application.
virtual ~CombineModule()
Destructor.
bool ShouldSkipLine(const std::string &line, const std::vector< std::string > &SkipVector)
KS: This allow us to skip output name etc in config. We expect Output name will be different but this...
bool CompareTwoConfigs(const std::string &File1, const std::string &File2, const std::vector< std::string > &SkipVector)
make sure two configs are identical but skip specified fields. For example when comparing two chains ...
bool CompareHistograms(const TH1 *h1, const TH1 *h2, const std::string &histName, const std::string &folderName)
Compare two histograms if they are identical.
void CopyDir(TDirectory *source)
When we merge two chains they have TDirectory ROOT didn't provide method for this so here we have thi...
MaCh3ArgumentParser * get_parser() override
Get the argument parser for this module.
bool CheckFolder(TFile *file, TFile *prevFile, const std::string &FolderName, const std::vector< std::string > &SkipVector={})
Loop through TH1 and TMacro objects in FolderName in 'file' and compare with those in 'prevFile'.
bool checkSoftwareVersions(TFile *file, TFile *prevFile, const std::string &ConfigName, const std::vector< std::string > &SkipVector={})
EM: Will compare the version header contained in the two provided files and shout if they don't match...
Extended ArgumentParser with MaCh3-specific functionality.
Base class for core modules in MaCh3.
Main namespace for MaCh3 software.
Plugin interface and registration macros for MaCh3.