ATLAS Offline Software
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
GenericArrayCreator.cxx
Go to the documentation of this file.
1
// Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2
3
#include "
L1TopoAlgorithms/GenericArrayCreator.h
"
4
#include "
L1TopoEvent/ClusterTOBArray.h
"
5
#include "
L1TopoEvent/JetTOBArray.h
"
6
#include "
L1TopoEvent/ClusterTOB.h
"
7
#include "
L1TopoEvent/JetTOB.h
"
8
#include "
L1TopoEvent/GenericTOB.h
"
9
#include "
L1TopoCommon/Exception.h
"
10
11
#include <typeinfo>
12
13
REGISTER_ALG_TCS
(GenericArrayCreator)
14
15
16
// constructor
17
TCS
::
GenericArrayCreator
::
GenericArrayCreator
(
const
std::
string
&
name
) :
SortingAlg
(
name
)
18
, m_jetsize(
JetTOB
::JS1)
19
{}
20
21
22
TCS::StatusCode
23
TCS::GenericArrayCreator::sort
(
const
InputTOBArray
&
input
,
TOBArray
&
output
) {
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
}
38
return
StatusCode::SUCCESS
;
39
}
40
catch
(
const
std::bad_cast& bc) {
41
TCS_EXCEPTION
(
"GenericArrayCreator: neither ClusterArray nor JetArray"
)
42
}
43
}
44
return
StatusCode::SUCCESS
;
45
}
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::ClusterTOBArray
Definition:
ClusterTOBArray.h:19
TCS::GenericArrayCreator
Definition:
GenericArrayCreator.h:13
GenericArrayCreator.h
ClusterTOBArray.h
const
bool const RAWDATA *ch2 const
Definition:
LArRodBlockPhysicsV0.cxx:560
jet
Definition:
JetCalibTools_PlotJESFactors.cxx:23
JetTOBArray.h
TCS::InputTOBArray
Definition:
InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition:
PlotPulseshapeFromCool.py:106
TCS::GenericArrayCreator::sort
virtual StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition:
GenericArrayCreator.cxx:23
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
TCS::TOBArray
Definition:
TOBArray.h:24
merge.output
output
Definition:
merge.py:17
TCS::GenericTOB
Definition:
GenericTOB.h:35
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition:
AlgFactory.h:62
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
TCS::SortingAlg
Definition:
SortingAlg.h:18
ClusterTOB.h
GenericTOB.h
TCS::JetTOB
Definition:
JetTOB.h:18
TCS
Definition:
Global/GlobalSimulation/src/IO/Decision.h:18
TCS::JetTOBArray
Definition:
JetTOBArray.h:21
TCS::GenericArrayCreator::m_jetsize
JetTOB::JetSize m_jetsize
Definition:
GenericArrayCreator.h:23
TCS::ClusterTOB
Definition:
ClusterTOB.h:13
Exception.h
JetTOB.h
TCS::StatusCode
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
Generated on Sun Dec 22 2024 21:10:45 for ATLAS Offline Software by
1.8.18