|
ATLAS Offline Software
|
Go to the documentation of this file.
24 const std::string&
name,
25 const IInterface*
parent) :
28 declareInterface<DerivationFramework::IAugmentationTool>(
this);
36 ATH_MSG_FATAL(
"No inner detector track selection string provided!");
37 return StatusCode::FAILURE;
41 ATH_MSG_WARNING(
"No decoration prefix name provided for the output of EventInfoPixelDecorator!");
45 ATH_MSG_ERROR(
"No collection provided for EventInfoPixelDecorator!");
46 return StatusCode::FAILURE;
60 std::vector<std::string>
names;
69 return StatusCode::SUCCESS;
77 return StatusCode::SUCCESS;
83 const EventContext& ctx = Gaudi::Hive::currentContext();
86 CHECK( eventInfo.
isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE);
92 return StatusCode::FAILURE;
96 unsigned int nClusters =
clusters->size();
97 if (nClusters==0)
return StatusCode::SUCCESS;
100 std::vector<bool>
mask;
101 mask.assign(nClusters,
false);
110 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used the same collection as the input collection??");
111 return StatusCode::FAILURE;
118 unsigned int n_pass=0;
119 for (
unsigned int i=0;
i<nClusters; ++
i) {
120 if (
mask[
i]) ++n_pass;
128 std::vector<int>
keys;
131 if( !
mask[++
i] )
continue;
134 int clus_layer = acc_layer(*clusIt);
136 int clus_eta_module = acc_eta_module(*clusIt);
138 int clus_phi_module = acc_phi_module(*clusIt);
140 int key = clus_layer * 10000 + clus_eta_module * 100 + clus_phi_module;
141 unsigned int index = 9999;
142 for(
unsigned int j = 0; j <
keys.size() ; j++ )
160 assert(int_decor_handles.size() ==
kNIntDecor);
161 for(
unsigned int decorate_i=0; decorate_i<int_decor_handles.size(); ++decorate_i) {
162 int_decor_handles[decorate_i](*eventInfo) = std::move(
vec[decorate_i]);
165 return StatusCode::SUCCESS;
StatusCode finalizeParser()
void createDecoratorKeys(T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< SG::WriteDecorHandleKey< T_Cont > > &decor_out)
Helper class to provide type-safe access to aux data.
std::conditional< NUM_PARSER==1, std::unique_ptr< ExpressionParsing::ExpressionParser >, std::array< std::unique_ptr< ExpressionParsing::ExpressionParser >, NUM_PARSER > >::type m_parser
std::atomic< unsigned int > m_ntot
std::vector< size_t > vec
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::ReadHandleKey< xAOD::TrackMeasurementValidationContainer > m_pixelKey
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Class describing a TrackMeasurementValidation.
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::atomic< unsigned int > m_npass
StatusCode initializeParser(const ExpressionParsing::SelectionArg< 1 > &selection_string)
virtual StatusCode addBranches() const
Pass the thinning service
Gaudi::Property< std::string > m_selectionString
Class describing the basic event information.
EventInfoPixelDecorator(const std::string &type, const std::string &name, const IInterface *parent)
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
std::vector< SG::WriteDecorHandle< T_Cont, T > > createDecorators(const std::vector< SG::WriteDecorHandleKey< T_Cont > > &keys, const EventContext &ctx)
std::vector< SG::WriteDecorHandleKey< xAOD::EventInfo > > m_intDecorKeys
Gaudi::Property< std::string > m_decorationPrefix