CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
Enumerator
VERSION 

Definition at line 35 of file GlobalParamsHelper.h.

Constructor & Destructor Documentation

GlobalParamsHelper::~GlobalParamsHelper ( )

Definition at line 34 of file GlobalParamsHelper.cc.

References we_own_write_, and write_.

34  {
35  if (we_own_write_ && write_)
36  delete write_;
37 }
L1TGlobalParameters * write_
GlobalParamsHelper::GlobalParamsHelper ( L1TGlobalParameters w)
GlobalParamsHelper::GlobalParamsHelper ( const L1TGlobalParameters es)
private

Definition at line 23 of file GlobalParamsHelper.cc.

References read_, and write_.

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

Member Function Documentation

void l1t::GlobalParamsHelper::check_write ( )
inlineprivate
const L1TGlobalParameters* l1t::GlobalParamsHelper::getReadInstance ( ) const
inline

Definition at line 99 of file GlobalParamsHelper.h.

References read_.

99 { return read_; }
const L1TGlobalParameters * read_
L1TGlobalParameters* l1t::GlobalParamsHelper::getWriteInstance ( )
inline

Definition at line 100 of file GlobalParamsHelper.h.

References write_.

Referenced by StableParametersTrivialProducer::produceGtStableParameters().

100 { return write_; }
L1TGlobalParameters * write_
unsigned int l1t::GlobalParamsHelper::numberChips ( ) const
inline

get / set the number of condition chips in GTL

Definition at line 80 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_numberChips, and read_.

Referenced by L1TGlobalProducer::produce().

80 { return read_->m_numberChips; }
unsigned int m_numberChips
hardware
const L1TGlobalParameters * read_
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.

References L1TGlobalParameters::m_numberL1EG, and read_.

Referenced by L1TGlobalProducer::produce().

65 { return read_->m_numberL1EG; }
unsigned int m_numberL1EG
e/gamma objects
const L1TGlobalParameters * read_
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.

References L1TGlobalParameters::m_numberL1Jet, and read_.

Referenced by L1TGlobalProducer::produce().

70 { return read_->m_numberL1Jet; }
unsigned int m_numberL1Jet
jets
const L1TGlobalParameters * read_
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.

References L1TGlobalParameters::m_numberL1Mu, and read_.

Referenced by L1TGlobalProducer::produce().

60 { return read_->m_numberL1Mu; }
unsigned int m_numberL1Mu
trigger objects
const L1TGlobalParameters * read_
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.

References L1TGlobalParameters::m_numberL1Tau, and read_.

Referenced by L1TGlobalProducer::produce().

75 { return read_->m_numberL1Tau; }
unsigned int m_numberL1Tau
taus
const L1TGlobalParameters * read_
unsigned int l1t::GlobalParamsHelper::numberPhysTriggers ( ) const
inline

get / set the number of physics trigger algorithms

Definition at line 55 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_numberPhysTriggers, and read_.

Referenced by L1TGlobalProducer::produce().

55 { return read_->m_numberPhysTriggers; }
const L1TGlobalParameters * read_
unsigned int m_numberPhysTriggers
trigger decision
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.

References L1TGlobalParameters::m_orderOfChip, and read_.

Referenced by L1TGlobalProducer::produce().

91 { return read_->m_orderOfChip; }
std::vector< int > m_orderOfChip
correspondence &quot;condition chip - GTL algorithm word&quot; in the hardware
const L1TGlobalParameters * read_
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.

References L1TGlobalParameters::m_pinsOnChip, and read_.

Referenced by L1TGlobalProducer::produce().

85 { return read_->m_pinsOnChip; }
unsigned int m_pinsOnChip
number of pins on the GTL condition chips
const L1TGlobalParameters * read_
void GlobalParamsHelper::print ( std::ostream &  myStr) const

print all the L1 GT parameters

Definition at line 97 of file GlobalParamsHelper.cc.

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_.

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 }
unsigned int m_pinsOnChip
number of pins on the GTL condition chips
unsigned int m_numberL1Mu
trigger objects
std::vector< int > m_orderOfChip
correspondence &quot;condition chip - GTL algorithm word&quot; in the hardware
unsigned int m_numberL1Jet
jets
int m_totalBxInEvent
bx in event
unsigned int m_numberL1EG
e/gamma objects
unsigned int m_numberL1Tau
taus
unsigned int m_numberChips
hardware
const L1TGlobalParameters * read_
unsigned int m_numberPhysTriggers
trigger decision
GlobalParamsHelper * GlobalParamsHelper::readAndWriteFromEventSetup ( const L1TGlobalParameters es)
static

Definition at line 9 of file GlobalParamsHelper.cc.

References GlobalParamsHelper(), useCopy(), and x.

9  {
11  x->useCopy();
12  return x;
13 }
GlobalParamsHelper(L1TGlobalParameters *w)
const GlobalParamsHelper * GlobalParamsHelper::readFromEventSetup ( const L1TGlobalParameters es)
static

Definition at line 5 of file GlobalParamsHelper.cc.

References GlobalParamsHelper().

5  {
6  return new GlobalParamsHelper(es);
7 }
GlobalParamsHelper(L1TGlobalParameters *w)
void GlobalParamsHelper::setNumberChips ( const unsigned int &  numberChipsValue)

Definition at line 78 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

78  {
79  check_write();
80  write_->m_numberChips = numberChipsValue;
81 }
L1TGlobalParameters * write_
unsigned int m_numberChips
hardware
void GlobalParamsHelper::setNumberL1EG ( const unsigned int &  numberL1EGValue)

Definition at line 58 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

58  {
59  check_write();
60  write_->m_numberL1EG = numberL1EGValue;
61 }
L1TGlobalParameters * write_
unsigned int m_numberL1EG
e/gamma objects
void GlobalParamsHelper::setNumberL1Jet ( const unsigned int &  numberL1JetValue)

Definition at line 64 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

64  {
65  check_write();
66  write_->m_numberL1Jet = numberL1JetValue;
67 }
unsigned int m_numberL1Jet
jets
L1TGlobalParameters * write_
void GlobalParamsHelper::setNumberL1Mu ( const unsigned int &  numberL1MuValue)

Definition at line 52 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

52  {
53  check_write();
54  write_->m_numberL1Mu = numberL1MuValue;
55 }
unsigned int m_numberL1Mu
trigger objects
L1TGlobalParameters * write_
void GlobalParamsHelper::setNumberL1Tau ( const unsigned int &  numberL1TauValue)

Definition at line 70 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

70  {
71  check_write();
72  write_->m_numberL1Tau = numberL1TauValue;
73 }
L1TGlobalParameters * write_
unsigned int m_numberL1Tau
taus
void GlobalParamsHelper::setNumberPhysTriggers ( const unsigned int &  numberPhysTriggersValue)

Definition at line 46 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

46  {
47  check_write();
48  write_->m_numberPhysTriggers = numberPhysTriggersValue;
49 }
L1TGlobalParameters * write_
unsigned int m_numberPhysTriggers
trigger decision
void GlobalParamsHelper::setOrderOfChip ( const std::vector< int > &  orderOfChipValue)

Definition at line 91 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

91  {
92  check_write();
93  write_->m_orderOfChip = orderOfChipValue;
94 }
std::vector< int > m_orderOfChip
correspondence &quot;condition chip - GTL algorithm word&quot; in the hardware
L1TGlobalParameters * write_
void GlobalParamsHelper::setPinsOnChip ( const unsigned int &  pinsOnChipValue)

Definition at line 84 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

84  {
85  check_write();
86  write_->m_pinsOnChip = pinsOnChipValue;
87 }
unsigned int m_pinsOnChip
number of pins on the GTL condition chips
L1TGlobalParameters * write_
void GlobalParamsHelper::setTotalBxInEvent ( const int &  numberBxValue)
int l1t::GlobalParamsHelper::totalBxInEvent ( ) const
inline

get / set the number of bx in hardware

Definition at line 50 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_totalBxInEvent, and read_.

Referenced by L1TGlobalProducer::produce().

50 { return read_->m_totalBxInEvent; }
int m_totalBxInEvent
bx in event
const L1TGlobalParameters * read_
void GlobalParamsHelper::useCopy ( )
private

Definition at line 28 of file GlobalParamsHelper.cc.

References read_, we_own_write_, and write_.

Referenced by readAndWriteFromEventSetup().

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

Member Data Documentation

const L1TGlobalParameters* l1t::GlobalParamsHelper::read_
private
bool l1t::GlobalParamsHelper::we_own_write_
private

Definition at line 109 of file GlobalParamsHelper.h.

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

L1TGlobalParameters* l1t::GlobalParamsHelper::write_
private