CMS 3D CMS Logo

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

#include <EndCapParamsHelper.h>

Public Types

enum  { VERSION = 1 }
 

Public Member Functions

 EndCapParamsHelper (L1TMuonEndCapParams *w)
 
unsigned GetFirmwareVersion () const
 
unsigned GetPrimConvVersion () const
 
unsigned GetPtAssignVersion () const
 
const L1TMuonEndCapParamsgetReadInstance () const
 
L1TMuonEndCapParamsgetWriteInstance ()
 
void print (std::ostream &) const
 
void SetFirmwareVersion (unsigned version)
 
void SetPrimConvVersion (unsigned version)
 
void SetPtAssignVersion (unsigned version)
 
 ~EndCapParamsHelper ()
 

Static Public Member Functions

static EndCapParamsHelperreadAndWriteFromEventSetup (const L1TMuonEndCapParams *es)
 
static const EndCapParamsHelperreadFromEventSetup (const L1TMuonEndCapParams *es)
 

Private Member Functions

void check_write ()
 
 EndCapParamsHelper (const L1TMuonEndCapParams *es)
 
void useCopy ()
 

Private Attributes

const L1TMuonEndCapParamsread_
 
bool we_own_write_
 
L1TMuonEndCapParamswrite_
 

Detailed Description

Definition at line 39 of file EndCapParamsHelper.h.

Member Enumeration Documentation

anonymous enum
Enumerator
VERSION 

Definition at line 41 of file EndCapParamsHelper.h.

Constructor & Destructor Documentation

EndCapParamsHelper::~EndCapParamsHelper ( )

Definition at line 34 of file EndCapParamsHelper.cc.

34  {
35  if (we_own_write_ && write_) delete write_;
36 }
L1TMuonEndCapParams * write_
EndCapParamsHelper::EndCapParamsHelper ( L1TMuonEndCapParams w)

Definition at line 18 of file EndCapParamsHelper.cc.

References w.

Referenced by getWriteInstance().

18  {
19  write_ = w;
20  check_write();
21  we_own_write_ = false;
22  //write_->m_version = VERSION;
23  read_ = write_;
24 }
L1TMuonEndCapParams * write_
const double w
Definition: UKUtility.cc:23
const L1TMuonEndCapParams * read_
EndCapParamsHelper::EndCapParamsHelper ( const L1TMuonEndCapParams es)
private

Definition at line 26 of file EndCapParamsHelper.cc.

26 {read_ = es; write_=nullptr;}
L1TMuonEndCapParams * write_
const L1TMuonEndCapParams * read_

Member Function Documentation

void l1t::EndCapParamsHelper::check_write ( )
inlineprivate

Definition at line 72 of file EndCapParamsHelper.h.

References write_.

72 { assert(write_); }
L1TMuonEndCapParams * write_
unsigned l1t::EndCapParamsHelper::GetFirmwareVersion ( ) const
inline

Definition at line 59 of file EndCapParamsHelper.h.

References L1TMuonEndCapParams::firmwareVersion_, and read_.

59 {return read_->firmwareVersion_;}
const L1TMuonEndCapParams * read_
unsigned l1t::EndCapParamsHelper::GetPrimConvVersion ( ) const
inline

Definition at line 60 of file EndCapParamsHelper.h.

References L1TMuonEndCapParams::PhiMatchWindowSt1_, print(), and read_.

60 {return read_->PhiMatchWindowSt1_;}
const L1TMuonEndCapParams * read_
unsigned l1t::EndCapParamsHelper::GetPtAssignVersion ( ) const
inline

Definition at line 58 of file EndCapParamsHelper.h.

References L1TMuonEndCapParams::PtAssignVersion_, and read_.

58 {return read_->PtAssignVersion_;}
const L1TMuonEndCapParams * read_
const L1TMuonEndCapParams* l1t::EndCapParamsHelper::getReadInstance ( ) const
inline

Definition at line 66 of file EndCapParamsHelper.h.

References read_.

66 {return read_;}
const L1TMuonEndCapParams * read_
L1TMuonEndCapParams* l1t::EndCapParamsHelper::getWriteInstance ( )
inline

Definition at line 67 of file EndCapParamsHelper.h.

References EndCapParamsHelper(), useCopy(), and write_.

Referenced by L1TMuonEndCapParamsESProducer::produce().

67 {return write_; }
L1TMuonEndCapParams * write_
void EndCapParamsHelper::print ( std::ostream &  myStr) const

Definition at line 40 of file EndCapParamsHelper.cc.

Referenced by GetPrimConvVersion().

40  {
41  myStr << "\nL1T EndCap Parameters \n" << std::endl;
42 }
EndCapParamsHelper * EndCapParamsHelper::readAndWriteFromEventSetup ( const L1TMuonEndCapParams es)
static

Definition at line 12 of file EndCapParamsHelper.cc.

References useCopy().

12  {
14  x->useCopy();
15  return x;
16 }
EndCapParamsHelper(L1TMuonEndCapParams *w)
const EndCapParamsHelper * EndCapParamsHelper::readFromEventSetup ( const L1TMuonEndCapParams es)
static

Definition at line 8 of file EndCapParamsHelper.cc.

8  {
9  return new EndCapParamsHelper(es);
10 }
EndCapParamsHelper(L1TMuonEndCapParams *w)
void l1t::EndCapParamsHelper::SetFirmwareVersion ( unsigned  version)
inline
void l1t::EndCapParamsHelper::SetPrimConvVersion ( unsigned  version)
inline
void l1t::EndCapParamsHelper::SetPtAssignVersion ( unsigned  version)
inline
void EndCapParamsHelper::useCopy ( )
private

Definition at line 28 of file EndCapParamsHelper.cc.

Referenced by getWriteInstance(), and readAndWriteFromEventSetup().

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

Member Data Documentation

const L1TMuonEndCapParams* l1t::EndCapParamsHelper::read_
private
bool l1t::EndCapParamsHelper::we_own_write_
private

Definition at line 76 of file EndCapParamsHelper.h.

L1TMuonEndCapParams* l1t::EndCapParamsHelper::write_
private