ATLAS Offline Software
TrigBStoxAODTool.cxx
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
8 
12 
13 #include "TrigNavigation/Holder.h"
14 #include "GaudiKernel/ClassID.h"
15 
17 
19 
21 
22 
23 #include "JetEvent/JetCollection.h"
24 #include "xAODJet/JetContainer.h"
26 
30 
33 
37 
38 #include "xAODMuon/MuonContainer.h"
40 
41 
44 
47 
50 
53 
56 
59 
64 
69 
70 
73 
76 
79 
82 
85 
88 
92 
93 #include "CaloEvent/CaloClusterContainer.h"
95 
99 
102 
103 template<typename element,typename list,int index> struct get_strictly_feat{
105 };
106 
107 template<class T, class EDMLIST = TypeInfo_EDM> struct known{
108  typedef typename master_search<typename EDMLIST::map,
109  get_strictly_feat,T>::result::search_result search_result;
110  static const bool value = !boost::is_same<HLT::TypeInformation::ERROR_THE_FOLLOWING_TYPE_IS_NOT_KNOWN_TO_THE_EDM<T>,search_result>::value;
111 };
112 
113 
115 template<typename T> struct getCLID<T,true>{static int ID(){return ClassID_traits<T>::ID();}};
116 template<typename T> struct getCLID<T,false>{static int ID(){return -1;}};
117 
118 
119 namespace BStoXAODHelper{
120 
121  //Helper class providing interface for conversion and some convenient access to SG and Msg Services
122  class IHelper{
123  public:
124  virtual ~IHelper(){;}
125  virtual StatusCode initialize(MsgStream& m, StoreGateSvc& s){
126  m_msg = &m;
127  m_sg = &s;
128  return StatusCode::SUCCESS;
129  };
130 
131  virtual StatusCode help(const std::string& label, const std::string& newLabel) = 0;
132 
133  //we need this method, because for creating converted xAOD::TrigPassBits, one needs access to the corresponding xaod container
134  //with physics objects. This leads to a partial duplication of the code for the muon helper
135  virtual StatusCode help_fillTrigPassBits(const std::string& label, const std::string& newLabel, const TrigPassBits* tpb_aod, xAOD::TrigPassBits*& tpb_xaod) = 0;
136 
137  virtual CLID AODContainerClid() = 0;
138  virtual CLID xAODContainerClid() = 0;
139  virtual CLID AODElementClid() = 0;
140  virtual CLID xAODElementClid() = 0;
141 
142  MsgStream& msg(MSG::Level l){return *m_msg << l;}
143  bool msgLvl (const MSG::Level l){
144  if(m_msg->level() <= l){
145  *m_msg << l; return true;
146  } else {
147  return false;
148  };
149  }
150 
151  template<typename T>
152  std::string format(const std::string& label){
154  }
155  protected:
156  MsgStream* m_msg{nullptr};
157  StoreGateSvc* m_sg{nullptr};
158  const std::string m_AODprefix = "HLT";
159  };
160 
161  //class holding a tool, since this is what all helpers will need to do.
162  template<typename T>
163  class ToolHolder : public IHelper {
164  protected:
165  const ToolHandle<T>& m_tool;
166  ToolHandle<T>& tool(){return m_tool;}
167  public:
168  ToolHolder(const ToolHandle<T>& tool) : m_tool(tool){;}
169  virtual ~ToolHolder(){;}
170  virtual StatusCode initialize(MsgStream& m, StoreGateSvc& s){
172  CHECK(m_tool.retrieve());
173  return StatusCode::SUCCESS;
174  }
175  };
176 
177  //this is the most vanilla case
178  template<typename AOD,typename XAOD, typename CnvTool>
179  struct DefaultHelper : public ToolHolder<CnvTool> {
181 
182  DefaultHelper(const ToolHandle<CnvTool>& tool) : ToolHolder<CnvTool>(tool){;}
183 
186 
189 
190  virtual StatusCode help(const std::string& label, const std::string& newLabel){
191  typedef IHelper IH;
192  std::string fmtkey_AOD = IH::template format<AOD>(label);
193  std::string fmtkey_xAOD = IH::template format<XAOD>(newLabel);
194  std::string fmtkey_xAODAux = IH::template format<xAODAux>(newLabel+"Aux.");
195 
196  const AOD* aod = this->m_sg->template tryConstRetrieve<AOD>(fmtkey_AOD);
197  if(!aod){
198  ATH_MSG_WARNING("AOD key: " << fmtkey_AOD << " not found for xAOD conversion");
199  return StatusCode::SUCCESS;
200  }
201 
202  ATH_MSG_DEBUG("attempting to convert " << fmtkey_AOD << " of size " << aod->size() << " to " << fmtkey_xAOD);
203 
204  XAOD* xaod = this->m_sg->template tryRetrieve<XAOD>(fmtkey_xAOD);
205  if(!xaod){
206  ATH_MSG_WARNING("xAOD key: " << fmtkey_xAOD << " not found for xAOD conversion");
207  return StatusCode::SUCCESS;
208  }
209  CHECK( this->m_tool->convert(aod,xaod));
210  ATH_MSG_DEBUG("AOD container has size: " << aod->size());
211  ATH_MSG_DEBUG("xAOD container has size: " << xaod->size());
212  if(aod->size() != xaod->size()){
213  ATH_MSG_ERROR("conversion resulted in differently sized containers");
214  return StatusCode::FAILURE;
215  }
216  return StatusCode::SUCCESS;
217  }
218 
219  virtual StatusCode help_fillTrigPassBits(const std::string& label, const std::string& newLabel, const TrigPassBits* tpb_aod, xAOD::TrigPassBits*& tpb_xaod){
220  typedef IHelper IH;
221  std::string fmtkey_AOD = IH::template format<AOD>(label);
222  std::string fmtkey_xAOD = IH::template format<XAOD>(newLabel);
223  std::string fmtkey_xAODAux = IH::template format<xAODAux>(newLabel+"Aux.");
224 
225  const AOD* aod = this->m_sg->template tryConstRetrieve<AOD>(fmtkey_AOD);
226  if(!aod){
227  ATH_MSG_WARNING("AOD key: " << fmtkey_AOD << " not found");
228  return StatusCode::SUCCESS;
229  }
230  ATH_MSG_DEBUG( "AOD container " << fmtkey_AOD << " extracted of size " << aod->size() );
231  // it was found out that in Run 1 data for some containers the size of the TrigPassBits object differs from
232  // the size of the corresponding container. It was decided to not convert TrigPassBits->xAOD::TrigPassBits for such cases,
233  // so xAOD::TrigPassBits will be nullptr
234  if( aod->size() != tpb_aod->size() ) {
235  ATH_MSG_WARNING( "sizes of the container " << fmtkey_AOD << " and the corresponding (?) trigpassbits object are different: "
236  << aod->size() << " vs " << tpb_aod->size() << ", will not convert TrigPassBits for this container" );
237  return StatusCode::SUCCESS;
238  }
239 
240  XAOD* xaod = this->m_sg->template tryRetrieve<XAOD>(fmtkey_xAOD);
241  if(!xaod){
242  ATH_MSG_WARNING("xAOD key: " << fmtkey_xAOD << " not found");
243  return StatusCode::SUCCESS;
244  }
245  ATH_MSG_DEBUG("xAOD container " << fmtkey_xAOD << " extracted of size " << xaod->size());
246 
247  if(aod->size() != xaod->size()) {
248  ATH_MSG_ERROR("containers before and after the conversion are of different sizes");
249  return StatusCode::FAILURE;
250  }
251 
252  ATH_MSG_DEBUG( "setting xaod passbits size to " << tpb_aod->size() );
253  std::unique_ptr<xAOD::TrigPassBits> xBits = xAOD::makeTrigPassBits(xaod);
254 
255  for(uint i=0; i<aod->size(); i++) {
256  // if(i < tpb_aod->size() ){
257  ATH_MSG_DEBUG( "looking at object " << i+1 << " of " << aod->size() );
258  bool passed = HLT::isPassing( tpb_aod, aod->at(i), aod );
259  ATH_MSG_DEBUG( "aod ispassing = " << passed );
260  ATH_MSG_DEBUG( "xaod ispassing = " << xBits->isPassing( i ) );
261  if(passed)
262  xBits->markPassing( i );
263  ATH_MSG_DEBUG( "xaod ispassing (after update) = " << xBits->isPassing( i ) );
264  /* } else {
265  ATH_MSG_DEBUG( "skipping object " << i+1 << " as it is outside of the array range of the corresponding aod TrigPassBits object" );
266  }*/
267  }
268  tpb_xaod = xBits.release();
269  return StatusCode::SUCCESS;
270  }
271  };
272 
273  struct MuonHelper : public ToolHolder<ITrigMuonEFInfoToMuonCnvTool> {
274  MuonHelper(const ToolHandle<ITrigMuonEFInfoToMuonCnvTool>& tool) : ToolHolder(tool){;}
275 
278 
281 
282  virtual StatusCode help(const std::string& label, const std::string& newLabel){
283  xAOD::MuonContainer* xaodMuon = this->m_sg->tryRetrieve<xAOD::MuonContainer>(format<xAOD::MuonContainer>(newLabel));
284  if(!xaodMuon){
285  ATH_MSG_WARNING("muon label: " << format<xAOD::MuonContainer>(newLabel) << " not found for xAOD conversion");
286  return StatusCode::SUCCESS;
287  }
288 
289  xAOD::TrackParticleContainer* xaodCombTrackParticles = this->m_sg->tryRetrieve<xAOD::TrackParticleContainer>(format<xAOD::TrackParticleContainer>(newLabel+"_CombTrackParticles"));
290  if(!xaodCombTrackParticles){
291  ATH_MSG_WARNING("muon label: " << format<xAOD::TrackParticleContainer>(newLabel+"_CombTrackParticles") << " not found for xAOD conversion");
292  return StatusCode::SUCCESS;
293  }
294 
295  xAOD::TrackParticleContainer* xaodExtrapTrackParticles = this->m_sg->tryRetrieve<xAOD::TrackParticleContainer>(format<xAOD::TrackParticleContainer>(newLabel+"_ExtrapTrackParticles"));
296  if(!xaodCombTrackParticles){
297  ATH_MSG_WARNING("muon label: " << format<xAOD::TrackParticleContainer>(newLabel+"_ExtrapTrackParticles") << " not found for xAOD conversion");
298  return StatusCode::SUCCESS;
299  }
300 
301  const TrigMuonEFInfoContainer* aod =
302  this->m_sg->tryConstRetrieve<TrigMuonEFInfoContainer>(format<TrigMuonEFInfoContainer>(label));
303  if(!aod){
304  ATH_MSG_WARNING("muon label: " << format<TrigMuonEFInfoContainer>(label) << " not found for xAOD conversion");
305  return StatusCode::SUCCESS;
306  }
307 
308  CHECK(this->m_tool->convertTrigMuonEFInfoContainer( *aod, *xaodMuon, xaodCombTrackParticles, xaodExtrapTrackParticles));
309 
310  ATH_MSG_DEBUG("Muon AOD container has size: " << aod->size());
311  ATH_MSG_DEBUG("Muon xAOD container has size: " << xaodMuon->size());
312 
313  return StatusCode::SUCCESS;
314  }
315 
316  virtual StatusCode help_fillTrigPassBits(const std::string& label, const std::string& newLabel, const TrigPassBits* tpb_aod, xAOD::TrigPassBits*& tpb_xaod){
317 
318  const TrigMuonEFInfoContainer* aod = this->m_sg->template tryConstRetrieve<TrigMuonEFInfoContainer>(label);
319  if(!aod){
320  ATH_MSG_WARNING("AOD key: " << label << " not found");
321  return StatusCode::SUCCESS;
322  }
323  ATH_MSG_DEBUG( "AOD muon container " << label << " extracted of size " << aod->size() );
324  if( aod->size() != tpb_aod->size() ) {
325  ATH_MSG_WARNING( "sizes of the muon container " << label << " and the corresponding (?) trigpassbits object are different: "
326  << aod->size() << " vs " << tpb_aod->size() << ", will not convert TrigPassBits for this container" );
327  }
328  xAOD::MuonContainer* xaodMuon = this->m_sg->template tryRetrieve<xAOD::MuonContainer>(format<xAOD::MuonContainer>(newLabel));
329  if(!xaodMuon){
330  ATH_MSG_WARNING("xAOD key: " << format<xAOD::MuonContainer>(newLabel) << " not found");
331  return StatusCode::SUCCESS;
332  }
333  ATH_MSG_DEBUG("xAOD muon container " << format<xAOD::MuonContainer>(newLabel) << " extracted of size " << xaodMuon->size());
334 
335  if(aod->size() != xaodMuon->size()) {
336  ATH_MSG_ERROR("containers before and after the conversion are of different sizes");
337  return StatusCode::FAILURE;
338  }
339 
340  ATH_MSG_DEBUG( "setting muon xaod passbits size to " << tpb_aod->size() );
341  std::unique_ptr<xAOD::TrigPassBits> xBits = xAOD::makeTrigPassBits(xaodMuon);
342 
343  for(uint i=0; i<aod->size(); i++) {
344  // if(i < tpb_aod->size() ){
345  ATH_MSG_DEBUG( "looking at muon object " << i+1 << " of " << aod->size() );
346  bool passed = HLT::isPassing( tpb_aod, aod->at(i), aod );
347  ATH_MSG_DEBUG( "muon aod ispassing = " << passed );
348  ATH_MSG_DEBUG( "muon xaod ispassing = " << xBits->isPassing( i ) );
349  if(passed)
350  xBits->markPassing( i );
351  ATH_MSG_DEBUG( "muon xaod ispassing (after update) = " << xBits->isPassing( i ) );
352  /* } else {
353  ATH_MSG_DEBUG( "skipping object " << i+1 << " as it is outside of the array range of the corresponding aod TrigPassBits object" );
354  }*/
355  }
356  tpb_xaod = xBits.release();
357  return StatusCode::SUCCESS;
358  }
359  };
360 
361 } // namespace BStoXAODHelper
362 
363 TrigBStoxAODTool::TrigBStoxAODTool(const std::string& type, const std::string& name, const IInterface* parent)
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),
369  m_jetCnvTool( "xAODMaker::JetCnvTool/JetCnvTool",this),
370  m_trigCaloClusterTool( "xAODMaker::TrigCaloClusterCnvTool/TrigCaloClusterCnvTool",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),
377  m_trigMbtsBitsTool("xAODMaker::TrigT2MbtsBitsCnvTool/TrigT2MbtsBitsCnvTool",this),
378  m_trigTrackCtsTool("xAODMaker::TrigTrackCountsCnvTool/TrigTrackCountsCnvTool",this),
379  m_trigVtxCtsTool( "xAODMaker::TrigVertexCountsCnvTool/TrigVertexCountsCnvTool",this),
380  m_electronTool( "xAODMaker::ElectronCnvTool/ElectronCnvTool", this ),
381  m_photonTool( "xAODMaker::PhotonCnvTool/PhotonCnvTool", this ),
382  m_caloClusterTool( "xAODMaker::CaloClusterCnvTool/CaloClusterCnvTool", this),
383  m_trigPassBitsTool( "xAODMaker::TrigPassBitsCnvTool/TrigPassBitsCnvTool", this )
384 {
385  declareInterface<ITrigBStoxAODTool>( this );
386  declareProperty("ContainersToConvert",m_containersToConvert);
387  declareProperty("NewContainers", m_newContainers);
388 
389  declareProperty("tauJetTool", m_tauJetTool);
390  declareProperty("combMuonTool", m_combMuonTool);
391  declareProperty("isoMuonTool", m_isoMuonTool);
392  declareProperty("trigMuonTool", m_trigMuonTool);
393  declareProperty("jetCnvTool", m_jetCnvTool);
394 
395  declareProperty("trigCaloClusterTool", m_trigCaloClusterTool);
396  declareProperty("emClusterTool", m_emClusterTool);
397  declareProperty("bjetTool", m_bjetTool);
398  declareProperty("efBphysTool", m_efBphysTool);
399  declareProperty("l2BphysTool", m_l2BphysTool);
400 
401  declareProperty("trigMetTool", m_trigMetTool);
402  declareProperty("trigSpacePtsTool", m_trigSpacePtsTool);
403  declareProperty("trigMbtsBitsTool", m_trigMbtsBitsTool);
404  declareProperty("trigTrackCtsTool", m_trigTrackCtsTool);
405  declareProperty("trigVtxCtsTool", m_trigVtxCtsTool);
406  declareProperty("electronTool", m_electronTool);
407  declareProperty("photonTool", m_photonTool);
408  declareProperty("caloClusterTool", m_caloClusterTool);
409  declareProperty("trigPassBitsTool", m_trigPassBitsTool);
410 
413 }
414 
417  for(it = m_helpers.begin();it!=m_helpers.end();++it){
418  delete it->second;
419  }
420 }
421 
423 
424  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
433 
434  m_helpers.insert( std::pair<CLID,BStoXAODHelper::MuonHelper*>
437 
438  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
447 
448  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
457 
458  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
467 
468  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
473 
474  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
479 
480  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
485 
486  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
491 
492  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
497 
498  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
503 
504  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
509 
510  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
515 
516  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
521 
522  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
527 
528  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
533 
534  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
539 
540  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
545 
546  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
551 
552  m_helpers.insert( std::pair<CLID,BStoXAODHelper::DefaultHelper<
557 
558 
560  for(it = m_helpers.begin();it!=m_helpers.end();++it){
561  CHECK(it->second->initialize(this->msg(),*(evtStore())));
562  }
563 
564  ATH_MSG_DEBUG("containers to convert: " << m_containersToConvert);
565  ATH_MSG_DEBUG("containers will be converted to: " << m_newContainers);
567  ATH_MSG_DEBUG("extracted class IDs (" << m_clid_labels.size() << " in total): " << m_clid_labels);
568 
569  if(m_clid_labels.size() != m_clid_newLabels.size()) {
570  ATH_MSG_ERROR("number of new containers names (" << m_clid_newLabels.size()
571  << ") is not the same as the number of old containers names ("
572  << m_clid_newLabels.size() << ")");
573  return StatusCode::FAILURE;
574  }
575  ATH_MSG_DEBUG("CLID CLID, old label, new label:");
576  for(uint i=0; i<m_clid_labels.size(); i++) {
578  << m_clid_labels[i].second << ", " << m_clid_newLabels[i].second );
580  ATH_MSG_VERBOSE("Run-1 " << m_clid_labels[i].first << " label " <<
581  m_clid_labels[i].second << " differs from the equivalent Run-2 label: "
583  }
584  }
585 
586  return StatusCode::SUCCESS;
587 }
588 
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();
592  for(clidlabel =m_clid_labels.begin();clidlabel!=m_clid_labels.end();++clidlabel, ++clidNewLabel){
593 
594  HLTNavDetails::IHolder* holder = nav->getHolder(clidlabel->first,clidlabel->second);
595 
596  if(!holder){
597  ATH_MSG_WARNING("couldn't find holder for " << clidlabel->first << " " << clidlabel->second);
598  continue;
599  }
600 
601  ATH_MSG_VERBOSE("container corresponding to feature CLID " << clidlabel->first << " has CLID " << holder->containerClid());
602 
603  std::multimap<CLID,BStoXAODHelper::IHelper*>::const_iterator hit;
604  hit = m_helpers.end();//find(holder->containerClid());
605 
606  std::string clabel = clidlabel->second;
607  CHECK(findHelper( m_helpers, holder->containerClid(), clabel, hit ));
608 
609  if(hit!=m_helpers.end()){
610  ATH_MSG_DEBUG("attempting convertion of clid " << holder->containerClid()
611  << " for label " << clidlabel->second << ", new label " << clidNewLabel->second);
612  CHECK(hit->second->help(clidlabel->second,clidNewLabel->second));//get aod container and convert
613  ATH_MSG_DEBUG("converted clid " << holder->containerClid() << " for label " << clidlabel->second);
614  }
615  else{
616  ATH_MSG_DEBUG("couldn't find converters for clid: " << clidlabel->first);
617  }
618  }
619  return StatusCode::SUCCESS;
620 }
621 
623  //we need to loop over all features of all TEs
624  //find the ones pointing to a AOD container that has been converted
625  //and change the holder they use to access the feature, i.e. changes CLID and subTypeIndex
626 
627  std::vector<HLT::TriggerElement*>& allTEs = nav->getAllTEs();
628  //nav->getAll(allTEs,false); //false: also get inactive TEs
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){
633  ATH_MSG_VERBOSE("this feature has CLID: " << featacchelp.getCLID());
634 
635  HLTNavDetails::IHolder* oldholder = nav->getHolder(featacchelp.getCLID(),featacchelp.getIndex().subTypeIndex());
636 
637  if(!oldholder){
638  ATH_MSG_WARNING("could not find old holder for CLID " << featacchelp.getCLID() << " and subTypeIndex: " << featacchelp.getIndex());
639  continue;
640  }
641 
642  std::multimap<CLID,BStoXAODHelper::IHelper*>::const_iterator it = m_helpers.end();//find(oldholder->containerClid());
643  std::string old_label = oldholder->label();
644  CHECK(findHelper( m_helpers, oldholder->containerClid(), old_label, it));
645  if(it != m_helpers.end()){
646  ATH_MSG_VERBOSE("need to rewire this CLID from " << oldholder->typeClid() << "/"<< oldholder->containerClid() << " to " << it->second->xAODContainerClid());
647 
648  bool iselement = (oldholder->typeClid()==it->second->AODElementClid());
649  bool iscontainer = (oldholder->typeClid()==it->second->AODContainerClid());
650 
651  ATH_MSG_VERBOSE("old is element feature " << iselement << " or container feature: " << iscontainer);
652 
653  if(!(iselement || iscontainer)){
654  ATH_MSG_WARNING("not clear what kind of feature we're dealing with. Skipping. Old holder is:" << *oldholder);
655  }
656 
657  CLID newTypeClid = CLID_NULL;
658  if(iselement) newTypeClid = it->second->xAODElementClid();
659  if(iscontainer) newTypeClid = it->second->xAODContainerClid();
660 
661  std::lock_guard<std::recursive_mutex> lock(nav->getMutex());
662  HLT::TrigHolderStructure& holderstorage = nav->getHolderStorage();
663 
664  HLTNavDetails::IHolder* newholder = holderstorage.getHolder<HLTNavDetails::IHolder>(newTypeClid,oldholder->label());
665 
666  if(!newholder){
667  ATH_MSG_WARNING("could not find new holder for xAOD clid " << newTypeClid << " and label " << oldholder->label());
668  continue;
669  }
670 
671  ATH_MSG_VERBOSE("old holder: " << *oldholder);
672  ATH_MSG_VERBOSE("new holder: " << *newholder);
673  ATH_MSG_VERBOSE("changing CLID: " << featacchelp.getCLID() << " to " << newTypeClid);
674  ATH_MSG_VERBOSE("changing STI: " << featacchelp.getIndex().subTypeIndex() << " to " << newholder->subTypeIndex());
675 
676  featacchelp.setCLIDandIndex(newTypeClid,newholder->subTypeIndex());
677  ATH_MSG_VERBOSE("clid is now: " << featacchelp.getCLID() << " sti: " << featacchelp.getIndex().subTypeIndex());
678  ATH_MSG_VERBOSE("TE is: " << *te);
679  } // end if(helper was found)
680  }//end feature loop
681  }//end TE loop
682 
683 
684  return StatusCode::SUCCESS;
685 }
686 
687 
688 
689 //blatantly stolen from navigation code
690 StatusCode TrigBStoxAODTool::classLabel2CLIDLabel(const std::vector<std::string>& property,
691  const std::vector<std::string>& newProperty,
692  std::vector<std::pair<CLID,std::string> >& decoded,
693  std::vector<std::pair<CLID,std::string> >& decodedNewNames) {
694  // translate Class names into CLID numbers
695  IClassIDSvc* clidSvc{nullptr};
696  if( service("ClassIDSvc", clidSvc).isFailure() ) {
697  ATH_MSG_FATAL("Unable to get pointer to CLIDSvc Service");
698  return StatusCode::FAILURE;
699  }
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;
704  }
705 
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 ) {
709  CLID clid{0};
710  std::string label;
711  std::string label_new;
712  std::string type;
713 
714  if ( it->find('#') != std::string::npos ) {
715  type = it->substr(0, it->find('#') );
716  label = it->substr(it->find('#')+1 );
717  } else {
718  type = *it;
719  label = "";
720  }
721 
722  if ( itNew->find('#') != std::string::npos ) {
723  label_new = itNew->substr(itNew->find('#')+1 );
724  } else {
725  label_new = "";
726  }
727 
728  if ( clidSvc->getIDOfTypeName(type, clid).isFailure() ) {
729  ATH_MSG_FATAL("Unable to get CLID for class: " << *it
730  << " check property");
731  return StatusCode::FAILURE;
732  }
733 
734  ATH_MSG_DEBUG("Recognized CLID : " << type << " and label: " << label << ", new label will be: " << label_new);
735  decoded.push_back(std::make_pair(clid, label));
736  decodedNewNames.push_back(std::make_pair(clid, label_new));
737  }
738  return StatusCode::SUCCESS;
739 }
740 
742  //we need to loop over all features of all TEs
743  //find the ones pointing to a AOD container that has been converted
744  //extract the corresponding aod TrigPassBits container and set the same
745  //bits in xAOD::TrigPassBits
746 
747  std::vector<HLT::TriggerElement*>& allTEs = nav->getAllTEs();
748 
749  ATH_MSG_DEBUG("setting xAOD TrigPassBits. Working on " << allTEs.size() << " TEs");
750 
751  for(auto te : allTEs){
752  std::vector<HLT::TriggerElement::FeatureAccessHelper>& feats = te->getFeatureAccessHelpers();
753  for(auto& featacchelp : feats){
754  ATH_MSG_VERBOSE("this feature has CLID: " << featacchelp.getCLID());
755 
756  HLTNavDetails::IHolder* holder = nav->getHolder(featacchelp.getCLID(),featacchelp.getIndex().subTypeIndex());
757 
758  if(!holder){
759  ATH_MSG_WARNING("could not find holder for CLID " << featacchelp.getCLID() << " and subTypeIndex: " << featacchelp.getIndex());
760  continue;
761  }
762 
763  if(holder->label() == "passbits") {
764  ATH_MSG_VERBOSE( "skipping this feature, as this is the passbits object itself" );
765  continue;
766  }
767 
768  std::multimap<CLID,BStoXAODHelper::IHelper*>::const_iterator it = m_helpers.end();//find(holder->containerClid());
769  std::string hlabel = holder->label();
770  CHECK(findHelper( m_helpers, holder->containerClid(), hlabel, it ));
771  if(it != m_helpers.end()){
772 
773  ATH_MSG_DEBUG( "need to extract TrigPassBits for this AOD object " << holder->typeClid() << "/"<< holder->containerClid()
774  << ", label " << holder->label() << " corresponding to xAOD CLID " << it->second->xAODContainerClid() );
775 
776  bool iselement = (holder->typeClid()==it->second->AODElementClid());
777  bool iscontainer = (holder->typeClid()==it->second->AODContainerClid());
778 
779  ATH_MSG_VERBOSE("is element feature " << iselement << " or container feature: " << iscontainer);
780 
781  if(!(iselement || iscontainer)){
782  ATH_MSG_WARNING("not clear what kind of feature we're dealing with. Skipping. The holder is:" << *holder);
783  }
784 
785  ATH_MSG_VERBOSE("holder: " << *holder);
786 
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() );
790  //dump this to compare with the results from release 17
791  // for(uint i=0; i<bits_collection->size(); i++ ) {
792  // std::cout << "size of the TrigPassBits object " << i << " is " << bits_collection->at(i)->size() << std::endl;
793  // }
794  } else {
795  ATH_MSG_WARNING( "aod bits collection cannot be extracted" );
796  continue;
797  }
798 
799 
800  xAOD::TrigPassBitsContainer* xaod_bits_collection = evtStore()->template tryRetrieve<xAOD::TrigPassBitsContainer>("HLT_xAOD__TrigPassBitsContainer_passbits");
801  if(xaod_bits_collection != nullptr)
802  ATH_MSG_DEBUG( "xaod bits container extracted of size " << xaod_bits_collection->size() );
803  else {
804  ATH_MSG_WARNING( "xaod bits container cannot be extracted" );
805  continue;
806  }
807 
808  const TrigPassBits* bits(0);
809  if ( nav->getFeature(te, bits, "passbits" ) ){
810  ATH_MSG_DEBUG( "TrigPassBits extracted for the container " << holder->label() );
811  if(bits!=nullptr) {
812  ATH_MSG_DEBUG( "it's size is " << bits->size() );
813  } else {
814  ATH_MSG_DEBUG( "it is nullptr" );
815  continue;
816  }
817  } else {
818  ATH_MSG_WARNING( "this TE has no associated TrigPassBits object" );
819  continue;
820  }
821  if(bits_collection != nullptr && xaod_bits_collection != nullptr && bits != nullptr) {
822  int bits_nr = -1;
823  for(uint i=0; i<bits_collection->size(); i++) {
824  if(bits == bits_collection->at(i)) {
825  bits_nr = i;
826  ATH_MSG_VERBOSE( "this is bits # " << bits_nr );
827  break;
828  }
829  }
830  if(bits_nr >= 0) {
831  xAOD::TrigPassBits* xaod_tpb = nullptr;
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;
834  it_new_label = std::find(m_clid_newLabels.begin(), m_clid_newLabels.end(), pair);
835  std::string new_label = "";
836  if(it_new_label != m_clid_newLabels.end()) {
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 ) );
841  } else {
842  ATH_MSG_DEBUG( "new label was not found, presumably this container was not converted. Will not look for TrigPassBits" );
843  }
844 
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() );
848  }
849 
850  } else {
851  ATH_MSG_WARNING( "TrigPassBits object was not identified within container!" );
852  }
853  }// if good aod and xaod passbits are available
854  } // if helper was found
855  }// feature loop
856  }// TE loop
857 
858 
859  return StatusCode::SUCCESS;
860 }
861 
862 // the following function returns iterator pointing to the desired converter, based on the clid of the AOD type and label
863 StatusCode TrigBStoxAODTool::findHelper( MM_CLID_IHELPER& helpers, CLID clid, std::string& label, MM_CLID_IHELPER::const_iterator& it ) {
864  auto myrange = helpers.equal_range(clid);
865  it = myrange.first;
866  //let's see how many there are converters corresponding to the same AOD input type
867  int distance = std::distance(myrange.first, myrange.second);
868  if (distance == 1) {
869  //default case, one-to-one relation of AOD and xAOD types
870  ATH_MSG_VERBOSE("helper to convert AOD CLID " << clid << " and label " << label << " found");
871  return StatusCode::SUCCESS;
872  } else if (distance == 2) {
873  //this is for the case when there is single AOD type converted to two different xAOD types,
874  //will treat this here separately. So far this only happens for egammaContainer->xAOD::ElectronContainer and
875  //egammaContainer->xAOD::PhotonContainer
876  for(;it!=myrange.second;++it) {
877  CLID myHelperxAODCLID = (*it).second->xAODContainerClid();
878  if((label == "egamma_Electrons" && myHelperxAODCLID == m_CLID_xAODElectronContainer) ||
879  (label == "egamma_Photons" && myHelperxAODCLID == m_CLID_xAODPhotonContainer)) {
880  ATH_MSG_VERBOSE("helper to convert AOD CLID " << clid << " and label " << label << " found");
881  return StatusCode::SUCCESS;
882  }
883  }
884  } else if( distance == 0) {
885  ATH_MSG_WARNING("there is no helper to convert AOD CLID " << clid << ", label " << label);
886  it = helpers.end();
887  return StatusCode::SUCCESS;
888  } else {
889  //this should not happen...
890  ATH_MSG_ERROR("found " << distance << " helpers to convert AOD type " << clid << " and label " << label
891  << ", probably you should accomodate for this change in the code above" );
892  return StatusCode::FAILURE;
893  }
894 
895  //this point is not reached if everything is OK
896  return StatusCode::SUCCESS;
897 
898 } // MM_CLID_IHELPER::const_iterator findHelper( ... )
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TrigBStoxAODTool::m_trackCollectionTool
ToolHandle< xAODMaker::ITrackCollectionCnvTool > m_trackCollectionTool
Definition: TrigBStoxAODTool.h:121
L2CombinedMuonAuxContainer.h
HLTNavDetails::IHolder::containerClid
virtual CLID containerClid() const =0
TrigPassBitsCollection.h
BStoXAODHelper::IHelper::initialize
virtual StatusCode initialize(MsgStream &m, StoreGateSvc &s)
Definition: TrigBStoxAODTool.cxx:125
TrigBStoxAODTool::m_caloClusterTool
ToolHandle< xAODMaker::ICaloClusterCnvTool > m_caloClusterTool
Definition: TrigBStoxAODTool.h:129
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
known::search_result
master_search< typename EDMLIST::map, get_strictly_feat, T >::result::search_result search_result
Definition: TrigBStoxAODTool.cxx:109
TrigBStoxAODTool::m_trigCaloClusterTool
ToolHandle< xAODMaker::ITrigCaloClusterCnvTool > m_trigCaloClusterTool
Definition: TrigBStoxAODTool.h:101
TrigBStoxAODTool::m_efBphysTool
ToolHandle< xAODMaker::ITrigEFBphysContainerCnvTool > m_efBphysTool
Definition: TrigBStoxAODTool.h:108
getCLID
Definition: TrigBStoxAODTool.cxx:114
TrigBStoxAODTool::initialize
virtual StatusCode initialize()
Definition: TrigBStoxAODTool.cxx:422
xAOD::TrigPassBits_v1::isPassing
bool isPassing(const OBJ *obj, const CONT *container) const
Check if an element of a container is passing/failing.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
xAODMaker::ITrigL2BphysContainerCnvTool
Interface for the tool creating TrigBphysContainer from an AOD.
Definition: ITrigL2BphysContainerCnvTool.h:34
BStoXAODHelper::MuonHelper::help
virtual StatusCode help(const std::string &label, const std::string &newLabel)
Definition: TrigBStoxAODTool.cxx:282
TrigBStoxAODTool::m_photonTool
ToolHandle< xAODMaker::IPhotonCnvTool > m_photonTool
Definition: TrigBStoxAODTool.h:126
TrigBStoxAODTool::m_combMuonTool
ToolHandle< xAODMaker::ICombinedMuonFeatureContainerCnvTool > m_combMuonTool
Definition: TrigBStoxAODTool.h:93
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
xAODMaker::ITrackCollectionCnvTool
Definition: ITrackCollectionCnvTool.h:33
xAODMaker::IPhotonCnvTool
Interface for the tool creating PhotonContainer from an AOD.
Definition: IPhotonCnvTool.h:38
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
HLTNavDetails::IHolder::label
const std::string & label() const
returns the label of objects stores by this holder
Definition: Holder.h:85
TrigPassBitsCollection
Definition: TrigPassBitsCollection.h:17
TrigBStoxAODTool::setTrigPassBits
StatusCode setTrigPassBits(HLT::Navigation *nav)
Definition: TrigBStoxAODTool.cxx:741
TrigBStoxAODTool::m_trigVtxCtsTool
ToolHandle< xAODMaker::ITrigVertexCountsCnvTool > m_trigVtxCtsTool
Definition: TrigBStoxAODTool.h:118
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
TrigMuonEFInfoContainer.h
StoreGateSvc::tryRetrieve
T * tryRetrieve() const
Variant of the above which doesn't print a warning message.
BStoXAODHelper::IHelper::AODElementClid
virtual CLID AODElementClid()=0
CaloClusterContainer
Storable container for CaloCluster.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloClusterContainer.h:37
HLT::TrigHolderStructure
Definition: TrigHolderStructure.h:21
BStoXAODHelper::IHelper::m_AODprefix
const std::string m_AODprefix
Definition: TrigBStoxAODTool.cxx:158
HLT::TrigNavStructure::getMutex
std::recursive_mutex & getMutex()
Definition: TrigNavStructure.h:371
L2CombinedMuonContainer.h
CombinedMuonFeatureContainer
Definition: CombinedMuonFeatureContainer.h:14
TrigBStoxAODTool::~TrigBStoxAODTool
virtual ~TrigBStoxAODTool()
Definition: TrigBStoxAODTool.cxx:415
TrigEMClusterContainer.h
TrigSpacePointCountsContainer.h
TrigEFBjetContainer
Container of TrigEFBjet objects to be stored in POOL.
Definition: TrigEFBjetContainer.h:31
xAODMaker::ITrigEMClusterCnvTool
Interface for the tool creating TrigEMCluster from an AOD.
Definition: ITrigEMClusterCnvTool.h:38
TrigPassBits::size
unsigned int size() const
gets size of the bits array
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/TrigPassBits.h:44
skel.it
it
Definition: skel.GENtoEVGEN.py:423
xAODMaker::ITrigPassBitsCnvTool
Interface for the tool creating TrigPassBitsContainer from an AOD.
Definition: ITrigPassBitsCnvTool.h:38
taskman.template
dictionary template
Definition: taskman.py:317
TrigBStoxAODTool::TrigBStoxAODTool
TrigBStoxAODTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigBStoxAODTool.cxx:363
TrigMissingETContainer
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingETContainer.h:12
TrigTrackCountsContainer.h
athena.value
value
Definition: athena.py:122
xAODMaker::ITrigCaloClusterCnvTool
Interface for the tool creating TrigCaloCluster from an AOD.
Definition: ITrigCaloClusterCnvTool.h:38
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
Analysis::TauJetContainer
Definition: Reconstruction/tauEvent/tauEvent/TauJetContainer.h:31
TrigSpacePointCountsAuxContainer.h
TrigBStoxAODTool::m_trigMuonTool
ToolHandle< ITrigMuonEFInfoToMuonCnvTool > m_trigMuonTool
Definition: TrigBStoxAODTool.h:95
BStoXAODHelper::DefaultHelper::help_fillTrigPassBits
virtual StatusCode help_fillTrigPassBits(const std::string &label, const std::string &newLabel, const TrigPassBits *tpb_aod, xAOD::TrigPassBits *&tpb_xaod)
Definition: TrigBStoxAODTool.cxx:219
TrigBStoxAODTool::m_trigPassBitsTool
ToolHandle< xAODMaker::ITrigPassBitsCnvTool > m_trigPassBitsTool
Definition: TrigBStoxAODTool.h:132
TrigCaloClusterContainer.h
HLTNavDetails::formatSGkey
std::string formatSGkey(const std::string &prefix, const std::string &containername, const std::string &label)
declaration of formatting function.
Definition: Holder.cxx:122
master_search
Definition: EDM_MasterSearch.h:85
TrigPassBits.h
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
BStoXAODHelper::ToolHolder::~ToolHolder
virtual ~ToolHolder()
Definition: TrigBStoxAODTool.cxx:169
TrigMuonEFInfoContainer
Definition: TrigMuonEFInfoContainer.h:27
BStoXAODHelper::IHelper::format
std::string format(const std::string &label)
Definition: TrigBStoxAODTool.cxx:152
HLT::TypeInformation::get_feat
Definition: TypeInformation.h:291
HLTResult.h
TrigEMClusterContainer
Container from TrigEMCluster type objects.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMClusterContainer.h:32
TrigHolderStructure.h
TrigBphysAuxContainer.h
TrigCaloClusterAuxContainer.h
TrigTrackCountsAuxContainer.h
TrigBStoxAODTool::m_newContainers
std::vector< std::string > m_newContainers
Definition: TrigBStoxAODTool.h:85
TrigBStoxAODTool::m_electronTool
ToolHandle< xAODMaker::IElectronCnvTool > m_electronTool
Definition: TrigBStoxAODTool.h:125
TrigBStoxAODTool::m_recTrackParticleContTool
ToolHandle< xAODMaker::IRecTrackParticleContainerCnvTool > m_recTrackParticleContTool
Definition: TrigBStoxAODTool.h:122
TrigBStoxAODTool::convert
StatusCode convert(HLT::Navigation *nav)
Definition: TrigBStoxAODTool.cxx:589
TrigVertexCountsCollection.h
TrigBStoxAODTool.h
xAODMaker::IRecTrackParticleContainerCnvTool
Definition: IRecTrackParticleContainerCnvTool.h:37
HLT::NavigationCore::getFeature
bool getFeature(const TriggerElement *te, const T *&features, const std::string &label="", std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
TriggerElement.h
HLT::NavigationCore::getHolder
HLTNavDetails::Holder< T > * getHolder(uint16_t subTypeIndex) const
as above but does not create holder on demand (return 0 if not found)
TrigEFBphysContainer.h
MuonAuxContainer.h
TrigBStoxAODTool::m_clid_newLabels
std::vector< std::pair< CLID, std::string > > m_clid_newLabels
Definition: TrigBStoxAODTool.h:88
CombinedMuonFeatureContainer.h
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
TrigBStoxAODTool::m_CLID_xAODElectronContainer
CLID m_CLID_xAODElectronContainer
Definition: TrigBStoxAODTool.h:138
TrigT2MbtsBitsAuxContainer.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
TrigL2BphysContainer.h
BStoXAODHelper::ToolHolder
Definition: TrigBStoxAODTool.cxx:163
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
TrigTrackCountsCollection
Definition: TrigTrackCountsCollection.h:13
TrigBStoxAODTool::m_trigMbtsBitsTool
ToolHandle< xAODMaker::ITrigT2MbtsBitsCnvTool > m_trigMbtsBitsTool
Definition: TrigBStoxAODTool.h:116
BStoXAODHelper::ToolHolder::m_tool
const ToolHandle< T > & m_tool
Definition: TrigBStoxAODTool.cxx:165
TrigT2MbtsBitsContainer
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigT2MbtsBitsContainer.h:13
get_strictly_feat
Definition: TrigBStoxAODTool.cxx:103
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
TrigBStoxAODTool::m_containersToConvert
std::vector< std::string > m_containersToConvert
Definition: TrigBStoxAODTool.h:84
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TrackParticleAuxContainer.h
TrigSpacePointCountsCollection
Definition: TrigSpacePointCountsCollection.h:20
TrigEMClusterAuxContainer.h
TrigStreamAddress.h
TrigSpacePointCountsCollection.h
ElectronContainer.h
TrigPassBitsContainer.h
lumiFormat.i
int i
Definition: lumiFormat.py:92
xAODMaker::ITrigT2MbtsBitsCnvTool
Interface for the tool creating TrigT2MbtsBitsContainer from an AOD.
Definition: ITrigT2MbtsBitsCnvTool.h:33
getCLID< T, true >::ID
static int ID()
Definition: TrigBStoxAODTool.cxx:115
JetCollection.h
BStoXAODHelper::MuonHelper::AODElementClid
CLID AODElementClid()
Definition: TrigBStoxAODTool.cxx:279
BStoXAODHelper::IHelper::AODContainerClid
virtual CLID AODContainerClid()=0
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAODMaker::ITrigBjetCnvTool
Interface for the tool creating TrigBjetContainer from an AOD.
Definition: ITrigBjetCnvTool.h:36
BStoXAODHelper::MuonHelper::MuonHelper
MuonHelper(const ToolHandle< ITrigMuonEFInfoToMuonCnvTool > &tool)
Definition: TrigBStoxAODTool.cxx:274
TrigBStoxAODTool::m_emClusterTool
ToolHandle< xAODMaker::ITrigEMClusterCnvTool > m_emClusterTool
Definition: TrigBStoxAODTool.h:102
Holder.h
xAOD::TrigPassBits_v1
Type describing which elements in a container passed a trigger chain.
Definition: TrigPassBits_v1.h:38
TrigBStoxAODTool::rewireNavigation
StatusCode rewireNavigation(HLT::Navigation *nav)
Definition: TrigBStoxAODTool.cxx:622
NavigationCore.h
TrigBStoxAODTool::m_l2BphysTool
ToolHandle< xAODMaker::ITrigL2BphysContainerCnvTool > m_l2BphysTool
Definition: TrigBStoxAODTool.h:109
TrackCollection.h
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
TrigVertexCountsContainer.h
xAODMaker::IJetCnvTool
Interface for the tool creating JetContainer from an AOD.
Definition: IJetCnvTool.h:38
TrigBStoxAODTool::m_bjetTool
ToolHandle< xAODMaker::ITrigBjetCnvTool > m_bjetTool
Definition: TrigBStoxAODTool.h:105
xAOD::makeTrigPassBits
std::unique_ptr< TrigPassBits_v1 > makeTrigPassBits(const CONT *container, uint32_t containerKey=xAOD::TrigPassBits_v1::DEFAULT_KEY)
Helper function creating a new object to describe a target container.
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAODMaker::ITrigEFBphysContainerCnvTool
Interface for the tool creating TrigBphysContainer from an AOD.
Definition: ITrigEFBphysContainerCnvTool.h:34
egammaContainer
Definition: egammaContainer.h:41
HLT::TrigNavStructure::getHolderStorage
TrigHolderStructure & getHolderStorage()
Definition: TrigNavStructure.h:370
TrigBStoxAODTool::m_clid_labels
std::vector< std::pair< CLID, std::string > > m_clid_labels
Definition: TrigBStoxAODTool.h:87
TrigMissingETContainer.h
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
TauJetContainer.h
xAODMaker::ITrigTrackCountsCnvTool
Interface for the tool creating TrigTrackCountsContainer from an AOD.
Definition: ITrigTrackCountsCnvTool.h:33
HLT::Navigation
The Navigation class, organizes TriggerElements into the tree structure.
Definition: Navigation.h:100
TrigVertexCountsAuxContainer.h
BStoXAODHelper::IHelper::m_msg
MsgStream * m_msg
Definition: TrigBStoxAODTool.cxx:156
HLT::isPassing
bool isPassing(const TrigPassBits *bits, const T *obj, const CONTAINER *container)
Check the bit for the object in the associated bits object.
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/TrigPassBits.h:82
TrigBStoxAODTool::m_CLID_xAODPhotonContainer
CLID m_CLID_xAODPhotonContainer
Definition: TrigBStoxAODTool.h:137
TauJetContainer.h
BStoXAODHelper::IHelper::help
virtual StatusCode help(const std::string &label, const std::string &newLabel)=0
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
Container2Aux::type
master_search< typename EDMLIST::map, HLT::TypeInformation::get_cont, CONTAINER >::result::search_result::aux type
Definition: EDM_TypeInfoMethods.h:31
BStoXAODHelper::ToolHolder::initialize
virtual StatusCode initialize(MsgStream &m, StoreGateSvc &s)
Definition: TrigBStoxAODTool.cxx:170
TrigEFBjetContainer.h
BStoXAODHelper::DefaultHelper::AODContainerClid
CLID AODContainerClid()
Definition: TrigBStoxAODTool.cxx:184
BStoXAODHelper::DefaultHelper::xAODAux
Container2Aux< XAOD >::type xAODAux
Definition: TrigBStoxAODTool.cxx:180
TrigBStoxAODTool::m_trigMetTool
ToolHandle< xAODMaker::ITrigMissingETCnvTool > m_trigMetTool
Definition: TrigBStoxAODTool.h:112
BStoXAODHelper::IHelper::msgLvl
bool msgLvl(const MSG::Level l)
Definition: TrigBStoxAODTool.cxx:143
TrigBStoxAODTool::m_trigSpacePtsTool
ToolHandle< xAODMaker::ITrigSpacePointCountsCnvTool > m_trigSpacePtsTool
Definition: TrigBStoxAODTool.h:115
xAODMaker::ICombinedMuonFeatureContainerCnvTool
Interface for the tool creating CombinedMuonFeatureContainer from an AOD.
Definition: ICombinedMuonFeatureContainerCnvTool.h:33
BStoXAODHelper::MuonHelper::AODContainerClid
CLID AODContainerClid()
Definition: TrigBStoxAODTool.cxx:276
L2IsoMuonContainer.h
xAODMaker::ITrigSpacePointCountsCnvTool
Interface for the tool creating TrigSpacePointCountsContainer from an AOD.
Definition: ITrigSpacePointCountsCnvTool.h:33
BTaggingContainer.h
TrigBStoxAODTool::m_jetCnvTool
ToolHandle< xAODMaker::IJetCnvTool > m_jetCnvTool
Definition: TrigBStoxAODTool.h:98
TrigEFBphys.h
getCLID< T, false >::ID
static int ID()
Definition: TrigBStoxAODTool.cxx:116
xAODMaker::ITauJetCnvTool
Interface for the tool creating TauJetContainer from an AOD.
Definition: ITauJetCnvTool.h:39
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
TrigBStoxAODTool::m_helpers
std::multimap< CLID, BStoXAODHelper::IHelper * > m_helpers
Definition: TrigBStoxAODTool.h:134
xAODMaker::ICaloClusterCnvTool
Interface for the tool doing AOD->xAOD conversion for clusters.
Definition: ICaloClusterCnvTool.h:41
Rec::TrackParticleContainer
Definition: Reconstruction/Particle/Particle/TrackParticleContainer.h:33
TrigPassBits
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/TrigPassBits.h:17
TrigBStoxAODTool::classLabel2CLIDLabel
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)
Definition: TrigBStoxAODTool.cxx:690
TrigBStoxAODTool::m_trigTrackCtsTool
ToolHandle< xAODMaker::ITrigTrackCountsCnvTool > m_trigTrackCtsTool
Definition: TrigBStoxAODTool.h:117
TrigCaloClusterContainer.h
StoreGateSvc::tryConstRetrieve
const T * tryConstRetrieve() const
xAOD::TrigPassBits_v1::markPassing
void markPassing(const OBJ *obj, const CONT *container, bool passed=true)
Mark one of the elements of the target container as passing/failing.
BStoXAODHelper::DefaultHelper::AODElementClid
CLID AODElementClid()
Definition: TrigBStoxAODTool.cxx:187
TrigBStoxAODTool::m_isoMuonTool
ToolHandle< xAODMaker::IIsoMuonFeatureContainerCnvTool > m_isoMuonTool
Definition: TrigBStoxAODTool.h:94
MuonContainer.h
BStoXAODHelper::DefaultHelper::xAODContainerClid
CLID xAODContainerClid()
Definition: TrigBStoxAODTool.cxx:185
TrigT2MbtsBitsContainer.h
TrigEMClusterContainer.h
HLT::TrigNavStructure::getAllTEs
std::vector< TriggerElement * > & getAllTEs()
access needed by slimming tools.
Definition: TrigNavStructure.cxx:376
BStoXAODHelper
Tool used by TrigBSExtraction to convert to xAOD.
Definition: TrigBStoxAODTool.cxx:119
BStoXAODHelper::DefaultHelper
Definition: TrigBStoxAODTool.cxx:179
BStoXAODHelper::MuonHelper::help_fillTrigPassBits
virtual StatusCode help_fillTrigPassBits(const std::string &label, const std::string &newLabel, const TrigPassBits *tpb_aod, xAOD::TrigPassBits *&tpb_xaod)
Definition: TrigBStoxAODTool.cxx:316
TrigBStoxAODTool::m_tauJetTool
ToolHandle< xAODMaker::ITauJetCnvTool > m_tauJetTool
Definition: TrigBStoxAODTool.h:90
TrigVertexCountsCollection
Definition: TrigVertexCountsCollection.h:13
JetContainer.h
HLTNavDetails::IHolder::typeClid
virtual CLID typeClid() const =0
returns the CLID of objects stores by this holder
TrigL2Bphys.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
BStoXAODHelper::DefaultHelper::xAODElementClid
CLID xAODElementClid()
Definition: TrigBStoxAODTool.cxx:188
HLTNavDetails::IHolder
Definition: Holder.h:58
BStoXAODHelper::IHelper::xAODContainerClid
virtual CLID xAODContainerClid()=0
JetCollection
Container for Jets
Definition: JetCollection.h:30
BStoXAODHelper::ToolHolder::ToolHolder
ToolHolder(const ToolHandle< T > &tool)
Definition: TrigBStoxAODTool.cxx:168
BStoXAODHelper::DefaultHelper::help
virtual StatusCode help(const std::string &label, const std::string &newLabel)
Definition: TrigBStoxAODTool.cxx:190
get_strictly_feat::result
static const bool result
Definition: TrigBStoxAODTool.cxx:104
TrigMissingETContainer.h
known
Definition: TrigBStoxAODTool.cxx:107
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
BStoXAODHelper::IHelper::m_sg
StoreGateSvc * m_sg
Definition: TrigBStoxAODTool.cxx:157
DeMoScan.first
bool first
Definition: DeMoScan.py:534
HLTNavDetails::IHolder::subTypeIndex
uint16_t subTypeIndex() const
returns the index (short number used when linking object to the TE) of objects stores by this holder
Definition: Holder.h:111
TrigMissingETAuxContainer.h
BStoXAODHelper::IHelper::~IHelper
virtual ~IHelper()
Definition: TrigBStoxAODTool.cxx:124
BStoXAODHelper::IHelper::xAODElementClid
virtual CLID xAODElementClid()=0
CaloClusterContainer.h
JetAuxContainer.h
xAODMaker::IElectronCnvTool
Interface for the tool creating ElectronContainer from an AOD.
Definition: IElectronCnvTool.h:37
TrigL2BphysContainer
Definition: TrigL2BphysContainer.h:33
BStoXAODHelper::IHelper::msg
MsgStream & msg(MSG::Level l)
Definition: TrigBStoxAODTool.cxx:142
BStoXAODHelper::MuonHelper::xAODElementClid
CLID xAODElementClid()
Definition: TrigBStoxAODTool.cxx:280
TrigTrackCountsCollection.h
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
AthAlgTool
Definition: AthAlgTool.h:26
TrigEFBphysContainer
Definition: TrigEFBphysContainer.h:34
IsoMuonFeatureContainer.h
TrigT2MbtsBitsContainer.h
TrigBphysContainer.h
xAODMaker::ITrigVertexCountsCnvTool
Interface for the tool creating TrigVertexCountsContainer from an AOD.
Definition: ITrigVertexCountsCnvTool.h:33
HLT::TrigHolderStructure::getHolder
HolderType * getHolder(class_id_type clid, const std::variant< sub_index_type, std::string > &stiOrLabel) const
Definition: TrigHolderStructure.h:30
python.PerfMonSerializer.decoded
def decoded
Definition: PerfMonSerializer.py:746
xAODMaker::ITrigMissingETCnvTool
Interface for the tool creating TrigMissingETContainer from an AOD.
Definition: ITrigMissingETCnvTool.h:33
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
TrigBStoxAODTool::findHelper
StatusCode findHelper(MM_CLID_IHELPER &helpers, CLID clid, std::string &label, MM_CLID_IHELPER::const_iterator &it)
Definition: TrigBStoxAODTool.cxx:863
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
PhotonContainer.h
TrigCaloClusterContainer
Container from TrigCaloCluster type objects.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigCaloClusterContainer.h:29
L2IsoMuonAuxContainer.h
TrackParticleContainer.h
BStoXAODHelper::ToolHolder::tool
ToolHandle< T > & tool()
Definition: TrigBStoxAODTool.cxx:166
known::value
static const bool value
Definition: TrigBStoxAODTool.cxx:110
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
TrigBStoxAODTool::MM_CLID_IHELPER
std::multimap< CLID, BStoXAODHelper::IHelper * > MM_CLID_IHELPER
Definition: TrigBStoxAODTool.h:80
HLT::TypeInformation::at
Definition: TypeInformation.h:112
BStoXAODHelper::IHelper
Definition: TrigBStoxAODTool.cxx:122
BStoXAODHelper::DefaultHelper::DefaultHelper
DefaultHelper(const ToolHandle< CnvTool > &tool)
Definition: TrigBStoxAODTool.cxx:182
BStoXAODHelper::MuonHelper
Definition: TrigBStoxAODTool.cxx:273
BStoXAODHelper::MuonHelper::xAODContainerClid
CLID xAODContainerClid()
Definition: TrigBStoxAODTool.cxx:277
egammaContainer.h
EDM_TypeInfo.h
TrackParticleContainer.h
BStoXAODHelper::IHelper::help_fillTrigPassBits
virtual StatusCode help_fillTrigPassBits(const std::string &label, const std::string &newLabel, const TrigPassBits *tpb_aod, xAOD::TrigPassBits *&tpb_xaod)=0