![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <TrigBStoxAODTool.h>
|
| TrigBStoxAODTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~TrigBStoxAODTool () |
|
virtual StatusCode | initialize () |
|
StatusCode | convert (HLT::Navigation *nav) |
|
StatusCode | rewireNavigation (HLT::Navigation *nav) |
|
StatusCode | setTrigPassBits (HLT::Navigation *nav) |
|
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 |
|
|
StatusCode | classLabel2CLIDLabel (const std::vector< std::string > &property, const std::vector< std::string > &newProperty, std::vector< std::pair< CLID, std::string > > &decoded, std::vector< std::pair< CLID, std::string > > &decodedNewNames) |
|
StatusCode | findHelper (MM_CLID_IHELPER &helpers, CLID clid, std::string &label, MM_CLID_IHELPER::const_iterator &it) |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 64 of file TrigBStoxAODTool.h.
◆ MM_CLID_IHELPER
◆ StoreGateSvc_t
◆ TrigBStoxAODTool()
TrigBStoxAODTool::TrigBStoxAODTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Definition at line 363 of file TrigBStoxAODTool.cxx.
365 m_tauJetTool(
"xAODMaker::TauJetCnvTool/TauJetCnvTool",
this),
366 m_combMuonTool(
"xAODMaker::CombinedMuonFeatureContainerCnvTool/CombinedMuonFeatureContainerCnvTool",
this),
367 m_isoMuonTool(
"xAODMaker::IsoMuonFeatureContainerCnvTool/IsoMuonFeatureContainerCnvTool",
this),
368 m_trigMuonTool(
"TrigMuonEFInfoToMuonCnvTool/TrigMuonEFInfoToMuonCnvTool",
this),
371 m_emClusterTool(
"xAODMaker::TrigEMClusterCnvTool/TrigEMClusterCnvTool",
this),
372 m_bjetTool(
"xAODMaker::TrigBjetCnvTool/TrigBjetCnvTool",
this),
373 m_efBphysTool(
"xAODMaker::TrigEFBphysContainerCnvTool/TrigEFBphysContainerCnvTool",
this),
374 m_l2BphysTool(
"xAODMaker::TrigL2BphysContainerCnvTool/TrigL2BphysContainerCnvTool",
this),
375 m_trigMetTool(
"xAODMaker::TrigMissingETCnvTool/TrigMissingETCnvTool",
this),
376 m_trigSpacePtsTool(
"xAODMaker::TrigSpacePointCountsCnvTool/TrigSpacePointCountsCnvTool",
this),
379 m_trigVtxCtsTool(
"xAODMaker::TrigVertexCountsCnvTool/TrigVertexCountsCnvTool",
this),
380 m_electronTool(
"xAODMaker::ElectronCnvTool/ElectronCnvTool",
this ),
381 m_photonTool(
"xAODMaker::PhotonCnvTool/PhotonCnvTool",
this ),
385 declareInterface<ITrigBStoxAODTool>(
this );
◆ ~TrigBStoxAODTool()
TrigBStoxAODTool::~TrigBStoxAODTool |
( |
| ) |
|
|
virtual |
◆ classLabel2CLIDLabel()
StatusCode TrigBStoxAODTool::classLabel2CLIDLabel |
( |
const std::vector< std::string > & |
property, |
|
|
const std::vector< std::string > & |
newProperty, |
|
|
std::vector< std::pair< CLID, std::string > > & |
decoded, |
|
|
std::vector< std::pair< CLID, std::string > > & |
decodedNewNames |
|
) |
| |
|
private |
Definition at line 690 of file TrigBStoxAODTool.cxx.
695 IClassIDSvc* clidSvc{
nullptr};
696 if( service(
"ClassIDSvc", clidSvc).isFailure() ) {
698 return StatusCode::FAILURE;
700 if( property.size() != newProperty.size() ) {
701 ATH_MSG_ERROR(
"vector sizes of new and old SG labels are different: "
702 << newProperty.size() <<
" vs " << property.size() );
703 return StatusCode::FAILURE;
706 std::vector<std::string>::const_iterator
it;
707 std::vector<std::string>::const_iterator itNew = newProperty.begin();
708 for (
it = property.begin();
it != property.end(); ++
it, ++itNew ) {
711 std::string label_new;
714 if (
it->find(
'#') != std::string::npos ) {
715 type =
it->substr(0,
it->find(
'#') );
722 if ( itNew->find(
'#') != std::string::npos ) {
723 label_new = itNew->substr(itNew->find(
'#')+1 );
728 if ( clidSvc->getIDOfTypeName(
type, clid).isFailure() ) {
730 <<
" check property");
731 return StatusCode::FAILURE;
734 ATH_MSG_DEBUG(
"Recognized CLID : " <<
type <<
" and label: " <<
label <<
", new label will be: " << label_new);
736 decodedNewNames.push_back(std::make_pair(clid, label_new));
738 return StatusCode::SUCCESS;
◆ convert()
Implements ITrigBStoxAODTool.
Definition at line 589 of file TrigBStoxAODTool.cxx.
590 std::vector<std::pair<CLID,std::string> >::const_iterator clidlabel;
591 std::vector<std::pair<CLID,std::string> >::const_iterator clidNewLabel =
m_clid_newLabels.begin();
597 ATH_MSG_WARNING(
"couldn't find holder for " << clidlabel->first <<
" " << clidlabel->second);
603 std::multimap<CLID,BStoXAODHelper::IHelper*>::const_iterator hit;
606 std::string clabel = clidlabel->second;
611 <<
" for label " << clidlabel->second <<
", new label " << clidNewLabel->second);
612 CHECK(hit->second->help(clidlabel->second,clidNewLabel->second));
616 ATH_MSG_DEBUG(
"couldn't find converters for clid: " << clidlabel->first);
619 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);
◆ 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.
◆ 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.
◆ 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
◆ findHelper()
StatusCode TrigBStoxAODTool::findHelper |
( |
MM_CLID_IHELPER & |
helpers, |
|
|
CLID |
clid, |
|
|
std::string & |
label, |
|
|
MM_CLID_IHELPER::const_iterator & |
it |
|
) |
| |
|
private |
Definition at line 863 of file TrigBStoxAODTool.cxx.
864 auto myrange = helpers.equal_range(clid);
871 return StatusCode::SUCCESS;
876 for(;
it!=myrange.second;++
it) {
877 CLID myHelperxAODCLID = (*it).second->xAODContainerClid();
881 return StatusCode::SUCCESS;
887 return StatusCode::SUCCESS;
891 <<
", probably you should accomodate for this change in the code above" );
892 return StatusCode::FAILURE;
896 return StatusCode::SUCCESS;
◆ initialize()
StatusCode TrigBStoxAODTool::initialize |
( |
| ) |
|
|
virtual |
Definition at line 422 of file TrigBStoxAODTool.cxx.
434 m_helpers.insert( std::pair<CLID,BStoXAODHelper::MuonHelper*>
571 <<
") is not the same as the number of old containers names ("
573 return StatusCode::FAILURE;
586 return StatusCode::SUCCESS;
◆ 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& ITrigBStoxAODTool::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()
◆ rewireNavigation()
Implements ITrigBStoxAODTool.
Definition at line 622 of file TrigBStoxAODTool.cxx.
627 std::vector<HLT::TriggerElement*>& allTEs = nav->
getAllTEs();
629 ATH_MSG_DEBUG(
"rewiring Navigation for xAOD. working on " << allTEs.size() <<
" TEs");
630 for(
auto te : allTEs){
631 std::vector<HLT::TriggerElement::FeatureAccessHelper>& feats = te->getFeatureAccessHelpers();
632 for(
auto& featacchelp : feats){
638 ATH_MSG_WARNING(
"could not find old holder for CLID " << featacchelp.getCLID() <<
" and subTypeIndex: " << featacchelp.getIndex());
642 std::multimap<CLID,BStoXAODHelper::IHelper*>::const_iterator
it =
m_helpers.end();
643 std::string old_label = oldholder->
label();
648 bool iselement = (oldholder->
typeClid()==
it->second->AODElementClid());
649 bool iscontainer = (oldholder->
typeClid()==
it->second->AODContainerClid());
651 ATH_MSG_VERBOSE(
"old is element feature " << iselement <<
" or container feature: " << iscontainer);
653 if(!(iselement || iscontainer)){
654 ATH_MSG_WARNING(
"not clear what kind of feature we're dealing with. Skipping. Old holder is:" << *oldholder);
657 CLID newTypeClid = CLID_NULL;
658 if(iselement) newTypeClid =
it->second->xAODElementClid();
659 if(iscontainer) newTypeClid =
it->second->xAODContainerClid();
661 std::lock_guard<std::recursive_mutex> lock(nav->
getMutex());
667 ATH_MSG_WARNING(
"could not find new holder for xAOD clid " << newTypeClid <<
" and label " << oldholder->
label());
673 ATH_MSG_VERBOSE(
"changing CLID: " << featacchelp.getCLID() <<
" to " << newTypeClid);
676 featacchelp.setCLIDandIndex(newTypeClid,newholder->
subTypeIndex());
677 ATH_MSG_VERBOSE(
"clid is now: " << featacchelp.getCLID() <<
" sti: " << featacchelp.getIndex().subTypeIndex());
684 return StatusCode::SUCCESS;
◆ setTrigPassBits()
Implements ITrigBStoxAODTool.
Definition at line 741 of file TrigBStoxAODTool.cxx.
747 std::vector<HLT::TriggerElement*>& allTEs = nav->
getAllTEs();
749 ATH_MSG_DEBUG(
"setting xAOD TrigPassBits. Working on " << allTEs.size() <<
" TEs");
751 for(
auto te : allTEs){
752 std::vector<HLT::TriggerElement::FeatureAccessHelper>& feats = te->getFeatureAccessHelpers();
753 for(
auto& featacchelp : feats){
759 ATH_MSG_WARNING(
"could not find holder for CLID " << featacchelp.getCLID() <<
" and subTypeIndex: " << featacchelp.getIndex());
763 if(holder->
label() ==
"passbits") {
764 ATH_MSG_VERBOSE(
"skipping this feature, as this is the passbits object itself" );
768 std::multimap<CLID,BStoXAODHelper::IHelper*>::const_iterator
it =
m_helpers.end();
769 std::string hlabel = holder->
label();
774 <<
", label " << holder->
label() <<
" corresponding to xAOD CLID " <<
it->second->xAODContainerClid() );
776 bool iselement = (holder->
typeClid()==
it->second->AODElementClid());
777 bool iscontainer = (holder->
typeClid()==
it->second->AODContainerClid());
779 ATH_MSG_VERBOSE(
"is element feature " << iselement <<
" or container feature: " << iscontainer);
781 if(!(iselement || iscontainer)){
782 ATH_MSG_WARNING(
"not clear what kind of feature we're dealing with. Skipping. The holder is:" << *holder);
787 const TrigPassBitsCollection* bits_collection =
evtStore()->template tryConstRetrieve<TrigPassBitsCollection>(
"HLT_TrigPassBitsCollection_passbits");
788 if(bits_collection !=
nullptr) {
789 ATH_MSG_DEBUG(
"aod bits collection extracted of size " << bits_collection->
size() );
801 if(xaod_bits_collection !=
nullptr)
802 ATH_MSG_DEBUG(
"xaod bits container extracted of size " << xaod_bits_collection->
size() );
809 if ( nav->
getFeature(te, bits,
"passbits" ) ){
821 if(bits_collection !=
nullptr && xaod_bits_collection !=
nullptr && bits !=
nullptr) {
824 if(bits == bits_collection->
at(
i)) {
832 std::pair<CLID,std::string> pair = std::make_pair( featacchelp.getCLID(), holder->
label() );
833 std::vector<std::pair<CLID,std::string> >::const_iterator it_new_label;
835 std::string new_label =
"";
837 new_label = (*it_new_label).second;
838 ATH_MSG_DEBUG(
"calling help_fillTrigPassBits for TE " << te <<
", feature CLID " << featacchelp.getCLID()
839 <<
", aod container " << holder->
label() <<
", new container name: " << new_label );
840 CHECK(
it->second->help_fillTrigPassBits( holder->
label(), new_label, bits_collection->
at(bits_nr), xaod_tpb ) );
842 ATH_MSG_DEBUG(
"new label was not found, presumably this container was not converted. Will not look for TrigPassBits" );
845 if(xaod_tpb !=
nullptr) {
846 xaod_bits_collection->
at(bits_nr) = xaod_tpb;
847 ATH_MSG_VERBOSE(
"after the conversion, size of xAOD::TrigPassBits is " << xaod_bits_collection->
at(bits_nr)->size() );
851 ATH_MSG_WARNING(
"TrigPassBits object was not identified within container!" );
859 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_bjetTool
◆ m_caloClusterTool
◆ m_clid_labels
std::vector<std::pair<CLID,std::string> > TrigBStoxAODTool::m_clid_labels |
|
private |
◆ m_clid_newLabels
std::vector<std::pair<CLID,std::string> > TrigBStoxAODTool::m_clid_newLabels |
|
private |
◆ m_CLID_xAODElectronContainer
CLID TrigBStoxAODTool::m_CLID_xAODElectronContainer |
|
private |
◆ m_CLID_xAODPhotonContainer
CLID TrigBStoxAODTool::m_CLID_xAODPhotonContainer |
|
private |
◆ m_combMuonTool
◆ m_containersToConvert
std::vector<std::string> TrigBStoxAODTool::m_containersToConvert |
|
private |
◆ m_detStore
◆ m_efBphysTool
◆ m_electronTool
◆ m_emClusterTool
◆ m_evtStore
◆ m_helpers
◆ m_isoMuonTool
◆ m_jetCnvTool
◆ m_l2BphysTool
◆ m_newContainers
std::vector<std::string> TrigBStoxAODTool::m_newContainers |
|
private |
◆ m_photonTool
◆ m_recTrackParticleContTool
◆ m_tauJetTool
◆ m_trackCollectionTool
◆ m_trigCaloClusterTool
◆ m_trigMbtsBitsTool
◆ m_trigMetTool
◆ m_trigMuonTool
◆ m_trigPassBitsTool
◆ m_trigSpacePtsTool
◆ m_trigTrackCtsTool
◆ m_trigVtxCtsTool
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
virtual CLID containerClid() const =0
std::vector< Identifier > ID
std::string find(const std::string &s)
return a remapped string
const std::string & label() const
returns the label of objects stores by this holder
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Storable container for CaloCluster.
std::recursive_mutex & getMutex()
Container of TrigEFBjet objects to be stored in POOL.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
Container from TrigEMCluster type objects.
bool getFeature(const TriggerElement *te, const T *&features, const std::string &label="", std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
virtual void setOwner(IDataHandleHolder *o)=0
HLTNavDetails::Holder< T > * getHolder(uint16_t subTypeIndex) const
as above but does not create holder on demand (return 0 if not found)
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Type describing which elements in a container passed a trigger chain.
Default, invalid implementation of ClassID_traits.
TrigHolderStructure & getHolderStorage()
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
uint32_t CLID
The Class ID type.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::vector< TriggerElement * > & getAllTEs()
access needed by slimming tools.
virtual CLID typeClid() const =0
returns the CLID of objects stores by this holder
#define ATH_MSG_WARNING(x)
uint16_t subTypeIndex() const
returns the index (short number used when linking object to the TE) of objects stores by this holder
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const T * at(size_type n) const
Access an element, as an rvalue.
HolderType * getHolder(class_id_type clid, const std::variant< sub_index_type, std::string > &stiOrLabel) const
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Container from TrigCaloCluster type objects.