ATLAS Offline Software
Trigger
TrigT1
L1Topo
L1TopoAlgorithms
Root
jXESort.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
// jXESort.cxx
5
6
#include "
L1TopoAlgorithms/jXESort.h
"
7
#include "
L1TopoCommon/Exception.h
"
8
#include "
L1TopoEvent/jXETOBArray.h
"
9
#include "
L1TopoEvent/GenericTOB.h
"
10
#include <algorithm>
11
#include <cmath>
12
13
// Bitwise implementation utils
14
#include "
L1TopoSimulationUtils/Trigo.h
"
15
16
REGISTER_ALG_TCS
(jXESort)
17
18
19
// constructor
20
TCS
::
jXESort
::
jXESort
(
const
std::
string
&
name
) :
SortingAlg
(
name
) {
21
22
defineParameter(
"InputWidth"
, 2 );
// for FW
23
defineParameter(
"OutputWidth"
, 2 );
// for FW
24
25
}
26
27
// destructor
28
TCS::jXESort::~jXESort
() {}
29
30
31
TCS::StatusCode
32
TCS::jXESort::initialize
() {
33
return
TCS::StatusCode::SUCCESS
;
34
}
35
36
TCS::StatusCode
37
TCS::jXESort::sortBitCorrect
(
const
InputTOBArray
&
input
,
TOBArray
&
output
) {
38
39
if
(
input
.size()!=1) {
40
TCS_EXCEPTION
(
"jXE sort alg expects exactly single jXE TOB, got "
<<
input
.size());
41
}
42
43
const
jXETOBArray
& jxes =
dynamic_cast<
const
jXETOBArray
&
>
(
input
);
44
45
for
(
jXETOBArray::const_iterator
jxe = jxes.
begin
(); jxe!= jxes.
end
(); ++jxe ) {
46
output
.push_back(
GenericTOB
(**jxe) );
47
}
48
49
return
TCS::StatusCode::SUCCESS
;
50
}
51
52
TCS::StatusCode
53
TCS::jXESort::sort
(
const
InputTOBArray
&
input
,
TOBArray
&
output
) {
54
55
if
(
input
.size()!=1) {
56
TCS_EXCEPTION
(
"jXE sort alg expects exactly single jXE TOB, got "
<<
input
.size());
57
}
58
59
const
jXETOBArray
& jxes =
dynamic_cast<
const
jXETOBArray
&
>
(
input
);
60
61
for
(
jXETOBArray::const_iterator
jxe = jxes.
begin
(); jxe!= jxes.
end
(); ++jxe ) {
62
output
.push_back(
GenericTOB
(**jxe) );
63
}
64
65
return
TCS::StatusCode::SUCCESS
;
66
}
67
jXESort.h
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
jXETOBArray.h
TCS::DataArrayImpl< jXETOB >::const_iterator
data_t::const_iterator const_iterator
Definition:
DataArrayImpl.h:18
TCS::jXESort
Definition:
jXESort.h:18
const
bool const RAWDATA *ch2 const
Definition:
LArRodBlockPhysicsV0.cxx:560
TCS::DataArrayImpl::end
iterator end()
Definition:
DataArrayImpl.h:43
TCS::InputTOBArray
Definition:
InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition:
PlotPulseshapeFromCool.py:106
TCS::jXETOBArray
Definition:
L1Topo/L1TopoEvent/L1TopoEvent/jXETOBArray.h:14
TCS::jXESort::~jXESort
virtual ~jXESort()
Definition:
jXESort.cxx:28
TCS_EXCEPTION
#define TCS_EXCEPTION(MSG)
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Exception.h:14
TCS::TOBArray
Definition:
TOBArray.h:24
Trigo.h
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::jXESort::initialize
virtual StatusCode initialize()
Definition:
jXESort.cxx:32
TCS::SortingAlg
Definition:
SortingAlg.h:18
GenericTOB.h
TCS::DataArrayImpl::begin
iterator begin()
Definition:
DataArrayImpl.h:40
TCS::jXESort::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition:
jXESort.cxx:53
TCS
Definition:
Global/GlobalSimulation/src/IO/Decision.h:18
Exception.h
TCS::jXESort::sortBitCorrect
virtual TCS::StatusCode sortBitCorrect(const InputTOBArray &input, TOBArray &output)
Definition:
jXESort.cxx:37
TCS::StatusCode
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
Generated on Sun Dec 22 2024 21:12:50 for ATLAS Offline Software by
1.8.18