Main Page
Namespaces
Classes
Package Documentation
L1Trigger
L1TMuonEndCap
interface
EndCapParamsHelper.h
Go to the documentation of this file.
1
#ifndef l1t_EndCapParamsHelper_h_
2
#define l1t_EndCapParamsHelper_h_
3
4
#include <cassert>
5
#include <vector>
6
#include <map>
7
8
#include "
CondFormats/L1TObjects/interface/L1TMuonEndCapParams.h
"
9
#include "
CondFormats/DataRecord/interface/L1TMuonEndCapParamsRcd.h
"
10
11
// If you want to create a new object that you can read and write, use this constructor:
12
//
13
// l1t::EndCapParamsHelper x(new L1TPrescalesVetors());
14
//
15
// If you wish to read the table from the EventSetup, and will only read, use this:
16
//
17
// const EndCapParamsHelper * x = EndCapParamsHelper::readFromEventSetup(...)
18
// //...
19
// delete x;
20
//
21
// If you wish to read the table from the EventSetup, but then be able to edit the values locally, use this:
22
//
23
// EndCapParamsHelper * x = EndCapParamsHelper::readAndWriteFromEventSetup(...)
24
// //...
26
//
27
// but there's a performance penalty as a copy is made.
28
29
30
//
31
// This class does not take over responsibility for deleting the pointers it is
32
// initialized with. That is responsibility of the calling code.
33
//
34
35
#include "TXMLEngine.h"
36
37
namespace
l1t
{
38
39
class
EndCapParamsHelper
{
40
public
:
41
enum
{
VERSION
= 1};
42
43
~EndCapParamsHelper
();
44
45
//ctor if creating a new table (e.g. from XML or python file)
46
EndCapParamsHelper
(
L1TMuonEndCapParams
*
w
);
47
//create for reading only, from the EventSetup:
48
static
const
EndCapParamsHelper
*
readFromEventSetup
(
const
L1TMuonEndCapParams
* es);
49
// create for reading and writing, starting from the EventSetup:
50
static
EndCapParamsHelper
*
readAndWriteFromEventSetup
(
const
L1TMuonEndCapParams
* es);
51
52
void
SetPtAssignVersion
(
unsigned
version
){
write_
->
PtAssignVersion_
=
version
;};
53
void
SetFirmwareVersion
(
unsigned
version
){
write_
->
firmwareVersion_
=
version
;}
54
void
SetSt1PhiMatchWindow
(
int
window
){
write_
->
PhiMatchWindowSt1_
=
window
;};
55
void
SetSt2PhiMatchWindow
(
int
window
){
write_
->
PhiMatchWindowSt2_
=
window
;};
56
void
SetSt3PhiMatchWindow
(
int
window
){
write_
->
PhiMatchWindowSt3_
=
window
;};
57
void
SetSt4PhiMatchWindow
(
int
window
){
write_
->
PhiMatchWindowSt4_
=
window
;};
58
59
unsigned
GetPtAssignVersion
()
const
{
return
read_
->
PtAssignVersion_
;};
60
unsigned
GetFirmwareVersion
()
const
{
return
read_
->
firmwareVersion_
;}
61
int
GetSt1PhiMatchWindow
()
const
{
return
read_
->
PhiMatchWindowSt1_
;};
62
int
GetSt2PhiMatchWindow
()
const
{
return
read_
->
PhiMatchWindowSt2_
;};
63
int
GetSt3PhiMatchWindow
()
const
{
return
read_
->
PhiMatchWindowSt3_
;};
64
int
GetSt4PhiMatchWindow
()
const
{
return
read_
->
PhiMatchWindowSt4_
;};
65
66
// print all the parameters
67
void
print
(std::ostream&)
const
;
68
69
// access to underlying pointers, mainly for ESProducer:
70
const
L1TMuonEndCapParams
*
getReadInstance
()
const
{
return
read_
;}
71
L1TMuonEndCapParams
*
getWriteInstance
(){
return
write_
; }
72
73
private
:
74
EndCapParamsHelper
(
const
L1TMuonEndCapParams
* es);
75
void
useCopy
();
76
void
check_write
() { assert(
write_
); }
77
// separating read from write allows for a high-performance read-only mode (as no copy is made):
78
const
L1TMuonEndCapParams
*
read_
;
// when reading/getting, use this.
79
L1TMuonEndCapParams
*
write_
;
// when writing/setting, use this.
80
bool
we_own_write_
;
81
};
82
83
}
84
#endif
l1t::EndCapParamsHelper::write_
L1TMuonEndCapParams * write_
Definition:
EndCapParamsHelper.h:79
l1t::EndCapParamsHelper
Definition:
EndCapParamsHelper.h:39
L1TMuonEndCapParamsRcd.h
w
const double w
Definition:
UKUtility.cc:23
l1t::EndCapParamsHelper::GetSt4PhiMatchWindow
int GetSt4PhiMatchWindow() const
Definition:
EndCapParamsHelper.h:64
l1t::EndCapParamsHelper::useCopy
void useCopy()
Definition:
EndCapParamsHelper.cc:28
l1t::EndCapParamsHelper::~EndCapParamsHelper
~EndCapParamsHelper()
Definition:
EndCapParamsHelper.cc:34
l1t::EndCapParamsHelper::readAndWriteFromEventSetup
static EndCapParamsHelper * readAndWriteFromEventSetup(const L1TMuonEndCapParams *es)
Definition:
EndCapParamsHelper.cc:12
L1TMuonEndCapParams
Definition:
L1TMuonEndCapParams.h:15
l1t
delete x;
Definition:
CaloConfig.h:22
L1TMuonEndCapParams::firmwareVersion_
unsigned firmwareVersion_
Definition:
L1TMuonEndCapParams.h:24
jetIDSelector_cfi.version
version
Definition:
jetIDSelector_cfi.py:5
l1t::EndCapParamsHelper::read_
const L1TMuonEndCapParams * read_
Definition:
EndCapParamsHelper.h:78
l1t::EndCapParamsHelper::SetFirmwareVersion
void SetFirmwareVersion(unsigned version)
Definition:
EndCapParamsHelper.h:53
l1t::EndCapParamsHelper::getReadInstance
const L1TMuonEndCapParams * getReadInstance() const
Definition:
EndCapParamsHelper.h:70
l1t::EndCapParamsHelper::GetSt3PhiMatchWindow
int GetSt3PhiMatchWindow() const
Definition:
EndCapParamsHelper.h:63
l1t::EndCapParamsHelper::print
void print(std::ostream &) const
Definition:
EndCapParamsHelper.cc:40
l1t::EndCapParamsHelper::GetSt1PhiMatchWindow
int GetSt1PhiMatchWindow() const
Definition:
EndCapParamsHelper.h:61
l1t::EndCapParamsHelper::SetPtAssignVersion
void SetPtAssignVersion(unsigned version)
Definition:
EndCapParamsHelper.h:52
l1t::EndCapParamsHelper::SetSt1PhiMatchWindow
void SetSt1PhiMatchWindow(int window)
Definition:
EndCapParamsHelper.h:54
L1TMuonEndCapParams::PhiMatchWindowSt3_
int PhiMatchWindowSt3_
Definition:
L1TMuonEndCapParams.h:25
svgfig.window
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition:
svgfig.py:642
L1TMuonEndCapParams::PhiMatchWindowSt1_
int PhiMatchWindowSt1_
Definition:
L1TMuonEndCapParams.h:25
l1t::EndCapParamsHelper::VERSION
Definition:
EndCapParamsHelper.h:41
l1t::EndCapParamsHelper::check_write
void check_write()
Definition:
EndCapParamsHelper.h:76
L1TMuonEndCapParams::PhiMatchWindowSt4_
int PhiMatchWindowSt4_
Definition:
L1TMuonEndCapParams.h:25
l1t::EndCapParamsHelper::we_own_write_
bool we_own_write_
Definition:
EndCapParamsHelper.h:80
l1t::EndCapParamsHelper::SetSt4PhiMatchWindow
void SetSt4PhiMatchWindow(int window)
Definition:
EndCapParamsHelper.h:57
l1t::EndCapParamsHelper::SetSt2PhiMatchWindow
void SetSt2PhiMatchWindow(int window)
Definition:
EndCapParamsHelper.h:55
l1t::EndCapParamsHelper::getWriteInstance
L1TMuonEndCapParams * getWriteInstance()
Definition:
EndCapParamsHelper.h:71
l1t::EndCapParamsHelper::GetPtAssignVersion
unsigned GetPtAssignVersion() const
Definition:
EndCapParamsHelper.h:59
l1t::EndCapParamsHelper::readFromEventSetup
static const EndCapParamsHelper * readFromEventSetup(const L1TMuonEndCapParams *es)
Definition:
EndCapParamsHelper.cc:8
L1TMuonEndCapParams::PhiMatchWindowSt2_
int PhiMatchWindowSt2_
Definition:
L1TMuonEndCapParams.h:25
l1t::EndCapParamsHelper::EndCapParamsHelper
EndCapParamsHelper(L1TMuonEndCapParams *w)
Definition:
EndCapParamsHelper.cc:18
l1t::EndCapParamsHelper::GetFirmwareVersion
unsigned GetFirmwareVersion() const
Definition:
EndCapParamsHelper.h:60
L1TMuonEndCapParams.h
L1TMuonEndCapParams::PtAssignVersion_
unsigned PtAssignVersion_
Definition:
L1TMuonEndCapParams.h:24
l1t::EndCapParamsHelper::SetSt3PhiMatchWindow
void SetSt3PhiMatchWindow(int window)
Definition:
EndCapParamsHelper.h:56
l1t::EndCapParamsHelper::GetSt2PhiMatchWindow
int GetSt2PhiMatchWindow() const
Definition:
EndCapParamsHelper.h:62
Generated for CMSSW Reference Manual by
1.8.11