ATLAS Offline Software
TrigPassBitsCnvTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id$
6 
7 // EDM include(s):
10 
11 // Local include(s):
12 #include "TrigPassBitsCnvTool.h"
13 
14 namespace xAODMaker {
15 
17  const std::string& name,
18  const IInterface* parent )
19  : AthAlgTool( type, name, parent ) {
20 
21  // Declare the interface(s) provided by the tool:
22  declareInterface< ITrigPassBitsCnvTool >( this );
23  }
24 
35  xAOD::TrigPassBitsContainer* xaod ) const
36  {
37  ATH_MSG_VERBOSE( "in TrigPassBitsCnvTool::convert" );
38  // If there is no TrigPassBits to convert:
39  if( aod->empty() ) {
40  ATH_MSG_DEBUG( "No TrigPassBits objects received on the input" );
41  return StatusCode::SUCCESS;
42  }
43 
44  ATH_MSG_VERBOSE( "in TrigPassBitsCnvTool::convert, size of the input container is " << aod->size() );
45  // Convert:
46 
49  // here we just create container with empty xAOD TrigPassBits, of the same size as the AOD equivalent container
50  // the actual bit setting is made by Trigger/TrigEvent/TrigBSExtraction
51  // by StatusCode TrigBStoxAODTool::setTrigPassBits(HLT::Navigation* nav);
52  // thus we are sure that after rewiring the navigation the new trigpassbits are in the proper place
53  for( ; it!=it_end; ++it) {
54 
55  xAOD::TrigPassBits* xaod_tpb = nullptr; // new xAOD::TrigPassBits();
56  xaod->push_back(xaod_tpb);
57  }
58 
59 
60  ATH_MSG_VERBOSE( "exiting TrigPassBitsCnvTool::convert, converted container has " << xaod->size() << " elements" );
61  // Return gracefully:
62  return StatusCode::SUCCESS;
63  }
64 
65 } // namespace xAODMaker
TrigPassBitsCollection.h
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
TrigPassBitsCollection
Definition: TrigPassBitsCollection.h:17
TrigPassBitsCnvTool.h
skel.it
it
Definition: skel.GENtoEVGEN.py:423
xAODMaker::TrigPassBitsCnvTool::convert
virtual StatusCode convert(const TrigPassBitsCollection *aod, xAOD::TrigPassBitsContainer *xaod) const override
Function that fills an existing xAOD::TrigPassBits.
Definition: TrigPassBitsCnvTool.cxx:34
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAODMaker
Definition: StoreGateSvc.h:72
TrigPassBitsContainer.h
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
xAOD::TrigPassBits_v1
Type describing which elements in a container passed a trigger chain.
Definition: TrigPassBits_v1.h:38
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26
xAODMaker::TrigPassBitsCnvTool::TrigPassBitsCnvTool
TrigPassBitsCnvTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
Definition: TrigPassBitsCnvTool.cxx:16
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.