CMS 3D CMS Logo

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

#include <PrescalesVetosFractHelper.h>

Public Types

enum  { VERSION_ = 1 }
 

Public Member Functions

int bxMaskDefault () const
 
const L1TGlobalPrescalesVetosFractgetReadInstance () const
 
L1TGlobalPrescalesVetosFractgetWriteInstance ()
 
 PrescalesVetosFractHelper (L1TGlobalPrescalesVetosFract *w)
 
const std::vector< std::vector< double > > & prescaleTable () const
 
void setBxMaskDefault (int value)
 
void setPrescaleFactorTable (std::vector< std::vector< double > > value)
 
void setTriggerAlgoBxMask (std::map< int, std::vector< int > > value)
 
void setTriggerMaskVeto (std::vector< int > value)
 
const std::map< int, std::vector< int > > & triggerAlgoBxMask () const
 
const std::vector< int > & triggerMaskVeto () const
 
 ~PrescalesVetosFractHelper ()
 

Static Public Member Functions

static PrescalesVetosFractHelperreadAndWriteFromEventSetup (const L1TGlobalPrescalesVetosFract *es)
 
static const PrescalesVetosFractHelperreadFromEventSetup (const L1TGlobalPrescalesVetosFract *es)
 

Private Member Functions

void check_write ()
 
 PrescalesVetosFractHelper (const L1TGlobalPrescalesVetosFract *es)
 
void useCopy ()
 

Private Attributes

const L1TGlobalPrescalesVetosFractread_
 
bool we_own_write_
 
L1TGlobalPrescalesVetosFractwrite_
 

Detailed Description

Definition at line 32 of file PrescalesVetosFractHelper.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
VERSION_ 

Definition at line 34 of file PrescalesVetosFractHelper.h.

34 { VERSION_ = 1 };

Constructor & Destructor Documentation

◆ ~PrescalesVetosFractHelper()

PrescalesVetosFractHelper::~PrescalesVetosFractHelper ( )

Definition at line 35 of file PrescalesVetosFractHelper.cc.

35  {
36  if (we_own_write_ && write_)
37  delete write_;
38 }

References we_own_write_, and write_.

◆ PrescalesVetosFractHelper() [1/2]

PrescalesVetosFractHelper::PrescalesVetosFractHelper ( L1TGlobalPrescalesVetosFract w)

Definition at line 16 of file PrescalesVetosFractHelper.cc.

16  {
17  write_ = w;
18  check_write();
19  we_own_write_ = false;
21  read_ = write_;
22 }

References check_write(), read_, L1TGlobalPrescalesVetosFract::version_, VERSION_, w, we_own_write_, and write_.

Referenced by readAndWriteFromEventSetup(), and readFromEventSetup().

◆ PrescalesVetosFractHelper() [2/2]

PrescalesVetosFractHelper::PrescalesVetosFractHelper ( const L1TGlobalPrescalesVetosFract es)
private

Definition at line 24 of file PrescalesVetosFractHelper.cc.

24  {
25  read_ = es;
26  write_ = nullptr;
27 }

References read_, and write_.

Member Function Documentation

◆ bxMaskDefault()

int l1t::PrescalesVetosFractHelper::bxMaskDefault ( ) const
inline

Definition at line 45 of file PrescalesVetosFractHelper.h.

45 { return read_->bxmask_default_; };

References L1TGlobalPrescalesVetosFract::bxmask_default_, and read_.

◆ check_write()

void l1t::PrescalesVetosFractHelper::check_write ( )
inlineprivate

◆ getReadInstance()

const L1TGlobalPrescalesVetosFract* l1t::PrescalesVetosFractHelper::getReadInstance ( ) const
inline

Definition at line 69 of file PrescalesVetosFractHelper.h.

69 { return read_; }

References read_.

◆ getWriteInstance()

L1TGlobalPrescalesVetosFract* l1t::PrescalesVetosFractHelper::getWriteInstance ( )
inline

Definition at line 70 of file PrescalesVetosFractHelper.h.

70 { return write_; }

References write_.

Referenced by L1TGlobalPrescalesVetosOnlineProd::newObject().

◆ prescaleTable()

const std::vector<std::vector<double> >& l1t::PrescalesVetosFractHelper::prescaleTable ( ) const
inline

Definition at line 51 of file PrescalesVetosFractHelper.h.

51 { return read_->prescale_table_; };

References L1TGlobalPrescalesVetosFract::prescale_table_, and read_.

Referenced by L1TGlobalProducer::produce().

◆ readAndWriteFromEventSetup()

PrescalesVetosFractHelper * PrescalesVetosFractHelper::readAndWriteFromEventSetup ( const L1TGlobalPrescalesVetosFract es)
static

Definition at line 9 of file PrescalesVetosFractHelper.cc.

10  {
12  x->useCopy();
13  return x;
14 }

References PrescalesVetosFractHelper().

◆ readFromEventSetup()

const PrescalesVetosFractHelper * PrescalesVetosFractHelper::readFromEventSetup ( const L1TGlobalPrescalesVetosFract es)
static

Definition at line 5 of file PrescalesVetosFractHelper.cc.

5  {
6  return new PrescalesVetosFractHelper(es);
7 }

References PrescalesVetosFractHelper().

Referenced by l1t::L1TGlobalUtil::retrieveL1Setup().

◆ setBxMaskDefault()

void l1t::PrescalesVetosFractHelper::setBxMaskDefault ( int  value)
inline

◆ setPrescaleFactorTable()

void l1t::PrescalesVetosFractHelper::setPrescaleFactorTable ( std::vector< std::vector< double > >  value)
inline

◆ setTriggerAlgoBxMask()

void l1t::PrescalesVetosFractHelper::setTriggerAlgoBxMask ( std::map< int, std::vector< int > >  value)
inline

◆ setTriggerMaskVeto()

void l1t::PrescalesVetosFractHelper::setTriggerMaskVeto ( std::vector< int >  value)
inline

◆ triggerAlgoBxMask()

const std::map<int, std::vector<int> >& l1t::PrescalesVetosFractHelper::triggerAlgoBxMask ( ) const
inline

Definition at line 62 of file PrescalesVetosFractHelper.h.

62 { return read_->bxmask_map_; };

References L1TGlobalPrescalesVetosFract::bxmask_map_, and read_.

◆ triggerMaskVeto()

const std::vector<int>& l1t::PrescalesVetosFractHelper::triggerMaskVeto ( ) const
inline

Definition at line 56 of file PrescalesVetosFractHelper.h.

56 { return read_->veto_; };

References read_, and L1TGlobalPrescalesVetosFract::veto_.

Referenced by L1TGlobalProducer::produce().

◆ useCopy()

void PrescalesVetosFractHelper::useCopy ( )
private

Definition at line 29 of file PrescalesVetosFractHelper.cc.

29  {
31  we_own_write_ = true;
32  read_ = write_;
33 }

References read_, we_own_write_, and write_.

Member Data Documentation

◆ read_

const L1TGlobalPrescalesVetosFract* l1t::PrescalesVetosFractHelper::read_
private

◆ we_own_write_

bool l1t::PrescalesVetosFractHelper::we_own_write_
private

◆ write_

L1TGlobalPrescalesVetosFract* l1t::PrescalesVetosFractHelper::write_
private
L1TGlobalPrescalesVetosFract::veto_
std::vector< int > veto_
Definition: L1TGlobalPrescalesVetosFract.h:24
l1t::PrescalesVetosFractHelper::PrescalesVetosFractHelper
PrescalesVetosFractHelper(L1TGlobalPrescalesVetosFract *w)
Definition: PrescalesVetosFractHelper.cc:16
l1t::PrescalesVetosFractHelper::read_
const L1TGlobalPrescalesVetosFract * read_
Definition: PrescalesVetosFractHelper.h:77
cms::cuda::assert
assert(be >=bs)
DDAxes::x
l1t::PrescalesVetosFractHelper::check_write
void check_write()
Definition: PrescalesVetosFractHelper.h:75
w
const double w
Definition: UKUtility.cc:23
l1t::PrescalesVetosFractHelper
Definition: PrescalesVetosFractHelper.h:32
l1t::PrescalesVetosFractHelper::VERSION_
Definition: PrescalesVetosFractHelper.h:34
L1TGlobalPrescalesVetosFract
Definition: L1TGlobalPrescalesVetosFract.h:13
l1t::PrescalesVetosFractHelper::write_
L1TGlobalPrescalesVetosFract * write_
Definition: PrescalesVetosFractHelper.h:78
L1TGlobalPrescalesVetosFract::prescale_table_
std::vector< std::vector< double > > prescale_table_
Definition: L1TGlobalPrescalesVetosFract.h:21
L1TGlobalPrescalesVetosFract::bxmask_default_
int bxmask_default_
Definition: L1TGlobalPrescalesVetosFract.h:22
L1TGlobalPrescalesVetosFract::version_
unsigned int version_
Definition: L1TGlobalPrescalesVetosFract.h:20
relativeConstraints.value
value
Definition: relativeConstraints.py:53
l1t::PrescalesVetosFractHelper::we_own_write_
bool we_own_write_
Definition: PrescalesVetosFractHelper.h:79
L1TGlobalPrescalesVetosFract::bxmask_map_
std::map< int, std::vector< int > > bxmask_map_
Definition: L1TGlobalPrescalesVetosFract.h:23