ATLAS Offline Software
Loading...
Searching...
No Matches
GenericArrayCreator.cxx
Go to the documentation of this file.
1// Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
10
11#include <typeinfo>
12
13REGISTER_ALG_TCS(GenericArrayCreator)
14
15
16// constructor
20
21
24
25 // plain copy
26 try {
27 const ClusterTOBArray & in = dynamic_cast<const ClusterTOBArray &>(input);
28 for(const ClusterTOB * cluster : in) {
29 output.push_back( GenericTOB(*cluster) );
30 }
31 }
32 catch(const std::bad_cast& bc) {
33 try {
34 const JetTOBArray & in = dynamic_cast<const JetTOBArray &>(input);
35 for(const JetTOB * jet : in) {
36 output.push_back( GenericTOB(*jet, m_jetsize) );
37 }
39 }
40 catch(const std::bad_cast& bc) {
41 TCS_EXCEPTION("GenericArrayCreator: neither ClusterArray nor JetArray")
42 }
43 }
45}
#define REGISTER_ALG_TCS(CLASS)
Definition AlgFactory.h:62
const std::string & name() const
GenericArrayCreator(const std::string &name)
virtual StatusCode sort(const InputTOBArray &input, TOBArray &output)
SortingAlg(const std::string &name)
Definition SortingAlg.h:21
STL namespace.