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

544 {
545 isNominal = true;
546
547 if (branchConfig.sgName.find ("%SYS%") != std::string::npos)
548 {
549 CP::SystematicSet matching;
550 if (SystematicSet::filterForAffectingSystematics (sys, branchConfig.sgNameFilterSys, matching).isFailure())
551 return StatusCode::FAILURE;
552 if (sysSvc.makeSystematicsName (sgName, branchConfig.sgName, matching).isFailure())
553 return StatusCode::FAILURE;
554 if (!matching.empty())
555 isNominal = false;
556 } else
557 sgName = branchConfig.sgName;
558
559 if (branchConfig.auxName.find ("%SYS%") != std::string::npos)
560 {
561 CP::SystematicSet matching;
562 if (SystematicSet::filterForAffectingSystematics (sys, branchConfig.auxNameFilterSys, matching).isFailure())
563 return StatusCode::FAILURE;
564 if (sysSvc.makeSystematicsName (auxName, branchConfig.auxName, matching).isFailure())
565 return StatusCode::FAILURE;
566 if (!matching.empty())
567 isNominal = false;
568 } else
569 auxName = branchConfig.auxName;
570
571 if (branchConfig.branchName.find ("%SYS%") != std::string::npos)
572 {
573 CP::SystematicSet matching;
574 if (SystematicSet::filterForAffectingSystematics (sys, branchConfig.branchNameFilterSys, matching).isFailure())
575 return StatusCode::FAILURE;
576 if (sysSvc.makeSystematicsName (branchName, branchConfig.branchName, matching).isFailure())
577 return StatusCode::FAILURE;
578 if (matching.empty() && !isNominal)
579 {
580 msg << MSG::FATAL << "Branch \"" << branchName << "\" is not affected by any of the requested systematics but is not nominal." << endmsg;
581 return StatusCode::FAILURE;
582 }
583 } else
584 {
585 branchName = branchConfig.branchName;
586 if (!sys.empty())
587 {
588 msg << MSG::FATAL << "Branch \"" << branchName << "\" without systematics is evaluated in a non-nominal context." << endmsg;
589 return StatusCode::FAILURE;
590 }
591 }
592
593 return StatusCode::SUCCESS;
594 }
#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: