9#include "CLHEP/Units/SystemOfUnits.h"
22 declareInterface<IDataRetriever>(
this);
25 "Storegate key for Level-1 Jet Elements");
35 const t_JECollection* JEVector;
38 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"No Level-1 Jet Elements found in SG at "
40 return StatusCode::SUCCESS;
42 int noJE = JEVector->
size();
44 if (
msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
" Retrieving Level-1 Jet Elements with size " << noJE <<
endmsg;
48 DataVect energy; energy.reserve(noJE);
50 t_JECollection::const_iterator it ;
52 for( it = JEVector->begin(); it < JEVector->end(); ++it ){
55 energy.push_back(
DataType((*it)->energy()));
59 const auto nPhi =
phi.size();
60 myDataMap[
"energy"] = std::move(energy);
61 myDataMap[
"phi"] = std::move(
phi);
62 myDataMap[
"eta"] = std::move(
eta);
70 std::string emptyStr =
"";
71 return FormatTool->AddToEvent(
dataTypeName(), emptyStr, &myDataMap);
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
bool msgLvl(const MSG::Level lvl) const
size_type size() const noexcept
Returns the number of elements in the collection.
LVL1JetElementRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
std::string m_sgKey
The storegate key for the JetElements.
virtual std::string dataTypeName() const
Return the name of the data type.
const std::string m_typeName
The data type that is generated by this retriever.
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
std::map< std::string, DataVect > DataMap
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.