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 36 of file EndCapParamsHelper.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
VERSION 

Definition at line 38 of file EndCapParamsHelper.h.

Constructor & Destructor Documentation

◆ ~EndCapParamsHelper()

EndCapParamsHelper::~EndCapParamsHelper ( )

Definition at line 37 of file EndCapParamsHelper.cc.

37  {
38  if (we_own_write_ && write_)
39  delete write_;
40 }
L1TMuonEndCapParams * write_

◆ EndCapParamsHelper() [1/2]

EndCapParamsHelper::EndCapParamsHelper ( L1TMuonEndCapParams w)

Definition at line 18 of file EndCapParamsHelper.cc.

References w().

18  {
19  write_ = w;
20  check_write();
21  we_own_write_ = false;
22  //write_->m_version = VERSION;
23  read_ = write_;
24 }
L1TMuonEndCapParams * write_
T w() const
const L1TMuonEndCapParams * read_

◆ EndCapParamsHelper() [2/2]

EndCapParamsHelper::EndCapParamsHelper ( const L1TMuonEndCapParams es)
private

Definition at line 26 of file EndCapParamsHelper.cc.

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

Member Function Documentation

◆ check_write()

void l1t::EndCapParamsHelper::check_write ( )
inlineprivate

Definition at line 69 of file EndCapParamsHelper.h.

References cms::cuda::assert(), and write_.

69 { assert(write_); }
L1TMuonEndCapParams * write_
assert(be >=bs)

◆ GetFirmwareVersion()

unsigned l1t::EndCapParamsHelper::GetFirmwareVersion ( ) const
inline

Definition at line 56 of file EndCapParamsHelper.h.

References L1TMuonEndCapParams::firmwareVersion_, and read_.

56 { return read_->firmwareVersion_; }
const L1TMuonEndCapParams * read_

◆ GetPrimConvVersion()

unsigned l1t::EndCapParamsHelper::GetPrimConvVersion ( ) const
inline

Definition at line 57 of file EndCapParamsHelper.h.

References L1TMuonEndCapParams::PhiMatchWindowSt1_, and read_.

57 { return read_->PhiMatchWindowSt1_; }
const L1TMuonEndCapParams * read_

◆ GetPtAssignVersion()

unsigned l1t::EndCapParamsHelper::GetPtAssignVersion ( ) const
inline

Definition at line 55 of file EndCapParamsHelper.h.

References L1TMuonEndCapParams::PtAssignVersion_, and read_.

55 { return read_->PtAssignVersion_; }
const L1TMuonEndCapParams * read_

◆ getReadInstance()

const L1TMuonEndCapParams* l1t::EndCapParamsHelper::getReadInstance ( ) const
inline

Definition at line 63 of file EndCapParamsHelper.h.

References read_.

63 { return read_; }
const L1TMuonEndCapParams * read_

◆ getWriteInstance()

L1TMuonEndCapParams* l1t::EndCapParamsHelper::getWriteInstance ( )
inline

Definition at line 64 of file EndCapParamsHelper.h.

References write_.

Referenced by L1TMuonEndCapParamsESProducer::produce().

64 { return write_; }
L1TMuonEndCapParams * write_

◆ print()

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

Definition at line 43 of file EndCapParamsHelper.cc.

43 { myStr << "\nL1T EndCap Parameters \n" << std::endl; }

◆ readAndWriteFromEventSetup()

EndCapParamsHelper * EndCapParamsHelper::readAndWriteFromEventSetup ( const L1TMuonEndCapParams es)
static

Definition at line 12 of file EndCapParamsHelper.cc.

References x.

12  {
14  x->useCopy();
15  return x;
16 }
EndCapParamsHelper(L1TMuonEndCapParams *w)

◆ readFromEventSetup()

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)

◆ SetFirmwareVersion()

void l1t::EndCapParamsHelper::SetFirmwareVersion ( unsigned  version)
inline

◆ SetPrimConvVersion()

void l1t::EndCapParamsHelper::SetPrimConvVersion ( unsigned  version)
inline

◆ SetPtAssignVersion()

void l1t::EndCapParamsHelper::SetPtAssignVersion ( unsigned  version)
inline

◆ useCopy()

void EndCapParamsHelper::useCopy ( )
private

Definition at line 31 of file EndCapParamsHelper.cc.

31  {
33  we_own_write_ = true;
34  read_ = write_;
35 }
L1TMuonEndCapParams * write_
const L1TMuonEndCapParams * read_

Member Data Documentation

◆ read_

const L1TMuonEndCapParams* l1t::EndCapParamsHelper::read_
private

◆ we_own_write_

bool l1t::EndCapParamsHelper::we_own_write_
private

Definition at line 73 of file EndCapParamsHelper.h.

◆ write_

L1TMuonEndCapParams* l1t::EndCapParamsHelper::write_
private