Line data Source code
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 : **************************************************************************/
15 : /**
16 : * @file AliEmcalTriggerPatchFinder.cxx
17 : * @date Oct. 23, 2015
18 : * @author Markus Fasel <markus.fasel@cern.ch>, Lawrence Berkeley National Laboratory
19 : */
20 : #include "AliEMCALTriggerPatchFinder.h"
21 : #include "AliEMCALTriggerAlgorithm.h"
22 : #include "AliEMCALTriggerDataGrid.h"
23 :
24 : #include <vector>
25 :
26 : /// \cond CLASSIMP
27 22 : templateClassImp(AliEMCALTriggerPatchFinder)
28 : /// \endcond
29 :
30 : template<typename T>
31 : AliEMCALTriggerPatchFinder<T>::AliEMCALTriggerPatchFinder():
32 0 : TObject(),
33 0 : fTriggerAlgorithms()
34 0 : {
35 0 : }
36 :
37 : template<typename T>
38 0 : AliEMCALTriggerPatchFinder<T>::~AliEMCALTriggerPatchFinder() {
39 0 : for(typename std::vector<AliEMCALTriggerAlgorithm<T> *>::iterator algiter = fTriggerAlgorithms.begin();
40 0 : algiter != fTriggerAlgorithms.end();
41 0 : ++algiter)
42 0 : delete *algiter;
43 0 : }
44 :
45 : template<typename T>
46 : std::vector<AliEMCALTriggerRawPatch> AliEMCALTriggerPatchFinder<T>::FindPatches(const AliEMCALTriggerDataGrid<T> &adc, const AliEMCALTriggerDataGrid<T> &offlineAdc) const{
47 0 : std::vector<AliEMCALTriggerRawPatch> result;
48 0 : for(typename std::vector<AliEMCALTriggerAlgorithm<T> *>::const_iterator algiter = fTriggerAlgorithms.begin();
49 0 : algiter != fTriggerAlgorithms.end();
50 0 : ++algiter)
51 : {
52 0 : std::vector<AliEMCALTriggerRawPatch> tmp = (*algiter)->FindPatches(adc, offlineAdc);
53 0 : for(std::vector<AliEMCALTriggerRawPatch>::iterator patchiter = tmp.begin(); patchiter != tmp.end(); ++patchiter){
54 0 : result.push_back(*patchiter);
55 : }
56 0 : }
57 : return result;
58 0 : }
59 :
60 : template class AliEMCALTriggerPatchFinder<int>;
61 : template class AliEMCALTriggerPatchFinder<double>;
62 : template class AliEMCALTriggerPatchFinder<float>;
|