CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 35 of file GlobalParamsHelper.h.

Member Enumeration Documentation

anonymous enum
Enumerator
VERSION 

Definition at line 37 of file GlobalParamsHelper.h.

Constructor & Destructor Documentation

GlobalParamsHelper::~GlobalParamsHelper ( )

Definition at line 32 of file GlobalParamsHelper.cc.

References we_own_write_, and write_.

32  {
33  if (we_own_write_ && write_) delete write_;
34 }
L1TGlobalParameters * write_
GlobalParamsHelper::GlobalParamsHelper ( L1TGlobalParameters w)
GlobalParamsHelper::GlobalParamsHelper ( const L1TGlobalParameters es)
private

Definition at line 24 of file GlobalParamsHelper.cc.

References NULL, read_, and write_.

24 {read_ = es; write_=NULL;}
#define NULL
Definition: scimark2.h:8
L1TGlobalParameters * write_
const L1TGlobalParameters * read_

Member Function Documentation

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

Definition at line 128 of file GlobalParamsHelper.h.

References read_.

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

Definition at line 129 of file GlobalParamsHelper.h.

References write_.

Referenced by StableParametersTrivialProducer::produceGtStableParameters().

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

get / set the number of condition chips in GTL

Definition at line 101 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_numberChips, and read_.

Referenced by L1TGlobalProducer::produce().

101  {
102  return read_->m_numberChips;
103  }
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 76 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_numberL1EG, and read_.

Referenced by L1TGlobalProducer::produce().

76  {
77  return read_->m_numberL1EG;
78  }
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 84 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_numberL1Jet, and read_.

Referenced by L1TGlobalProducer::produce().

84  {
85  return read_->m_numberL1Jet;
86  }
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 69 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_numberL1Mu, and read_.

Referenced by L1TGlobalProducer::produce().

69  {
70  return read_->m_numberL1Mu;
71  }
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 92 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_numberL1Tau, and read_.

Referenced by L1TGlobalProducer::produce().

92  {
93  return read_->m_numberL1Tau;
94  }
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 61 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_numberPhysTriggers, and read_.

Referenced by L1TGlobalProducer::produce().

61  {
63  }
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 116 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_orderOfChip, and read_.

Referenced by L1TGlobalProducer::produce().

116  {
117  return read_->m_orderOfChip;
118  }
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 108 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_pinsOnChip, and read_.

Referenced by L1TGlobalProducer::produce().

108  {
109  return read_->m_pinsOnChip;
110  }
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 111 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_.

111  {
112  myStr << "\nL1T Global Parameters \n" << std::endl;
113 
114 
115  // number of bx
116  myStr << "\n Number of bx in Event = "
117  << read_->m_totalBxInEvent << std::endl;
118 
119  // trigger decision
120 
121  // number of physics trigger algorithms
122  myStr << "\n Number of physics trigger algorithms = "
123  << read_->m_numberPhysTriggers << std::endl;
124 
125  // muons
126  myStr << "\n Number of muons received by L1 GT = "
127  << read_->m_numberL1Mu << std::endl;
128 
129  // e/gamma and isolated e/gamma objects
130  myStr << " Number of e/gamma objects received by L1 GT = "
131  << read_->m_numberL1EG << std::endl;
132 
133  // central, forward and tau jets
134  myStr << "\n Number of jets received by L1 GT = "
135  << read_->m_numberL1Jet << std::endl;
136 
137  myStr << " Number of tau received by L1 GT = "
138  << read_->m_numberL1Tau << std::endl;
139 
140 
141  // hardware
142 
143  // number of condition chips
144  myStr << "\n Number of condition chips = "
145  << read_->m_numberChips << std::endl;
146 
147  // number of pins on the GTL condition chips
148  myStr << " Number of pins on chips = "
149  << read_->m_pinsOnChip << std::endl;
150 
151  // correspondence "condition chip - GTL algorithm word" in the hardware
152  // chip 2: 0 - 95; chip 1: 96 - 128 (191)
153  myStr << " Order of chips for algorithm word = {";
154 
155  for (unsigned int iChip = 0; iChip < read_->m_orderOfChip.size(); ++iChip) {
156  myStr << read_->m_orderOfChip[iChip];
157  if (iChip != (read_->m_orderOfChip.size() - 1)) {
158  myStr << ", ";
159  }
160  }
161 
162  myStr << "}" << std::endl;
163 
164  myStr << "\n" << std::endl;
165 
166 }
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 10 of file GlobalParamsHelper.cc.

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

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

Definition at line 6 of file GlobalParamsHelper.cc.

References GlobalParamsHelper().

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

Definition at line 86 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

87  {
88 
89  check_write(); write_->m_numberChips = numberChipsValue;
90 
91 }
L1TGlobalParameters * write_
unsigned int m_numberChips
hardware
void GlobalParamsHelper::setNumberL1EG ( const unsigned int &  numberL1EGValue)

Definition at line 60 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

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

Definition at line 68 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

69  {
70 
71  check_write(); write_->m_numberL1Jet = numberL1JetValue;
72 
73 }
unsigned int m_numberL1Jet
jets
L1TGlobalParameters * write_
void GlobalParamsHelper::setNumberL1Mu ( const unsigned int &  numberL1MuValue)

Definition at line 53 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

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

Definition at line 76 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

77  {
78 
79  check_write(); write_->m_numberL1Tau = numberL1TauValue;
80 
81 }
L1TGlobalParameters * write_
unsigned int m_numberL1Tau
taus
void GlobalParamsHelper::setNumberPhysTriggers ( const unsigned int &  numberPhysTriggersValue)

Definition at line 45 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

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

Definition at line 103 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

104  {
105 
106  check_write(); write_->m_orderOfChip = orderOfChipValue;
107 
108 }
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 94 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

95  {
96 
97  check_write(); write_->m_pinsOnChip = pinsOnChipValue;
98 
99 }
unsigned int m_pinsOnChip
number of pins on the GTL condition chips
L1TGlobalParameters * write_
void GlobalParamsHelper::setTotalBxInEvent ( const int &  numberBxValue)

Definition at line 37 of file GlobalParamsHelper.cc.

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

Referenced by StableParametersTrivialProducer::StableParametersTrivialProducer().

38  {
39 
40  check_write(); write_->m_totalBxInEvent = numberBxValue;
41 
42 }
int m_totalBxInEvent
bx in event
L1TGlobalParameters * write_
int l1t::GlobalParamsHelper::totalBxInEvent ( ) const
inline

get / set the number of bx in hardware

Definition at line 53 of file GlobalParamsHelper.h.

References L1TGlobalParameters::m_totalBxInEvent, and read_.

Referenced by L1TGlobalProducer::produce().

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

Definition at line 26 of file GlobalParamsHelper.cc.

References read_, we_own_write_, and write_.

Referenced by readAndWriteFromEventSetup().

26  {
28  we_own_write_ = true;
29  read_ = write_;
30 }
L1TGlobalParameters * write_
const L1TGlobalParameters * read_

Member Data Documentation

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

Definition at line 138 of file GlobalParamsHelper.h.

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

L1TGlobalParameters* l1t::GlobalParamsHelper::write_
private