Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimCalorimetry
EcalTrigPrimAlgos
src
EcalFenixPeakFinder.cc
Go to the documentation of this file.
1
#include <
SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixPeakFinder.h
>
2
3
EcalFenixPeakFinder::EcalFenixPeakFinder
()
4
:inputsAlreadyIn_(0){
5
}
6
7
8
EcalFenixPeakFinder::~EcalFenixPeakFinder
(){
9
}
10
11
int
EcalFenixPeakFinder::setInput
(
int
input
)
12
{
13
if
(
inputsAlreadyIn_
<3)
14
{
15
buffer_
[
inputsAlreadyIn_
]=
input
;
16
inputsAlreadyIn_
++;
17
}
18
else
19
{
20
for
(
int
i
=0;
i
<2;
i
++)
buffer_
[
i
]=
buffer_
[
i
+1];
21
buffer_
[2]=
input
;
22
}
23
return
1;
24
}
25
26
int
EcalFenixPeakFinder::process
()
27
{
28
29
if
(
inputsAlreadyIn_
<3)
return
0;
30
if
(
buffer_
[1]>
buffer_
[0] &&
buffer_
[1]>
buffer_
[2])
return
1;
31
else
return
0;
32
33
}
34
35
std::vector<int>
EcalFenixPeakFinder::process
(std::vector<int> &filtout, std::vector<int> &
output
)
36
{
37
38
// FIXME: 3
39
inputsAlreadyIn_
=0;
40
for
(
unsigned
int
i
=0;
i
<3;
i
++)
buffer_
[
i
]=0;
41
42
// std::vector<int> output;
43
44
// attention, we have to shift by one, because the peak is found one too late
45
for
(
unsigned
int
i
=0;
i
<filtout.size();
i
++){
46
47
setInput
(filtout[
i
]);
48
if
(i>0) {
49
// int outone = process();
50
// output.push_back(outone);
51
output[i-1]=
process
();
52
}
53
}
54
// output.resize(filtout.size());
55
56
return
output
;
57
}
58
59
i
int i
Definition:
DBlmapReader.cc:9
EcalFenixPeakFinder::~EcalFenixPeakFinder
virtual ~EcalFenixPeakFinder()
Definition:
EcalFenixPeakFinder.cc:8
EcalFenixPeakFinder::buffer_
int buffer_[3]
Definition:
EcalFenixPeakFinder.h:24
EcalFenixPeakFinder::inputsAlreadyIn_
int inputsAlreadyIn_
Definition:
EcalFenixPeakFinder.h:23
input
static std::string const input
Definition:
EdmProvDump.cc:44
EcalFenixPeakFinder::EcalFenixPeakFinder
EcalFenixPeakFinder()
Definition:
EcalFenixPeakFinder.cc:3
EcalFenixPeakFinder.h
convertSQLitetoXML_cfg.output
tuple output
Definition:
convertSQLitetoXML_cfg.py:32
EcalFenixPeakFinder::setInput
int setInput(int input)
Definition:
EcalFenixPeakFinder.cc:11
EcalFenixPeakFinder::process
int process()
Definition:
EcalFenixPeakFinder.cc:26
Generated for CMSSW Reference Manual by
1.8.5