Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
14
int
tower
;
//tower number in SM
15
int
bunchCrossing
;
16
unsigned
input
;
//11 bit value input (10 energy, 1 fg)
17
18
TCCinput
(
int
tt
=0,
int
bx
=0,
unsigned
val=0x0) :
19
tower
(
tt
),
bunchCrossing
(
bx
),
input
(val) {
20
if
(
input
>0x7ff) {
21
std::cout
<<
"[TCCinput] saturated value 0x"
22
<< std::hex <<
input
<< std::dec
23
<< std::endl;
24
input
&= 0x7ff;
25
}
26
};
27
28
int
get_energy
()
const
{
29
return
input
& 0x3ff;
//get bits 9:0
30
}
31
32
int
get_fg
()
const
{
33
return
input
& 0x400;
//get bit number 10
34
}
35
36
bool
is_current
(
int
n
)
const
{
37
return
(n==
bunchCrossing
);
38
}
39
40
bool
operator<
(
const
TCCinput
&)
const
;
41
42
std::ostream&
operator<<
(std::ostream&);
43
44
};
45
46
inline
47
std::ostream&
TCCinput::operator<<
(std::ostream& os) {
48
os <<
" tcc input "
49
<<
" bx:"
<<
bunchCrossing
50
<<
" tt:"
<<
tower
51
<<
" raw:0x"
<< std::hex <<
input
<< std::dec
52
<<
" fg:"
<< this->
get_fg
()
53
<<
" energy:"
<< this->
get_energy
()
54
<< std::endl;
55
return
os;
56
}
57
58
inline
59
bool
TCCinput::operator<
(
const
TCCinput
&
k
)
const
{
60
return
(
bunchCrossing
< k.
bunchCrossing
);
61
}
62
63
#endif
TCCinput::operator<<
std::ostream & operator<<(std::ostream &)
Definition:
TCCinput.h:47
TCCinput::bunchCrossing
int bunchCrossing
Definition:
TCCinput.h:15
groupFilesInBlocks.tt
int tt
Definition:
groupFilesInBlocks.py:142
TCCinput::get_fg
int get_fg() const
Definition:
TCCinput.h:32
TCCinput::operator<
bool operator<(const TCCinput &) const
Definition:
TCCinput.h:59
TCCinput
Definition:
TCCinput.h:12
TCCinput::get_energy
int get_energy() const
Definition:
TCCinput.h:28
TCCinput::TCCinput
TCCinput(int tt=0, int bx=0, unsigned val=0x0)
Definition:
TCCinput.h:18
gen::k
int k[5][pyjets_maxn]
Definition:
Cascade2Hadronizer.cc:79
TCCinput::tower
int tower
Definition:
TCCinput.h:14
TCCinput::input
unsigned input
Definition:
TCCinput.h:16
n
int n
Definition:
DTDataIntegrityTask.cc:30
TCCinput::is_current
bool is_current(int n) const
Definition:
TCCinput.h:36
rpc-layouts.bx
string bx
Definition:
rpc-layouts.py:13
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
Generated for CMSSW Reference Manual by
1.8.5