![]() |
MaCh3 2.2.1
Reference Guide
|
Combine chains files produced by MCMC, enforcing the condition that all the files to combine were made using the exact same software versions and config files. More...
#include <unistd.h>
#include "Manager/Manager.h"
#include "Samples/SampleStructs.h"
#include "TList.h"
#include "TFile.h"
#include "TMacro.h"
#include "TTree.h"
#include "TMD5.h"
#include "TFileMerger.h"
#include "TKey.h"
#include "TROOT.h"
Go to the source code of this file.
Functions | |
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 doesn't invalidate chain merging. | |
bool | CompareTwoConfigs (const std::string &File1, const std::string &File2, const std::vector< std::string > &SkipVector) |
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. | |
void | CopyDir (TDirectory *source) |
bool | CompareHistograms (const TH1 *h1, const TH1 *h2, const std::string &histName, const std::string &folderName) |
Compare two histograms if they are identical. | |
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'. | |
void | CombineChain () |
void | usage () |
void | ParseArg (int argc, char *argv[]) |
int | main (int argc, char *argv[]) |
Variables | |
std::string | OutFileName = "" |
int | targetCompression = 1 |
std::vector< std::string > | inpFileList |
bool | forceOverwrite = false |
bool | forceMerge = false |
Combine chains files produced by MCMC, enforcing the condition that all the files to combine were made using the exact same software versions and config files.
Definition in file CombineMaCh3Chains.cpp.
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'.
Definition at line 153 of file CombineMaCh3Chains.cpp.
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.
Definition at line 80 of file CombineMaCh3Chains.cpp.
void CombineChain | ( | ) |
Definition at line 202 of file CombineMaCh3Chains.cpp.
bool CompareHistograms | ( | const TH1 * | h1, |
const TH1 * | h2, | ||
const std::string & | histName, | ||
const std::string & | folderName | ||
) |
Compare two histograms if they are identical.
Definition at line 135 of file CombineMaCh3Chains.cpp.
bool CompareTwoConfigs | ( | const std::string & | File1, |
const std::string & | File2, | ||
const std::vector< std::string > & | SkipVector | ||
) |
Definition at line 46 of file CombineMaCh3Chains.cpp.
void CopyDir | ( | TDirectory * | source | ) |
Definition at line 97 of file CombineMaCh3Chains.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 382 of file CombineMaCh3Chains.cpp.
void ParseArg | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 318 of file CombineMaCh3Chains.cpp.
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 doesn't invalidate chain merging.
Definition at line 34 of file CombineMaCh3Chains.cpp.
void usage | ( | ) |
Definition at line 306 of file CombineMaCh3Chains.cpp.
bool forceMerge = false |
Definition at line 29 of file CombineMaCh3Chains.cpp.
bool forceOverwrite = false |
Definition at line 28 of file CombineMaCh3Chains.cpp.
std::vector<std::string> inpFileList |
Definition at line 27 of file CombineMaCh3Chains.cpp.
std::string OutFileName = "" |
Definition at line 25 of file CombineMaCh3Chains.cpp.
int targetCompression = 1 |
Definition at line 26 of file CombineMaCh3Chains.cpp.