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.

38 { VERSION = 1 };

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 }

◆ EndCapParamsHelper() [1/2]

EndCapParamsHelper::EndCapParamsHelper ( L1TMuonEndCapParams w)

Definition at line 18 of file EndCapParamsHelper.cc.

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

References w.

◆ 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 }

Member Function Documentation

◆ check_write()

void l1t::EndCapParamsHelper::check_write ( )
inlineprivate

Definition at line 69 of file EndCapParamsHelper.h.

69 { assert(write_); }

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

◆ GetFirmwareVersion()

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

Definition at line 56 of file EndCapParamsHelper.h.

56 { return read_->firmwareVersion_; }

References L1TMuonEndCapParams::firmwareVersion_, and read_.

◆ GetPrimConvVersion()

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

Definition at line 57 of file EndCapParamsHelper.h.

57 { return read_->PhiMatchWindowSt1_; }

References L1TMuonEndCapParams::PhiMatchWindowSt1_, and read_.

◆ GetPtAssignVersion()

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

Definition at line 55 of file EndCapParamsHelper.h.

55 { return read_->PtAssignVersion_; }

References L1TMuonEndCapParams::PtAssignVersion_, and read_.

◆ getReadInstance()

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

Definition at line 63 of file EndCapParamsHelper.h.

63 { return read_; }

References read_.

◆ getWriteInstance()

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

Definition at line 64 of file EndCapParamsHelper.h.

64 { return write_; }

References write_.

Referenced by L1TMuonEndCapParamsESProducer::produce().

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

12  {
14  x->useCopy();
15  return x;
16 }

◆ readFromEventSetup()

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

Definition at line 8 of file EndCapParamsHelper.cc.

8  {
9  return new EndCapParamsHelper(es);
10 }

◆ 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 }

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
L1TMuonEndCapParams::PtAssignVersion_
unsigned PtAssignVersion_
Definition: L1TMuonEndCapParams.h:28
cms::cuda::assert
assert(be >=bs)
DDAxes::x
l1t::EndCapParamsHelper::check_write
void check_write()
Definition: EndCapParamsHelper.h:69
l1t::EndCapParamsHelper
Definition: EndCapParamsHelper.h:36
w
const double w
Definition: UKUtility.cc:23
l1t::EndCapParamsHelper::read_
const L1TMuonEndCapParams * read_
Definition: EndCapParamsHelper.h:71
l1t::EndCapParamsHelper::VERSION
Definition: EndCapParamsHelper.h:38
l1t::EndCapParamsHelper::write_
L1TMuonEndCapParams * write_
Definition: EndCapParamsHelper.h:72
L1TMuonEndCapParams::firmwareVersion_
unsigned firmwareVersion_
Definition: L1TMuonEndCapParams.h:28
L1TMuonEndCapParams
Definition: L1TMuonEndCapParams.h:15
L1TMuonEndCapParams::PhiMatchWindowSt1_
int PhiMatchWindowSt1_
Definition: L1TMuonEndCapParams.h:29
l1t::EndCapParamsHelper::we_own_write_
bool we_own_write_
Definition: EndCapParamsHelper.h:73
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
l1t::EndCapParamsHelper::EndCapParamsHelper
EndCapParamsHelper(L1TMuonEndCapParams *w)
Definition: EndCapParamsHelper.cc:18