ATLAS Offline Software
Loading...
Searching...
No Matches
CP::TreeBranchHelpers::OutputBranchData Struct Reference

the data for a single output branch More...

#include <TreeBranchHelpers.h>

Collaboration diagram for CP::TreeBranchHelpers::OutputBranchData:

Public Member Functions

StatusCode configureNames (const BranchConfig &branchConfig, const CP::SystematicSet &sys, ISystematicsSvc &sysSvc, MsgStream &msg)
 configure names for systematics

Public Attributes

const BranchConfigbranchConfig = nullptr
 the BranchConfig we are based on
std::size_t sysIndex = 0u
 the index in the systematics list
bool isNominal = false
 whether this is unaffected by systematics (i.e. nominal)
std::string sgName
 the SG name of the object to read from
std::string auxName
 the name of the decoration in the aux-store
std::string branchName
 the name of the output branch

Detailed Description

the data for a single output branch

Definition at line 128 of file TreeBranchHelpers.h.

Member Function Documentation

◆ configureNames()

StatusCode CP::TreeBranchHelpers::OutputBranchData::configureNames ( const BranchConfig & branchConfig,
const CP::SystematicSet & sys,
ISystematicsSvc & sysSvc,
MsgStream & msg )

configure names for systematics

Definition at line 569 of file TreeBranchHelpers.cxx.

571 {
572 isNominal = true;
573
574 if (branchConfig.sgName.find ("%SYS%") != std::string::npos)
575 {
576 CP::SystematicSet matching;
577 if (SystematicSet::filterForAffectingSystematics (sys, branchConfig.sgNameFilterSys, matching).isFailure())
578 return StatusCode::FAILURE;
579 if (sysSvc.makeSystematicsName (sgName, branchConfig.sgName, matching).isFailure())
580 return StatusCode::FAILURE;
581 if (!matching.empty())
582 isNominal = false;
583 } else
584 sgName = branchConfig.sgName;
585
586 if (branchConfig.auxName.find ("%SYS%") != std::string::npos)
587 {
588 CP::SystematicSet matching;
589 if (SystematicSet::filterForAffectingSystematics (sys, branchConfig.auxNameFilterSys, matching).isFailure())
590 return StatusCode::FAILURE;
591 if (sysSvc.makeSystematicsName (auxName, branchConfig.auxName, matching).isFailure())
592 return StatusCode::FAILURE;
593 if (!matching.empty())
594 isNominal = false;
595 } else
596 auxName = branchConfig.auxName;
597
598 if (branchConfig.branchName.find ("%SYS%") != std::string::npos)
599 {
600 CP::SystematicSet matching;
601 if (SystematicSet::filterForAffectingSystematics (sys, branchConfig.branchNameFilterSys, matching).isFailure())
602 return StatusCode::FAILURE;
603 if (sysSvc.makeSystematicsName (branchName, branchConfig.branchName, matching).isFailure())
604 return StatusCode::FAILURE;
605 if (matching.empty() && !isNominal)
606 {
607 msg << MSG::FATAL << "Branch \"" << branchName << "\" is not affected by any of the requested systematics but is not nominal." << endmsg;
608 return StatusCode::FAILURE;
609 }
610 } else
611 {
612 branchName = branchConfig.branchName;
613 if (!sys.empty())
614 {
615 msg << MSG::FATAL << "Branch \"" << branchName << "\" without systematics is evaluated in a non-nominal context." << endmsg;
616 return StatusCode::FAILURE;
617 }
618 }
619
620 return StatusCode::SUCCESS;
621 }
#define endmsg
bool empty() const
returns: whether the set is empty
static StatusCode filterForAffectingSystematics(const SystematicSet &systConfig, const SystematicSet &affectingSystematics, SystematicSet &filteredSystematics)
description: filter the systematics for the affected systematics returns: success guarantee: strong f...
bool isNominal
whether this is unaffected by systematics (i.e. nominal)
const BranchConfig * branchConfig
the BranchConfig we are based on
std::string auxName
the name of the decoration in the aux-store
std::string sgName
the SG name of the object to read from
std::string branchName
the name of the output branch
MsgStream & msg
Definition testRead.cxx:32

Member Data Documentation

◆ auxName

std::string CP::TreeBranchHelpers::OutputBranchData::auxName

the name of the decoration in the aux-store

Definition at line 143 of file TreeBranchHelpers.h.

◆ branchConfig

const BranchConfig* CP::TreeBranchHelpers::OutputBranchData::branchConfig = nullptr

the BranchConfig we are based on

Definition at line 131 of file TreeBranchHelpers.h.

◆ branchName

std::string CP::TreeBranchHelpers::OutputBranchData::branchName

the name of the output branch

Definition at line 146 of file TreeBranchHelpers.h.

◆ isNominal

bool CP::TreeBranchHelpers::OutputBranchData::isNominal = false

whether this is unaffected by systematics (i.e. nominal)

Definition at line 137 of file TreeBranchHelpers.h.

◆ sgName

std::string CP::TreeBranchHelpers::OutputBranchData::sgName

the SG name of the object to read from

Definition at line 140 of file TreeBranchHelpers.h.

◆ sysIndex

std::size_t CP::TreeBranchHelpers::OutputBranchData::sysIndex = 0u

the index in the systematics list

Definition at line 134 of file TreeBranchHelpers.h.


The documentation for this struct was generated from the following files: