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

#include <TBBeamQualityMuonToolH6.h>

Inheritance diagram for TBBeamQualityMuonToolH6:
Collaboration diagram for TBBeamQualityMuonToolH6:

Public Member Functions

 TBBeamQualityMuonToolH6 (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~TBBeamQualityMuonToolH6 ()
virtual StatusCode initializeTool () override
virtual StatusCode accept (const std::vector< std::string > &) override
virtual StatusCode reject (const std::vector< std::string > &)
virtual StatusCode initialize () override
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 ()

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.

Protected Attributes

std::string m_SGTrigkey
std::vector< unsigned int > m_triggflag
bool m_mu1
bool m_mu2
bool m_mu3
bool m_mu4
bool m_successflag

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

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 23 of file TBBeamQualityMuonToolH6.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

◆ TBBeamQualityMuonToolH6()

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

Definition at line 25 of file TBBeamQualityMuonToolH6.cxx.

28 : TBBeamQualityTool(type,name,parent),
29 m_mu1(false),
30 m_mu2(false),
31 m_mu3(false),
32 m_mu4(false),
33 m_successflag(false)
34{
35 declareInterface<TBBeamQualityTool>(this);
36}
TBBeamQualityTool(const std::string &name, const std::string &type, const IInterface *parent)

◆ ~TBBeamQualityMuonToolH6()

TBBeamQualityMuonToolH6::~TBBeamQualityMuonToolH6 ( )
virtual

Definition at line 38 of file TBBeamQualityMuonToolH6.cxx.

39{ }

Member Function Documentation

◆ accept()

StatusCode TBBeamQualityMuonToolH6::accept ( const std::vector< std::string > & particles)
overridevirtual

Implements TBBeamQualityTool.

Definition at line 80 of file TBBeamQualityMuonToolH6.cxx.

81{//accept
82
83 MsgStream log(msgSvc(),name());
84
85 // Trigger Pattern Pointer
86 TBTriggerPatternUnit * triggpat_object;
87
88 ATH_CHECK( evtStore()->retrieve(triggpat_object, m_SGTrigkey) );
89
90 unsigned int word =triggpat_object->getTriggerWord();
91
92 m_mu1=false;
93 m_mu2=false;
94 m_mu3=false;
95 m_mu4=false;
96
97 // muon triggers are:
98 // Entry 8: Mu 1 Left
99 // Entry 9: Mu 2 Left
100 // Entry 10: Mu 2 Left
101 // Entry 16: Mu 2 Right
102
103 if ((word & m_triggflag[8])!=0) {
104 m_mu1=true;
105 }
106 if ((word & m_triggflag[9])!=0) {
107 m_mu2=true;
108 }
109 if ((word & m_triggflag[10])!=0) {
110 m_mu3=true;
111 }
112 if ((word & m_triggflag[16])!=0) {
113 m_mu4=true;
114 }
115
116 //checking for muon coincidence:
117
118 // rejecting event for all particles except for muons
119
120 //muons
121 log<<MSG::DEBUG
122 <<particles[0]
123 <<endmsg;
124
125 if(particles[0]=="mu+" || particles[0]=="mu-"){
126 m_successflag=false;
127
128 if (((m_mu1==true)&(m_mu3==true))||((m_mu1==true)&(m_mu4==true))||((m_mu2==true)&(m_mu3==true))||((m_mu2==true)&(m_mu4==true))) {
129 m_successflag=true;
130 }
131 }else{
132 //all particles except muons
133 m_successflag=true;
134
135 if (((m_mu1==true)&(m_mu3==true))||((m_mu1==true)&(m_mu4==true))||((m_mu2==true)&(m_mu3==true))||((m_mu2==true)&(m_mu4==true))) {
136 m_successflag=false;
137 }
138 }
139 if(m_successflag==true){
140 return StatusCode::SUCCESS;
141 }else{
142 return StatusCode::FAILURE;
143 }
144}//accept
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
ServiceHandle< StoreGateSvc > & evtStore()
std::vector< unsigned int > m_triggflag
unsigned int getTriggerWord() const
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ 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 TBBeamQualityTool::initialize ( )
overridevirtualinherited

Definition at line 30 of file TBBeamQualityTool.cxx.

32{
33 return this->initializeTool();
34}
virtual StatusCode initializeTool()

◆ initializeTool()

StatusCode TBBeamQualityMuonToolH6::initializeTool ( )
overridevirtual

Reimplemented from TBBeamQualityTool.

Definition at line 41 of file TBBeamQualityMuonToolH6.cxx.

42{
43 MsgStream log(msgSvc(),name());
44
45 log << MSG::DEBUG
46 << "initialize"
47 << endmsg;
48
49 // setting triggflag
50
51 if(m_triggflag.size()==0){ //trig
52
53 m_triggflag.push_back(0x00000001); // Entry 0: S1 accept
54 m_triggflag.push_back(0x00000002); // Entry 1: S2 accept
55 m_triggflag.push_back(0x00000004); // Enrty 2: S3 accept
56 m_triggflag.push_back(0x00000008); // Entry 3: B2 accept
57 m_triggflag.push_back(0x00000010); // Entry 4: VetoLeft
58 m_triggflag.push_back(0x00000020); // Entry 5: VetoRight
59 m_triggflag.push_back(0x00000040); // Entry 6: VetoDown
60 m_triggflag.push_back(0x00000080); // Entry 7: VetoUp
61 m_triggflag.push_back(0x00000100); // Entry 8: Mu 1 Left
62 m_triggflag.push_back(0x00000200); // Entry 9: Mu 2 Left
63 m_triggflag.push_back(0x00000400); // Entry 10: Mu 2 Left
64 m_triggflag.push_back(0x00000800); // Entry 11: Early PileUp
65 m_triggflag.push_back(0x00001000); // Enrty 12: Late PileUp
66 m_triggflag.push_back(0x00002000); // Entry 13: In Spill Tag
67 m_triggflag.push_back(0x00004000); // Entry 14: Off Spill Tag
68 m_triggflag.push_back(0x00008000); // Entry 15: Cedar 6 0f 8 segments
69 m_triggflag.push_back(0x00010000); // Entry 16: Mu 2 Right
70 m_triggflag.push_back(0x00020000); // Entry 17: Hole Counter
71 m_triggflag.push_back(0x00040000); // Entry 18: W1*W2 coincidence
72 m_triggflag.push_back(0x00080000); // Entry 19: B1 accept
73 m_triggflag.push_back(0x00100000); // Entry 20: Scalar Reset Tag
74 m_triggflag.push_back(0x08000000); // Entry 21: Cedar 7 of 8 segments
75 m_triggflag.push_back(0x10000000); // Entry 21: Cedar 8 of 8 segments
76 } //trig
77 return StatusCode::SUCCESS;
78}

◆ 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 & TBBeamQualityTool::interfaceID ( )
inlinestaticinherited

Definition at line 42 of file TBBeamQualityTool.h.

42{ return IID_TBBeamQualityTool;}
static const InterfaceID IID_TBBeamQualityTool("TBBeamQualityTool", 1, 0)

◆ 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.

◆ reject()

StatusCode TBBeamQualityTool::reject ( const std::vector< std::string > & particles)
virtualinherited

Definition at line 41 of file TBBeamQualityTool.cxx.

42{
43 return this->accept(particles).isFailure()
44 ? StatusCode::SUCCESS
45 : StatusCode::FAILURE;
46}
virtual StatusCode accept(const std::vector< std::string > &)=0

◆ 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_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_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_mu1

bool TBBeamQualityMuonToolH6::m_mu1
protected

Definition at line 44 of file TBBeamQualityMuonToolH6.h.

◆ m_mu2

bool TBBeamQualityMuonToolH6::m_mu2
protected

Definition at line 45 of file TBBeamQualityMuonToolH6.h.

◆ m_mu3

bool TBBeamQualityMuonToolH6::m_mu3
protected

Definition at line 46 of file TBBeamQualityMuonToolH6.h.

◆ m_mu4

bool TBBeamQualityMuonToolH6::m_mu4
protected

Definition at line 47 of file TBBeamQualityMuonToolH6.h.

◆ m_SGTrigkey

std::string TBBeamQualityMuonToolH6::m_SGTrigkey
protected

Definition at line 39 of file TBBeamQualityMuonToolH6.h.

◆ m_successflag

bool TBBeamQualityMuonToolH6::m_successflag
protected

Definition at line 48 of file TBBeamQualityMuonToolH6.h.

◆ m_triggflag

std::vector<unsigned int> TBBeamQualityMuonToolH6::m_triggflag
protected

Definition at line 42 of file TBBeamQualityMuonToolH6.h.

◆ 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: