AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEMCALTriggerPatchFinder.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2013, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
23 
24 #include <vector>
25 
27 templateClassImp(AliEMCALTriggerPatchFinder)
29 
30 template<typename T>
32  TObject(),
33  fTriggerAlgorithms()
34 {
35 }
36 
37 template<typename T>
39  for(typename std::vector<AliEMCALTriggerAlgorithm<T> *>::iterator algiter = fTriggerAlgorithms.begin();
40  algiter != fTriggerAlgorithms.end();
41  ++algiter)
42  delete *algiter;
43 }
44 
45 template<typename T>
46 std::vector<AliEMCALTriggerRawPatch> AliEMCALTriggerPatchFinder<T>::FindPatches(const AliEMCALTriggerDataGrid<T> &adc, const AliEMCALTriggerDataGrid<T> &offlineAdc) const{
47  std::vector<AliEMCALTriggerRawPatch> result;
48  for(typename std::vector<AliEMCALTriggerAlgorithm<T> *>::const_iterator algiter = fTriggerAlgorithms.begin();
49  algiter != fTriggerAlgorithms.end();
50  ++algiter)
51  {
52  std::vector<AliEMCALTriggerRawPatch> tmp = (*algiter)->FindPatches(adc, offlineAdc);
53  for(std::vector<AliEMCALTriggerRawPatch>::iterator patchiter = tmp.begin(); patchiter != tmp.end(); ++patchiter){
54  result.push_back(*patchiter);
55  }
56  }
57  return result;
58 }
59 
60 template class AliEMCALTriggerPatchFinder<int>;
Base class for EMCAL Level1 trigger algorithms.
std::vector< AliEMCALTriggerRawPatch > FindPatches(const AliEMCALTriggerDataGrid< T > &adc, const AliEMCALTriggerDataGrid< T > &offlineAdc) const