|
ATLAS Offline Software
|
Implementation of the ITrigDecisionCnvTool interface.
More...
#include <TrigDecisionCnvTool.h>
|
| TrigDecisionCnvTool (const std::string &type, const std::string &name, const IInterface *parent) |
| Regular AlgTool constructor. More...
|
|
virtual | ~TrigDecisionCnvTool () |
|
virtual StatusCode | initialize () override |
| Function initialising the tool. More...
|
|
virtual StatusCode | convert (const TrigDec::TrigDecision *aod, xAOD::TrigDecision *xaod, const TriggerInfo *level1TriggerInfo) const final |
| Function filling an xAOD::TrigDecision object with information. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
static StatusCode | setBit (std::vector< uint32_t > &bitset, uint32_t chainId, bool value=true) |
| Function setting the status of one bit in a bitset. More...
|
|
Implementation of the ITrigDecisionCnvTool interface.
This tool copies the contents of the "old" TrigDec::TrigDecision
object into an xAOD::TrigDecision one.
- Author
- Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Definition at line 35 of file TrigDecisionCnvTool.h.
◆ StoreGateSvc_t
◆ TrigDecisionCnvTool()
xAODMaker::TrigDecisionCnvTool::TrigDecisionCnvTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Regular AlgTool constructor.
Definition at line 72 of file TrigDecisionCnvTool.cxx.
78 declareInterface< ITrigDecisionCnvTool >(
this );
◆ ~TrigDecisionCnvTool()
xAODMaker::TrigDecisionCnvTool::~TrigDecisionCnvTool |
( |
| ) |
|
|
virtual |
◆ convert()
Function filling an xAOD::TrigDecision object with information.
This is the important function of the tool.
It takes an existing TrigDec::TrigDecision object, and copies its contents into a new xAOD::TrigDecision object.
- Parameters
-
aod | The AOD object to take the information from |
xaod | The xAOD object to fill the information into |
- Returns
StatusCode::SUCCESS
if all went fine, something else if not
Implements xAODMaker::ITrigDecisionCnvTool.
Definition at line 108 of file TrigDecisionCnvTool.cxx.
111 ATH_MSG_DEBUG(
"converting TrigDecision to xAOD::TrigDecision" );
118 ATH_MSG_DEBUG(
"converting BGCode " << std::hex << (
unsigned int) aod->
BGCode() <<
" (size " <<
sizeof(aod->
BGCode()) <<
"|" <<
sizeof(xaod->
bgCode()) <<
")" );
125 }
else if( triggerInfo !=
nullptr ){
129 std::vector<uint32_t>::const_iterator
begin,
end;
133 std::advance(
end,L1SIZE);
134 std::vector<uint32_t> tbp(
begin,
end);
137 std::advance(
end,L1SIZE);
141 std::advance(
end,L1SIZE);
142 std::vector<uint32_t> tav(
begin,
end);
154 ATH_MSG_DEBUG(
"can not set L1 info as the old TrigDecision has no L1Result and there is no TriggerInfo available");
169 std::vector< uint32_t > l2PassedPhysics( BITSET_SIZE, 0 );
170 std::vector< uint32_t > l2PassedRaw ( BITSET_SIZE, 0 );
171 std::vector< uint32_t > l2PassedThrough( BITSET_SIZE, 0 );
172 std::vector< uint32_t > l2Prescaled ( BITSET_SIZE, 0 );
173 std::vector< uint32_t > l2Resurrected ( BITSET_SIZE, 0 );
176 std::vector< uint32_t > efPassedPhysics( BITSET_SIZE, 0 );
177 std::vector< uint32_t > efPassedRaw ( BITSET_SIZE, 0 );
178 std::vector< uint32_t > efPassedThrough( BITSET_SIZE, 0 );
179 std::vector< uint32_t > efPrescaled ( BITSET_SIZE, 0 );
180 std::vector< uint32_t > efResurrected ( BITSET_SIZE, 0 );
186 TrigConf::HLTChainList::const_iterator chain_itr =
chains.begin();
187 TrigConf::HLTChainList::const_iterator chain_end =
chains.end();
188 for( ; chain_itr != chain_end; ++chain_itr ) {
191 if(
static_cast< uint32_t >( ( *chain_itr )->chain_counter() )
192 >= MAXIMUM_CHAIN_ID ) {
205 CHECK(
setBit( l2PassedPhysics, ( *chain_itr )->chain_counter(),
206 m_tdt->isPassed(
group, TrigDefs::Physics ) ) );
207 CHECK(
setBit( l2PassedRaw, ( *chain_itr )->chain_counter(),
208 ( bits & TrigDefs::L2_passedRaw ) ) );
209 CHECK(
setBit( l2PassedThrough, ( *chain_itr )->chain_counter(),
210 ( bits & TrigDefs::L2_passThrough ) ) );
211 CHECK(
setBit( l2Prescaled, ( *chain_itr )->chain_counter(),
212 ( bits & TrigDefs::L2_prescaled ) ) );
213 CHECK(
setBit( l2Resurrected, ( *chain_itr )->chain_counter(),
214 ( bits & TrigDefs::L2_resurrected ) ) );
219 CHECK(
setBit( efPassedPhysics, ( *chain_itr )->chain_counter(),
220 m_tdt->isPassed(
group, TrigDefs::Physics ) ) );
221 CHECK(
setBit( efPassedRaw, ( *chain_itr )->chain_counter(),
222 ( bits & TrigDefs::EF_passedRaw ) ) );
223 CHECK(
setBit( efPassedThrough, ( *chain_itr )->chain_counter(),
224 ( bits & TrigDefs::EF_passThrough ) ) );
225 CHECK(
setBit( efPrescaled, ( *chain_itr )->chain_counter(),
226 ( bits & TrigDefs::EF_prescaled ) ) );
227 CHECK(
setBit( efResurrected, ( *chain_itr )->chain_counter(),
228 ( bits & TrigDefs::EF_resurrected ) ) );
245 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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 xAODMaker::TrigDecisionCnvTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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()
static const InterfaceID& xAODMaker::ITrigDecisionCnvTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ setBit()
StatusCode xAODMaker::TrigDecisionCnvTool::setBit |
( |
std::vector< uint32_t > & |
bitset, |
|
|
uint32_t |
chainId, |
|
|
bool |
value = true |
|
) |
| |
|
staticprivate |
Function setting the status of one bit in a bitset.
Definition at line 248 of file TrigDecisionCnvTool.cxx.
252 if( ( chainId >= MAXIMUM_CHAIN_ID ) ||
253 ( bitset.size() < BITSET_SIZE ) ) {
254 return StatusCode::FAILURE;
258 const size_t word = chainId / 32;
259 const size_t bit = chainId % 32;
263 bitset[ word ] = bitset[ word ] | ( 0x1 << bit );
266 bitset[ word ] = bitset[ word ] & ( ~ ( 0x1 << bit ) );
270 return StatusCode::SUCCESS;
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_tdt
Initial value:{this, "TrigDecisionTool",
"Trig::TrigDecisionTool/TrigDecisionTool"}
Connection to the TrigDecisionTool.
Definition at line 59 of file TrigDecisionCnvTool.h.
◆ m_trigconf
Initial value:{this, "TrigConfigSvc",
"TrigConf::xAODConfigSvc/xAODConfigSvc"}
Connection to the HLT configuration.
Definition at line 62 of file TrigDecisionCnvTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
void setSMK(uint32_t value)
Set the Super Master Key describing this object.
void setLVL2ErrorBits(uint32_t value)
Set a summary of all errors that happened during the LVL2 execution.
void setEFPassedPhysics(const std::vector< uint32_t > &value)
Set the EF physics decision bits.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
void setLVL2PassedRaw(const std::vector< uint32_t > &value)
Set the LVL2 passed-raw bits.
bool isConfigured() const
is LVL1 configured ?
void setEFTruncated(bool value)
Set whether the EF result is truncated.
uint32_t masterKey() const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const std::vector< uint32_t > & tav() const
Get the Trigger After Veto bits.
void setLVL2PassedThrough(const std::vector< uint32_t > &value)
Set the LVL2 pass-through bits.
const std::vector< uint32_t > & itemsBeforePrescale() const
virtual void setOwner(IDataHandleHolder *o)=0
const std::vector< uint32_t > & itemsAfterVeto() const
const std::vector< number_type > & level1TriggerInfo() const
get level1 trigger info
void setEFPassedThrough(const std::vector< uint32_t > &value)
Set the EF pass-through bits.
list of all HLT chains in a trigger menu
void setTAP(const std::vector< uint32_t > &value)
Set the Trigger After Prescale bits.
bool isHLTResultTruncated() const
is serialized HLTResult truncated
void setTBP(const std::vector< uint32_t > &value)
Set the Trigger Before Prescale bits.
@ NoRegex
Do not use regular expressions.
virtual uint32_t error_bits() const
bit flags to explain problems during processing
const LVL1CTP::Lvl1Result & getL1Result() const
#define CHECK(...)
Evaluate an expression and check for errors.
void setTAV(const std::vector< uint32_t > &value)
Set the Trigger After Veto bits.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void setLVL2Resurrected(const std::vector< uint32_t > &value)
Set the LVL2 resurrected bits.
void setEFErrorBits(uint32_t value)
Set a summary of all errors that happened during the EF execution.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const HLT::HLTResult & getEFResult() const
const std::vector< uint32_t > & tap() const
Get the Trigger After Prescale bits.
void setEFPrescaled(const std::vector< uint32_t > &value)
Set the EF prescaled bits.
char bgCode() const
Get the bunch group code of the current event.
void setEFPassedRaw(const std::vector< uint32_t > &value)
Set the EF passed-raw bits.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void setLVL2PassedPhysics(const std::vector< uint32_t > &value)
Set the LVL2 physics decision bits.
void setLVL2Prescaled(const std::vector< uint32_t > &value)
Set the LVL2 prescaled bits.
const std::vector< uint32_t > & tbp() const
Get the Trigger Before Prescale bits.
void setBGCode(char value)
Set the bunch group code of the current event.
void setEFResurrected(const std::vector< uint32_t > &value)
Set the EF resurrected bits.
const HLT::HLTResult & getL2Result() const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void setLVL2Truncated(bool value)
Set whether the LVL2 result is truncated.
const std::vector< uint32_t > & itemsAfterPrescale() const