CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
l1t::GlobalParamsHelper Class Reference

#include <GlobalParamsHelper.h>

Public Types

enum  { VERSION = 1 }
 

Public Member Functions

const L1TGlobalParametersgetReadInstance () const
 
L1TGlobalParametersgetWriteInstance ()
 
 GlobalParamsHelper (L1TGlobalParameters *w)
 
unsigned int numberChips () const
 get / set the number of condition chips in GTL More...
 
unsigned int numberL1EG () const
 get / set the number of L1 e/gamma objects received by GT More...
 
unsigned int numberL1Jet () const
 get / set the number of L1 jets received by GT More...
 
unsigned int numberL1Mu () const
 get / set the number of L1 muons received by GT More...
 
unsigned int numberL1Tau () const
 get / set the number of L1 tau received by GT More...
 
unsigned int numberPhysTriggers () const
 get / set the number of physics trigger algorithms More...
 
const std::vector< int > & orderOfChip () const
 
unsigned int pinsOnChip () const
 get / set the number of pins on the GTL condition chips More...
 
void print (std::ostream &) const
 print all the L1 GT parameters More...
 
void setNumberChips (const unsigned int &)
 
void setNumberL1EG (const unsigned int &)
 
void setNumberL1Jet (const unsigned int &)
 
void setNumberL1Mu (const unsigned int &)
 
void setNumberL1Tau (const unsigned int &)
 
void setNumberPhysTriggers (const unsigned int &)
 
void setOrderOfChip (const std::vector< int > &)
 
void setPinsOnChip (const unsigned int &)
 
void setTotalBxInEvent (const int &)
 
int totalBxInEvent () const
 get / set the number of bx in hardware More...
 
 ~GlobalParamsHelper ()
 

Static Public Member Functions

static GlobalParamsHelperreadAndWriteFromEventSetup (const L1TGlobalParameters *es)
 
static const GlobalParamsHelperreadFromEventSetup (const L1TGlobalParameters *es)
 

Private Member Functions

void check_write ()
 
 GlobalParamsHelper (const L1TGlobalParameters *es)
 
void useCopy ()
 

Private Attributes

const L1TGlobalParametersread_
 
bool we_own_write_
 
L1TGlobalParameterswrite_
 

Detailed Description

Definition at line 33 of file GlobalParamsHelper.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
VERSION 

Definition at line 35 of file GlobalParamsHelper.h.

35 { VERSION = 1 };

Constructor & Destructor Documentation

◆ ~GlobalParamsHelper()

GlobalParamsHelper::~GlobalParamsHelper ( )

Definition at line 34 of file GlobalParamsHelper.cc.

34  {
35  if (we_own_write_ && write_)
36  delete write_;
37 }

References we_own_write_, and write_.

◆ GlobalParamsHelper() [1/2]

GlobalParamsHelper::GlobalParamsHelper ( L1TGlobalParameters w)

Definition at line 15 of file GlobalParamsHelper.cc.

15  {
16  write_ = w;
17  check_write();
18  we_own_write_ = false;
20  read_ = write_;
21 }

References check_write(), L1TGlobalParameters::m_version, read_, VERSION, w, we_own_write_, and write_.

Referenced by readAndWriteFromEventSetup(), and readFromEventSetup().

◆ GlobalParamsHelper() [2/2]

GlobalParamsHelper::GlobalParamsHelper ( const L1TGlobalParameters es)
private

Definition at line 23 of file GlobalParamsHelper.cc.

23  {
24  read_ = es;
25  write_ = nullptr;
26 }

References read_, and write_.

Member Function Documentation

◆ check_write()

void l1t::GlobalParamsHelper::check_write ( )
inlineprivate

◆ getReadInstance()

const L1TGlobalParameters* l1t::GlobalParamsHelper::getReadInstance ( ) const
inline

Definition at line 99 of file GlobalParamsHelper.h.

99 { return read_; }

References read_.

◆ getWriteInstance()

L1TGlobalParameters* l1t::GlobalParamsHelper::getWriteInstance ( )
inline

Definition at line 100 of file GlobalParamsHelper.h.

100 { return write_; }

References write_.

Referenced by StableParametersTrivialProducer::produceGtStableParameters().

◆ numberChips()

unsigned int l1t::GlobalParamsHelper::numberChips ( ) const
inline

get / set the number of condition chips in GTL

Definition at line 80 of file GlobalParamsHelper.h.

80 { return read_->m_numberChips; }

References L1TGlobalParameters::m_numberChips, and read_.

◆ numberL1EG()

unsigned int l1t::GlobalParamsHelper::numberL1EG ( ) const
inline

get / set the number of L1 e/gamma objects received by GT

Definition at line 65 of file GlobalParamsHelper.h.

65 { return read_->m_numberL1EG; }

References L1TGlobalParameters::m_numberL1EG, and read_.

◆ numberL1Jet()

unsigned int l1t::GlobalParamsHelper::numberL1Jet ( ) const
inline

get / set the number of L1 jets received by GT

Definition at line 70 of file GlobalParamsHelper.h.

70 { return read_->m_numberL1Jet; }

References L1TGlobalParameters::m_numberL1Jet, and read_.

◆ numberL1Mu()

unsigned int l1t::GlobalParamsHelper::numberL1Mu ( ) const
inline

get / set the number of L1 muons received by GT

Definition at line 60 of file GlobalParamsHelper.h.

60 { return read_->m_numberL1Mu; }

References L1TGlobalParameters::m_numberL1Mu, and read_.

◆ numberL1Tau()

unsigned int l1t::GlobalParamsHelper::numberL1Tau ( ) const
inline

get / set the number of L1 tau received by GT

Definition at line 75 of file GlobalParamsHelper.h.

75 { return read_->m_numberL1Tau; }

References L1TGlobalParameters::m_numberL1Tau, and read_.

◆ numberPhysTriggers()

unsigned int l1t::GlobalParamsHelper::numberPhysTriggers ( ) const
inline

get / set the number of physics trigger algorithms

Definition at line 55 of file GlobalParamsHelper.h.

55 { return read_->m_numberPhysTriggers; }

References L1TGlobalParameters::m_numberPhysTriggers, and read_.

◆ orderOfChip()

const std::vector<int>& l1t::GlobalParamsHelper::orderOfChip ( ) const
inline

get / set the correspondence "condition chip - GTL algorithm word" in the hardware

Definition at line 91 of file GlobalParamsHelper.h.

91 { return read_->m_orderOfChip; }

References L1TGlobalParameters::m_orderOfChip, and read_.

◆ pinsOnChip()

unsigned int l1t::GlobalParamsHelper::pinsOnChip ( ) const
inline

get / set the number of pins on the GTL condition chips

Definition at line 85 of file GlobalParamsHelper.h.

85 { return read_->m_pinsOnChip; }

References L1TGlobalParameters::m_pinsOnChip, and read_.

◆ print()

void GlobalParamsHelper::print ( std::ostream &  myStr) const

print all the L1 GT parameters

Definition at line 97 of file GlobalParamsHelper.cc.

97  {
98  myStr << "\nL1T Global Parameters \n" << std::endl;
99 
100  // number of bx
101  myStr << "\n Number of bx in Event = " << read_->m_totalBxInEvent << std::endl;
102 
103  // trigger decision
104 
105  // number of physics trigger algorithms
106  myStr << "\n Number of physics trigger algorithms = " << read_->m_numberPhysTriggers << std::endl;
107 
108  // muons
109  myStr << "\n Number of muons received by L1 GT = " << read_->m_numberL1Mu << std::endl;
110 
111  // e/gamma and isolated e/gamma objects
112  myStr << " Number of e/gamma objects received by L1 GT = " << read_->m_numberL1EG << std::endl;
113 
114  // central, forward and tau jets
115  myStr << "\n Number of jets received by L1 GT = " << read_->m_numberL1Jet << std::endl;
116 
117  myStr << " Number of tau received by L1 GT = " << read_->m_numberL1Tau << std::endl;
118 
119  // hardware
120 
121  // number of condition chips
122  myStr << "\n Number of condition chips = " << read_->m_numberChips << std::endl;
123 
124  // number of pins on the GTL condition chips
125  myStr << " Number of pins on chips = " << read_->m_pinsOnChip << std::endl;
126 
127  // correspondence "condition chip - GTL algorithm word" in the hardware
128  // chip 2: 0 - 95; chip 1: 96 - 128 (191)
129  myStr << " Order of chips for algorithm word = {";
130 
131  for (unsigned int iChip = 0; iChip < read_->m_orderOfChip.size(); ++iChip) {
132  myStr << read_->m_orderOfChip[iChip];
133  if (iChip != (read_->m_orderOfChip.size() - 1)) {
134  myStr << ", ";
135  }
136  }
137 
138  myStr << "}" << std::endl;
139 
140  myStr << "\n" << std::endl;
141 }

References L1TGlobalParameters::m_numberChips, L1TGlobalParameters::m_numberL1EG, L1TGlobalParameters::m_numberL1Jet, L1TGlobalParameters::m_numberL1Mu, L1TGlobalParameters::m_numberL1Tau, L1TGlobalParameters::m_numberPhysTriggers, L1TGlobalParameters::m_orderOfChip, L1TGlobalParameters::m_pinsOnChip, L1TGlobalParameters::m_totalBxInEvent, and read_.

◆ readAndWriteFromEventSetup()

GlobalParamsHelper * GlobalParamsHelper::readAndWriteFromEventSetup ( const L1TGlobalParameters es)
static

Definition at line 9 of file GlobalParamsHelper.cc.

9  {
11  x->useCopy();
12  return x;
13 }

References GlobalParamsHelper().

◆ readFromEventSetup()

const GlobalParamsHelper * GlobalParamsHelper::readFromEventSetup ( const L1TGlobalParameters es)
static

Definition at line 5 of file GlobalParamsHelper.cc.

5  {
6  return new GlobalParamsHelper(es);
7 }

References GlobalParamsHelper().

◆ setNumberChips()

void GlobalParamsHelper::setNumberChips ( const unsigned int &  numberChipsValue)

Definition at line 78 of file GlobalParamsHelper.cc.

78  {
79  check_write();
80  write_->m_numberChips = numberChipsValue;
81 }

References check_write(), L1TGlobalParameters::m_numberChips, and write_.

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

◆ setNumberL1EG()

void GlobalParamsHelper::setNumberL1EG ( const unsigned int &  numberL1EGValue)

Definition at line 58 of file GlobalParamsHelper.cc.

58  {
59  check_write();
60  write_->m_numberL1EG = numberL1EGValue;
61 }

References check_write(), L1TGlobalParameters::m_numberL1EG, and write_.

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

◆ setNumberL1Jet()

void GlobalParamsHelper::setNumberL1Jet ( const unsigned int &  numberL1JetValue)

Definition at line 64 of file GlobalParamsHelper.cc.

64  {
65  check_write();
66  write_->m_numberL1Jet = numberL1JetValue;
67 }

References check_write(), L1TGlobalParameters::m_numberL1Jet, and write_.

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

◆ setNumberL1Mu()

void GlobalParamsHelper::setNumberL1Mu ( const unsigned int &  numberL1MuValue)

Definition at line 52 of file GlobalParamsHelper.cc.

52  {
53  check_write();
54  write_->m_numberL1Mu = numberL1MuValue;
55 }

References check_write(), L1TGlobalParameters::m_numberL1Mu, and write_.

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

◆ setNumberL1Tau()

void GlobalParamsHelper::setNumberL1Tau ( const unsigned int &  numberL1TauValue)

Definition at line 70 of file GlobalParamsHelper.cc.

70  {
71  check_write();
72  write_->m_numberL1Tau = numberL1TauValue;
73 }

References check_write(), L1TGlobalParameters::m_numberL1Tau, and write_.

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

◆ setNumberPhysTriggers()

void GlobalParamsHelper::setNumberPhysTriggers ( const unsigned int &  numberPhysTriggersValue)

Definition at line 46 of file GlobalParamsHelper.cc.

46  {
47  check_write();
48  write_->m_numberPhysTriggers = numberPhysTriggersValue;
49 }

References check_write(), L1TGlobalParameters::m_numberPhysTriggers, and write_.

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

◆ setOrderOfChip()

void GlobalParamsHelper::setOrderOfChip ( const std::vector< int > &  orderOfChipValue)

Definition at line 91 of file GlobalParamsHelper.cc.

91  {
92  check_write();
93  write_->m_orderOfChip = orderOfChipValue;
94 }

References check_write(), L1TGlobalParameters::m_orderOfChip, and write_.

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

◆ setPinsOnChip()

void GlobalParamsHelper::setPinsOnChip ( const unsigned int &  pinsOnChipValue)

Definition at line 84 of file GlobalParamsHelper.cc.

84  {
85  check_write();
86  write_->m_pinsOnChip = pinsOnChipValue;
87 }

References check_write(), L1TGlobalParameters::m_pinsOnChip, and write_.

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

◆ setTotalBxInEvent()

void GlobalParamsHelper::setTotalBxInEvent ( const int &  numberBxValue)

◆ totalBxInEvent()

int l1t::GlobalParamsHelper::totalBxInEvent ( ) const
inline

get / set the number of bx in hardware

Definition at line 50 of file GlobalParamsHelper.h.

50 { return read_->m_totalBxInEvent; }

References L1TGlobalParameters::m_totalBxInEvent, and read_.

◆ useCopy()

void GlobalParamsHelper::useCopy ( )
private

Definition at line 28 of file GlobalParamsHelper.cc.

28  {
30  we_own_write_ = true;
31  read_ = write_;
32 }

References read_, we_own_write_, and write_.

Member Data Documentation

◆ read_

const L1TGlobalParameters* l1t::GlobalParamsHelper::read_
private

◆ we_own_write_

bool l1t::GlobalParamsHelper::we_own_write_
private

Definition at line 109 of file GlobalParamsHelper.h.

Referenced by GlobalParamsHelper(), useCopy(), and ~GlobalParamsHelper().

◆ write_

L1TGlobalParameters* l1t::GlobalParamsHelper::write_
private
L1TGlobalParameters::m_numberL1Jet
unsigned int m_numberL1Jet
jets
Definition: L1TGlobalParameters.h:31
cms::cuda::assert
assert(be >=bs)
L1TGlobalParameters::m_orderOfChip
std::vector< int > m_orderOfChip
correspondence "condition chip - GTL algorithm word" in the hardware
Definition: L1TGlobalParameters.h:45
L1TGlobalParameters::m_numberL1Tau
unsigned int m_numberL1Tau
taus
Definition: L1TGlobalParameters.h:34
DDAxes::x
L1TGlobalParameters::m_numberL1EG
unsigned int m_numberL1EG
e/gamma objects
Definition: L1TGlobalParameters.h:28
L1TGlobalParameters
Definition: L1TGlobalParameters.h:7
l1t::GlobalParamsHelper::write_
L1TGlobalParameters * write_
Definition: GlobalParamsHelper.h:108
w
const double w
Definition: UKUtility.cc:23
L1TGlobalParameters::m_totalBxInEvent
int m_totalBxInEvent
bx in event
Definition: L1TGlobalParameters.h:15
l1t::GlobalParamsHelper::check_write
void check_write()
Definition: GlobalParamsHelper.h:105
l1t::GlobalParamsHelper
Definition: GlobalParamsHelper.h:33
L1TGlobalParameters::m_version
int m_version
Definition: L1TGlobalParameters.h:47
l1t::GlobalParamsHelper::GlobalParamsHelper
GlobalParamsHelper(L1TGlobalParameters *w)
Definition: GlobalParamsHelper.cc:15
l1t::GlobalParamsHelper::we_own_write_
bool we_own_write_
Definition: GlobalParamsHelper.h:109
L1TGlobalParameters::m_numberChips
unsigned int m_numberChips
hardware
Definition: L1TGlobalParameters.h:39
l1t::GlobalParamsHelper::read_
const L1TGlobalParameters * read_
Definition: GlobalParamsHelper.h:107
L1TGlobalParameters::m_numberPhysTriggers
unsigned int m_numberPhysTriggers
trigger decision
Definition: L1TGlobalParameters.h:20
L1TGlobalParameters::m_numberL1Mu
unsigned int m_numberL1Mu
trigger objects
Definition: L1TGlobalParameters.h:25
l1t::GlobalParamsHelper::VERSION
Definition: GlobalParamsHelper.h:35
L1TGlobalParameters::m_pinsOnChip
unsigned int m_pinsOnChip
number of pins on the GTL condition chips
Definition: L1TGlobalParameters.h:42