SimCalorimetry
EcalElectronicsEmulation
interface
TCCinput.h
Go to the documentation of this file.
1
#ifndef TCCINPUT_H
2
#define TCCINPUT_H
3
4
/*\struct TCCinput
5
*\description structure holding TCC input
6
*\author Nuno Leonardo (CERN)
7
*\date February 2007
8
*/
9
10
#include <iostream>
11
12
struct
TCCinput
{
13
int
tower
;
// tower number in SM
14
int
bunchCrossing
;
15
unsigned
input
;
// 11 bit value input (10 energy, 1 fg)
16
17
TCCinput
(
int
tt
= 0,
int
bx
= 0,
unsigned
val
= 0x0) :
tower
(
tt
),
bunchCrossing
(
bx
),
input
(
val
) {
18
if
(
input
> 0x7ff) {
19
std::cout
<<
"[TCCinput] saturated value 0x"
<< std::hex <<
input
<<
std::dec
<< std::endl;
20
input
&= 0x7ff;
21
}
22
};
23
24
int
get_energy
()
const
{
25
return
input
& 0x3ff;
// get bits 9:0
26
}
27
28
int
get_fg
()
const
{
29
return
input
& 0x400;
// get bit number 10
30
}
31
32
bool
is_current
(
int
n
)
const
{
return
(
n
==
bunchCrossing
); }
33
34
bool
operator<
(
const
TCCinput
&)
const
;
35
36
std::ostream &
operator<<
(std::ostream &);
37
};
38
39
inline
std::ostream &
TCCinput::operator<<
(std::ostream &os) {
40
os <<
" tcc input "
41
<<
" bx:"
<<
bunchCrossing
<<
" tt:"
<<
tower
<<
" raw:0x"
<< std::hex <<
input
<<
std::dec
42
<<
" fg:"
<< this->
get_fg
() <<
" energy:"
<< this->
get_energy
() << std::endl;
43
return
os;
44
}
45
46
inline
bool
TCCinput::operator<
(
const
TCCinput
&
k
)
const
{
return
(
bunchCrossing
<
k
.bunchCrossing); }
47
48
#endif
TCCinput::operator<<
std::ostream & operator<<(std::ostream &)
Definition:
TCCinput.h:39
TCCinput::get_energy
int get_energy() const
Definition:
TCCinput.h:24
TCCinput::bunchCrossing
int bunchCrossing
Definition:
TCCinput.h:14
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
simKBmtfDigis_cfi.bx
bx
Definition:
simKBmtfDigis_cfi.py:55
TCCinput
Definition:
TCCinput.h:12
TCCinput::operator<
bool operator<(const TCCinput &) const
Definition:
TCCinput.h:46
tt
Definition:
TTTypes.h:54
TCCinput::TCCinput
TCCinput(int tt=0, int bx=0, unsigned val=0x0)
Definition:
TCCinput.h:17
TCCinput::is_current
bool is_current(int n) const
Definition:
TCCinput.h:32
TCCinput::tower
int tower
Definition:
TCCinput.h:13
TCCinput::input
unsigned input
Definition:
TCCinput.h:15
TCCinput::get_fg
int get_fg() const
Definition:
TCCinput.h:28
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:142
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
heppy_batch.val
val
Definition:
heppy_batch.py:351
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
Generated for CMSSW Reference Manual by
1.8.14