ATLAS Offline Software
Loading...
Searching...
No Matches
DQEventFlagFilterTool Class Reference

#include <DQEventFlagFilterTool.h>

Inheritance diagram for DQEventFlagFilterTool:
Collaboration diagram for DQEventFlagFilterTool:

Public Member Functions

 DQEventFlagFilterTool (const std::string &, const std::string &, const IInterface *)
virtual ~DQEventFlagFilterTool () override
virtual StatusCode initialize () override
virtual bool accept () const override
 Pure virtual.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Declared here, and defined below.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< bool > m_alwaysReturnTrue {this, "alwaysReturnTrue", false}
Gaudi::Property< bool > m_invert {this, "invert", false}
Gaudi::Property< bool > m_doLAr {this, "doLAr", true}
Gaudi::Property< bool > m_doTile {this, "doTile", true}
Gaudi::Property< bool > m_doSCT {this, "doSCT", true}
Gaudi::Property< bool > m_doCore {this, "doCore", true}
SG::ReadHandleKey< xAOD::EventInfom_EventInfoKey {this, "EventInfoKey", "EventInfo"}
SG::ReadDecorHandleKey< xAOD::EventInfom_TileStatusKey {this, "TileStatusKey", m_EventInfoKey, "TileStatus"}
SG::ReadDecorHandleKey< xAOD::EventInfom_larFlag {this, "LArStatusFlag", m_EventInfoKey, "larFlags"}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 17 of file DQEventFlagFilterTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ DQEventFlagFilterTool()

DQEventFlagFilterTool::DQEventFlagFilterTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 8 of file DQEventFlagFilterTool.cxx.

9: AthAlgTool( type, name, parent )
10{
11 declareInterface<IDQFilterTool>(this);
12}
AthAlgTool()
Default constructor:

◆ ~DQEventFlagFilterTool()

DQEventFlagFilterTool::~DQEventFlagFilterTool ( )
overridevirtual

Definition at line 14 of file DQEventFlagFilterTool.cxx.

14{}

Member Function Documentation

◆ accept()

bool DQEventFlagFilterTool::accept ( ) const
overridevirtual

Pure virtual.

Implements IDQFilterTool.

Definition at line 26 of file DQEventFlagFilterTool.cxx.

26 {
28 return true;
29 } else {
30 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_EventInfoKey);
31 if (! eventInfo.isValid()) {
32 ATH_MSG_ERROR("Cannot retrieve EventInfo object, returning false (or true if invert is set)");
33 return m_invert;
34 }
35 bool passed(true); //event passes
36 auto errorcode(xAOD::EventInfo::Error);
37 if (m_doLAr && (eventInfo->errorState(xAOD::EventInfo::LAr) == errorcode)) {
38 ATH_MSG_DEBUG("Event fails LAr event veto");
39 passed = false;
40 } else if (m_doTile && (eventInfo->errorState(xAOD::EventInfo::Tile) == errorcode)) {
41 ATH_MSG_DEBUG("Event fails Tile event veto");
42 passed = false;
43 } else if (m_doSCT && (eventInfo->errorState(xAOD::EventInfo::SCT) == errorcode)) {
44 ATH_MSG_DEBUG("Event fails SCT event veto");
45 passed = false;
46 } else if (m_doCore && (eventInfo->eventFlags(xAOD::EventInfo::Core) & 0x40000)) {
47 ATH_MSG_DEBUG("Event fais data corruption veto");
48 passed = false;
49 }
51 ATH_MSG_VERBOSE("Event flag DQ tool accept called, passed " << passed);
52 return passed;
53 }
54}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
bool passed(DecisionID id, const DecisionIDContainer &)
checks if required decision ID is in the set of IDs in the container
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Gaudi::Property< bool > m_doCore
Gaudi::Property< bool > m_doLAr
Gaudi::Property< bool > m_doTile
Gaudi::Property< bool > m_doSCT
Gaudi::Property< bool > m_invert
Gaudi::Property< bool > m_alwaysReturnTrue
@ Tile
The Tile calorimeter.
@ Core
Core flags describing the event.
@ LAr
The LAr calorimeter.
@ Error
The sub-detector issued an error.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode DQEventFlagFilterTool::initialize ( )
overridevirtual

Definition at line 16 of file DQEventFlagFilterTool.cxx.

17{
18 ATH_MSG_VERBOSE("ATLAS Ready initialize");
19 // don't register callback if we always return true anyway
23 return StatusCode::SUCCESS;
24}
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadDecorHandleKey< xAOD::EventInfo > m_TileStatusKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_larFlag

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & IDQFilterTool::interfaceID ( )
inlinestaticinherited

Declared here, and defined below.

Definition at line 25 of file IDQFilterTool.h.

26{
27 return IID_IDQFilterTool;
28}
static const InterfaceID IID_IDQFilterTool("IDQFilterTool", 1, 0)
Must declare this, with name of interface.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_alwaysReturnTrue

Gaudi::Property<bool> DQEventFlagFilterTool::m_alwaysReturnTrue {this, "alwaysReturnTrue", false}
private

Definition at line 28 of file DQEventFlagFilterTool.h.

28{this, "alwaysReturnTrue", false};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doCore

Gaudi::Property<bool> DQEventFlagFilterTool::m_doCore {this, "doCore", true}
private

Definition at line 33 of file DQEventFlagFilterTool.h.

33{this, "doCore", true};

◆ m_doLAr

Gaudi::Property<bool> DQEventFlagFilterTool::m_doLAr {this, "doLAr", true}
private

Definition at line 30 of file DQEventFlagFilterTool.h.

30{this, "doLAr", true};

◆ m_doSCT

Gaudi::Property<bool> DQEventFlagFilterTool::m_doSCT {this, "doSCT", true}
private

Definition at line 32 of file DQEventFlagFilterTool.h.

32{this, "doSCT", true};

◆ m_doTile

Gaudi::Property<bool> DQEventFlagFilterTool::m_doTile {this, "doTile", true}
private

Definition at line 31 of file DQEventFlagFilterTool.h.

31{this, "doTile", true};

◆ m_EventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> DQEventFlagFilterTool::m_EventInfoKey {this, "EventInfoKey", "EventInfo"}
private

Definition at line 34 of file DQEventFlagFilterTool.h.

34{this, "EventInfoKey", "EventInfo"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_invert

Gaudi::Property<bool> DQEventFlagFilterTool::m_invert {this, "invert", false}
private

Definition at line 29 of file DQEventFlagFilterTool.h.

29{this, "invert", false};

◆ m_larFlag

SG::ReadDecorHandleKey<xAOD::EventInfo> DQEventFlagFilterTool::m_larFlag {this, "LArStatusFlag", m_EventInfoKey, "larFlags"}
private

Definition at line 36 of file DQEventFlagFilterTool.h.

36{this, "LArStatusFlag", m_EventInfoKey, "larFlags"};

◆ m_TileStatusKey

SG::ReadDecorHandleKey<xAOD::EventInfo> DQEventFlagFilterTool::m_TileStatusKey {this, "TileStatusKey", m_EventInfoKey, "TileStatus"}
private

Definition at line 35 of file DQEventFlagFilterTool.h.

35{this, "TileStatusKey", m_EventInfoKey, "TileStatus"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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