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 124 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 565 of file TreeBranchHelpers.cxx.

567 {
568 isNominal = true;
569
570 if (branchConfig.sgName.find ("%SYS%") != std::string::npos)
571 {
572 CP::SystematicSet matching;
573 if (SystematicSet::filterForAffectingSystematics (sys, branchConfig.sgNameFilterSys, matching).isFailure())
574 return StatusCode::FAILURE;
575 if (sysSvc.makeSystematicsName (sgName, branchConfig.sgName, matching).isFailure())
576 return StatusCode::FAILURE;
577 if (!matching.empty())
578 isNominal = false;
579 } else
580 sgName = branchConfig.sgName;
581
582 if (branchConfig.auxName.find ("%SYS%") != std::string::npos)
583 {
584 CP::SystematicSet matching;
585 if (SystematicSet::filterForAffectingSystematics (sys, branchConfig.auxNameFilterSys, matching).isFailure())
586 return StatusCode::FAILURE;
587 if (sysSvc.makeSystematicsName (auxName, branchConfig.auxName, matching).isFailure())
588 return StatusCode::FAILURE;
589 if (!matching.empty())
590 isNominal = false;
591 } else
592 auxName = branchConfig.auxName;
593
594 if (branchConfig.branchName.find ("%SYS%") != std::string::npos)
595 {
596 CP::SystematicSet matching;
597 if (SystematicSet::filterForAffectingSystematics (sys, branchConfig.branchNameFilterSys, matching).isFailure())
598 return StatusCode::FAILURE;
599 if (sysSvc.makeSystematicsName (branchName, branchConfig.branchName, matching).isFailure())
600 return StatusCode::FAILURE;
601 if (matching.empty() && !isNominal)
602 {
603 msg << MSG::FATAL << "Branch \"" << branchName << "\" is not affected by any of the requested systematics but is not nominal." << endmsg;
604 return StatusCode::FAILURE;
605 }
606 } else
607 {
608 branchName = branchConfig.branchName;
609 if (!sys.empty())
610 {
611 msg << MSG::FATAL << "Branch \"" << branchName << "\" without systematics is evaluated in a non-nominal context." << endmsg;
612 return StatusCode::FAILURE;
613 }
614 }
615
616 return StatusCode::SUCCESS;
617 }
#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 139 of file TreeBranchHelpers.h.

◆ branchConfig

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

the BranchConfig we are based on

Definition at line 127 of file TreeBranchHelpers.h.

◆ branchName

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

the name of the output branch

Definition at line 142 of file TreeBranchHelpers.h.

◆ isNominal

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

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

Definition at line 133 of file TreeBranchHelpers.h.

◆ sgName

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

the SG name of the object to read from

Definition at line 136 of file TreeBranchHelpers.h.

◆ sysIndex

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

the index in the systematics list

Definition at line 130 of file TreeBranchHelpers.h.


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