DataFormats
L1GlobalMuonTrigger
interface
L1MuGMTReadoutCollection.h
Go to the documentation of this file.
1
//---------------------------------------------
2
//
3
// \class L1MuGMTReadoutCollection
4
//
5
// Description:
6
//
7
//
8
//
9
// Author :
10
// Hannes Sakulin HEPHY Vienna
11
// Ivan Mikulec HEPHY Vienna
12
//
13
//--------------------------------------------------
14
#ifndef DataFormatsL1GlobalMuonTrigger_L1MuGMTReadoutCollection_h
15
#define DataFormatsL1GlobalMuonTrigger_L1MuGMTReadoutCollection_h
16
17
//---------------
18
// C++ Headers --
19
//---------------
20
21
#include <vector>
22
#include <map>
23
#include <iostream>
24
25
//----------------------
26
// Base Class Headers --
27
//----------------------
28
29
//------------------------------------
30
// Collaborating Class Declarations --
31
//------------------------------------
32
33
#include "
DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutRecord.h
"
34
35
//---------------------
36
//-- Class Interface --
37
//---------------------
38
39
class
L1MuGMTReadoutCollection
{
40
public
:
41
L1MuGMTReadoutCollection
(){};
42
L1MuGMTReadoutCollection
(
int
nbx) {
m_Records
.reserve(nbx); };
43
44
virtual
~L1MuGMTReadoutCollection
(){};
45
46
void
reset
() {
47
for
(
unsigned
int
i
= 0;
i
<
m_Records
.size();
i
++)
48
m_Records
[
i
].
reset
();
49
};
50
51
// get record vector
52
std::vector<L1MuGMTReadoutRecord>
const
&
getRecords
()
const
{
return
m_Records
; };
53
54
// get record for a given bx
55
L1MuGMTReadoutRecord
const
&
getRecord
(
int
bx
= 0)
const
{
56
std::vector<L1MuGMTReadoutRecord>::const_iterator iter;
57
for
(iter =
m_Records
.begin(); iter !=
m_Records
.end(); iter++) {
58
if
((*iter).getBxCounter() ==
bx
)
59
return
(*iter);
60
}
61
return
getDefaultFor
(
bx
);
62
};
63
64
// add record
65
void
addRecord
(
L1MuGMTReadoutRecord
const
& rec) {
m_Records
.push_back(rec); };
66
67
private
:
68
static
L1MuGMTReadoutRecord
const
&
getDefaultFor
(
int
bx
);
69
70
std::vector<L1MuGMTReadoutRecord>
m_Records
;
71
};
72
73
#endif // DataFormatsL1GlobalMuonTrigger_L1MuGMTReadoutCollection_h
mps_fire.i
i
Definition:
mps_fire.py:355
L1MuGMTReadoutCollection::reset
void reset()
Definition:
L1MuGMTReadoutCollection.h:46
l1GtPatternGenerator_cfi.bx
bx
Definition:
l1GtPatternGenerator_cfi.py:18
L1MuGMTReadoutRecord
Definition:
L1MuGMTReadoutRecord.h:44
L1MuGMTReadoutRecord.h
L1MuGMTReadoutCollection::L1MuGMTReadoutCollection
L1MuGMTReadoutCollection()
Definition:
L1MuGMTReadoutCollection.h:41
L1MuGMTReadoutCollection::getRecords
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
Definition:
L1MuGMTReadoutCollection.h:52
L1MuGMTReadoutCollection::getRecord
L1MuGMTReadoutRecord const & getRecord(int bx=0) const
Definition:
L1MuGMTReadoutCollection.h:55
L1MuGMTReadoutCollection::~L1MuGMTReadoutCollection
virtual ~L1MuGMTReadoutCollection()
Definition:
L1MuGMTReadoutCollection.h:44
L1MuGMTReadoutCollection::getDefaultFor
static L1MuGMTReadoutRecord const & getDefaultFor(int bx)
Definition:
L1MuGMTReadoutCollection.cc:21
L1MuGMTReadoutCollection
Definition:
L1MuGMTReadoutCollection.h:39
L1MuGMTReadoutCollection::m_Records
std::vector< L1MuGMTReadoutRecord > m_Records
Definition:
L1MuGMTReadoutCollection.h:70
L1MuGMTReadoutCollection::addRecord
void addRecord(L1MuGMTReadoutRecord const &rec)
Definition:
L1MuGMTReadoutCollection.h:65
L1MuGMTReadoutCollection::L1MuGMTReadoutCollection
L1MuGMTReadoutCollection(int nbx)
Definition:
L1MuGMTReadoutCollection.h:42
Generated for CMSSW Reference Manual by
1.8.16