ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
GenericListGenerator.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
// GenericListGenerator.cxx
5
// TopoCore
6
// Created by Joerg Stelzer on 11/10/12.
7
// Modified by V Sorin 2014
8
// algorithm to generate the all lists from TOBs
9
10
#include "
L1TopoAlgorithms/GenericListGenerator.h
"
11
#include "
L1TopoEvent/ClusterTOBArray.h
"
12
#include "
L1TopoEvent/JetTOBArray.h
"
13
#include "
L1TopoEvent/GenericTOB.h
"
14
#include <algorithm>
15
#include <typeinfo>
16
17
REGISTER_ALG_TCS
(GenericListGenerator)
18
19
// constructor
20
TCS
::
GenericListGenerator
::
GenericListGenerator
(
const
std
::
string
&
name
)
21
:
SortingAlg
(
name
),
22
m_jetsize
(
JetTOB
::JS1)
23
{
24
defineParameter
(
"JetSize"
, 0 );
25
}
26
27
28
// destructor
29
TCS::GenericListGenerator::~GenericListGenerator
()
30
{}
31
32
TCS::StatusCode
33
TCS::GenericListGenerator::sort
(
const
InputTOBArray
& input,
TOBArray
& output) {
34
// because fw seems to have differnt notation, 2 means for now JS1 8x8
35
m_jetsize
=
parameter
(
"JetSize"
).value()==2?
JetTOB::JS1
:
JetTOB::JS2
;
36
37
38
try
{
39
const
ClusterTOBArray
& clusters =
dynamic_cast<
const
ClusterTOBArray
&
>
(input);
40
for
(
ClusterTOBArray::const_iterator
cl = clusters.begin(); cl!= clusters.end(); ++cl ) {
41
output.push_back(
GenericTOB
(**cl) );
42
}
43
return
TCS::StatusCode::SUCCESS
;
44
}
45
catch
(
const
std::bad_cast &) {}
46
47
try
{
48
const
JetTOBArray
& jets =
dynamic_cast<
const
JetTOBArray
&
>
(input);
49
for
(
JetTOBArray::const_iterator
jet
= jets.begin();
jet
!= jets.end(); ++
jet
) {
50
output.push_back(
GenericTOB
(**
jet
,
m_jetsize
) );
51
}
52
return
TCS::StatusCode::SUCCESS
;
53
}
54
catch
(
const
std::bad_cast &) {}
55
56
return
TCS::StatusCode::SUCCESS
;
57
}
58
REGISTER_ALG_TCS
#define REGISTER_ALG_TCS(CLASS)
Definition
AlgFactory.h:62
ClusterTOBArray.h
GenericListGenerator.h
GenericTOB.h
JetTOBArray.h
TCS::ClusterTOBArray
Definition
ClusterTOBArray.h:19
TCS::ConfigurableAlg::name
const std::string & name() const
Definition
ConfigurableAlg.h:49
TCS::ConfigurableAlg::parameter
const Parameter & parameter(std::string_view parameterName) const
Definition
ConfigurableAlg.cxx:245
TCS::ConfigurableAlg::defineParameter
void defineParameter(std::string_view name, TCS::parType_t value)
Definition
ConfigurableAlg.cxx:203
TCS::DataArrayImpl< ClusterTOB >::const_iterator
data_t::const_iterator const_iterator
Definition
DataArrayImpl.h:18
TCS::GenericListGenerator::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition
GenericListGenerator.cxx:33
TCS::GenericListGenerator::GenericListGenerator
GenericListGenerator(const std::string &name)
Definition
GenericListGenerator.cxx:20
TCS::GenericListGenerator::m_jetsize
JetTOB::JetSize m_jetsize
Definition
GenericListGenerator.h:32
TCS::GenericListGenerator::~GenericListGenerator
virtual ~GenericListGenerator()
Definition
GenericListGenerator.cxx:29
TCS::GenericTOB
Definition
GenericTOB.h:35
TCS::InputTOBArray
Definition
InputTOBArray.h:15
TCS::JetTOBArray
Definition
JetTOBArray.h:21
TCS::JetTOB
Definition
JetTOB.h:18
TCS::JetTOB::JS1
@ JS1
Definition
JetTOB.h:21
TCS::JetTOB::JS2
@ JS2
Definition
JetTOB.h:21
TCS::SortingAlg::SortingAlg
SortingAlg(const std::string &name)
Definition
SortingAlg.h:21
TCS::StatusCode
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::TOBArray
Definition
TOBArray.h:24
const
TCS
Definition
AnomalyDetectionBDT.h:18
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0