Skip to content
Snippets Groups Projects
Commit e2e61768 authored by Benedict Winter's avatar Benedict Winter
Browse files

Add 'componentFilter' for TransferSystematics to transfer OverallSys or Histosys only

parent f3688ece
No related branches found
Tags v22r1
2 merge requests!664analysis developments,!611WIP: Histogram processing harmonization
Pipeline #1914208 passed
......@@ -42,6 +42,7 @@ namespace TSBaseActions {
bool performTransfer(TQFolder * config,TQFolder* model) const {
TString mode = config->getTagStringDefault("mode","sample");
TString componentFilter = config->getTagStringDefault("componentFilter","OverallSysHistoSys");
TQFolder* histograms = model->getFolder(".Histograms");
bool verbose = config->getTagBoolDefault("~verbose",false);
......@@ -101,6 +102,8 @@ namespace TSBaseActions {
if(verbose) manager->info(TString::Format("\tfor sample '%s'",sample->GetName()));
sample->deleteObject(".Dropped!");
for (const auto& systType : {TString("OverallSys."),TString("HistoSys.")}) {
if (componentFilter=="OverallSys" and systType=="HistoSys.") continue;
if (componentFilter=="HistoSys" and systType=="OverallSys.") continue;
std::vector<TQFolder*> remove;
{
TQFolderIterator oldsystematics(sample->getListOfFolders(systType+"*"),true);
......@@ -190,6 +193,8 @@ namespace TSBaseActions {
if(verbose) manager->info(TString::Format("\tfor sample '%s'",sample->GetName()));
sample->deleteObject(".Dropped!");
for (const auto& systType : {TString("OverallSys."),TString("HistoSys.")}) {
if (componentFilter=="OverallSys" and systType=="HistoSys.") continue;
if (componentFilter=="HistoSys" and systType=="OverallSys.") continue;
std::vector<TQFolder*> remove;
{
TQFolderIterator oldsystematics(sample->getListOfFolders(systType+"*"),true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment