ATLAS Offline Software
Loading...
Searching...
No Matches
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
14#include <algorithm>
15#include <typeinfo>
16
17REGISTER_ALG_TCS(GenericListGenerator)
18
19// constructor
26
27
28// destructor
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
#define REGISTER_ALG_TCS(CLASS)
Definition AlgFactory.h:62
const Parameter & parameter(const std::string &parameterName) const
const std::string & name() const
void defineParameter(const std::string &name, TCS::parType_t value)
data_t::const_iterator const_iterator
virtual TCS::StatusCode sort(const InputTOBArray &input, TOBArray &output)
GenericListGenerator(const std::string &name)
SortingAlg(const std::string &name)
Definition SortingAlg.h:21
STL namespace.