 |
ATLAS Offline Software
|
Go to the documentation of this file.
24 const std::string&
name,
25 const IInterface*
parent) :
35 ATH_MSG_FATAL(
"No inner detector track selection string provided!");
36 return StatusCode::FAILURE;
40 ATH_MSG_WARNING(
"No decoration prefix name provided for the output of EventInfoPixelDecorator!");
44 ATH_MSG_ERROR(
"No collection provided for EventInfoPixelDecorator!");
45 return StatusCode::FAILURE;
59 std::vector<std::string>
names;
68 return StatusCode::SUCCESS;
76 return StatusCode::SUCCESS;
82 const EventContext& ctx = Gaudi::Hive::currentContext();
85 CHECK( eventInfo.
isValid() ? StatusCode::SUCCESS : StatusCode::FAILURE);
91 return StatusCode::FAILURE;
95 unsigned int nClusters =
clusters->size();
96 if (nClusters==0)
return StatusCode::SUCCESS;
99 std::vector<bool>
mask;
100 mask.assign(nClusters,
false);
105 std::vector<int>
entries = m_parser->evaluateAsVector();
109 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used the same collection as the input collection??");
110 return StatusCode::FAILURE;
117 unsigned int n_pass=0;
118 for (
unsigned int i=0;
i<nClusters; ++
i) {
119 if (
mask[
i]) ++n_pass;
127 std::vector<int>
keys;
130 if( !
mask[++
i] )
continue;
133 int clus_layer = acc_layer(*clusIt);
135 int clus_eta_module = acc_eta_module(*clusIt);
137 int clus_phi_module = acc_phi_module(*clusIt);
139 int key = clus_layer * 10000 + clus_eta_module * 100 + clus_phi_module;
140 unsigned int index = 9999;
141 for(
unsigned int j = 0; j <
keys.size() ; j++ )
159 assert(int_decor_handles.size() ==
kNIntDecor);
160 for(
unsigned int decorate_i=0; decorate_i<int_decor_handles.size(); ++decorate_i) {
161 int_decor_handles[decorate_i](*eventInfo) = std::move(
vec[decorate_i]);
164 return StatusCode::SUCCESS;
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::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
virtual StatusCode addBranches() const
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