ATLAS Offline Software
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 
13 #include "L1TopoEvent/GenericTOB.h"
14 #include <algorithm>
15 #include <typeinfo>
16 
17 REGISTER_ALG_TCS(GenericListGenerator)
18 
19 // constructor
21 : SortingAlg(name),
22  m_jetsize(JetTOB::JS1)
23 {
24  defineParameter( "JetSize", 0 );
25 }
26 
27 
28 // destructor
30 {}
31 
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  }
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  }
53  }
54  catch(const std::bad_cast &) {}
55 
57 }
58 
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::DataArrayImpl< ClusterTOB >::const_iterator
data_t::const_iterator const_iterator
Definition: DataArrayImpl.h:18
TCS::ClusterTOBArray
Definition: ClusterTOBArray.h:19
TCS::GenericListGenerator
Definition: GenericListGenerator.h:19
TCS::JetTOB::JS2
@ JS2
Definition: JetTOB.h:21
ClusterTOBArray.h
TCS::JetTOB::JS1
@ JS1
Definition: JetTOB.h:21
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
JetTOBArray.h
TCS::InputTOBArray
Definition: InputTOBArray.h:15
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
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:192
GenericListGenerator.h
TCS::SortingAlg
Definition: SortingAlg.h:18
GenericTOB.h
TCS::JetTOB
Definition: JetTOB.h:18
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
TCS
Definition: Global/GlobalSimulation/src/IO/Decision.h:18
TCS::JetTOBArray
Definition: JetTOBArray.h:21
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
TCS::GenericListGenerator::sort
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
Definition: GenericListGenerator.cxx:33
TCS::GenericListGenerator::~GenericListGenerator
virtual ~GenericListGenerator()
Definition: GenericListGenerator.cxx:29
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
TCS::StatusCode
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15