|
ATLAS Offline Software
|
Go to the documentation of this file.
12 const std::string&
name,
26 return StatusCode::SUCCESS;
34 auto outputJets = std::make_unique<std::vector<TrigBtagEmulationJet>>();
35 auto sortedPreselJets = std::make_unique<std::vector<TrigBtagEmulationJet>>();
50 sortedPreselJets->reserve(theJetContainer->
size());
53 outputJets->push_back(
toAdd );
62 if ( bjetContainerHandle.
isValid() ) {
70 for (std::size_t ijet(0); ijet < outputJets->size(); ijet++) {
71 const auto& emuljet = outputJets->
at(ijet);
86 for (
const auto&
jet : *outputJets.get() ) {
93 sort(sortedPreselJets->begin(), sortedPreselJets->end(),
94 [] (
const auto& lhs,
const auto& rhs) ->
bool
95 { return lhs.pt() > rhs.pt(); }
99 for(
unsigned int i = 0;
i < 10 and
i < sortedPreselJets->size();
i++) {
105 emulCtx.
store( storage_name, std::move(outputJets) );
106 emulCtx.
store( storage_name +
"_presel", std::move(sortedPreselJets) );
108 return StatusCode::SUCCESS;
117 return *emulCtx.
get<std::vector<TrigBtagEmulationJet>>(
m_jetcontainer.value() +
"_presel");
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
AthConfigFlags bjet(AthConfigFlags flags, str instanceName, str recoMode)
const_pointer_type cptr()
Dereference the pointer.
The common trigger namespace for trigger analysis tools.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
::StatusCode StatusCode
StatusCode definition for legacy code.
const T * get(const std::string &name) const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
void store(const std::string &name, std::unique_ptr< T > &&object)
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.