CMS 3D CMS Logo

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

#include <PrescalesVetosHelper.h>

Public Types

enum  { VERSION_ = 1 }
 

Public Member Functions

int bxMaskDefault () const
 
const L1TGlobalPrescalesVetosgetReadInstance () const
 
L1TGlobalPrescalesVetosgetWriteInstance ()
 
 PrescalesVetosHelper (L1TGlobalPrescalesVetos *w)
 
const std::vector< std::vector< int > > & prescaleTable () const
 
void setBxMaskDefault (int value)
 
void setPrescaleFactorTable (std::vector< std::vector< int > > 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
 
 ~PrescalesVetosHelper ()
 

Static Public Member Functions

static PrescalesVetosHelperreadAndWriteFromEventSetup (const L1TGlobalPrescalesVetos *es)
 
static const PrescalesVetosHelperreadFromEventSetup (const L1TGlobalPrescalesVetos *es)
 

Private Member Functions

void check_write ()
 
 PrescalesVetosHelper (const L1TGlobalPrescalesVetos *es)
 
void useCopy ()
 

Private Attributes

const L1TGlobalPrescalesVetosread_
 
bool we_own_write_
 
L1TGlobalPrescalesVetoswrite_
 

Detailed Description

Definition at line 32 of file PrescalesVetosHelper.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
VERSION_ 

Definition at line 34 of file PrescalesVetosHelper.h.

34 { VERSION_ = 1 };

Constructor & Destructor Documentation

◆ ~PrescalesVetosHelper()

PrescalesVetosHelper::~PrescalesVetosHelper ( )

Definition at line 34 of file PrescalesVetosHelper.cc.

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

References we_own_write_, and write_.

◆ PrescalesVetosHelper() [1/2]

PrescalesVetosHelper::PrescalesVetosHelper ( L1TGlobalPrescalesVetos w)

Definition at line 15 of file PrescalesVetosHelper.cc.

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

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

Referenced by readAndWriteFromEventSetup(), and readFromEventSetup().

◆ PrescalesVetosHelper() [2/2]

PrescalesVetosHelper::PrescalesVetosHelper ( const L1TGlobalPrescalesVetos es)
private

Definition at line 23 of file PrescalesVetosHelper.cc.

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

References read_, and write_.

Member Function Documentation

◆ bxMaskDefault()

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

Definition at line 45 of file PrescalesVetosHelper.h.

45 { return read_->bxmask_default_; };

References L1TGlobalPrescalesVetos::bxmask_default_, and read_.

◆ check_write()

void l1t::PrescalesVetosHelper::check_write ( )
inlineprivate

◆ getReadInstance()

const L1TGlobalPrescalesVetos* l1t::PrescalesVetosHelper::getReadInstance ( ) const
inline

Definition at line 69 of file PrescalesVetosHelper.h.

69 { return read_; }

References read_.

◆ getWriteInstance()

L1TGlobalPrescalesVetos* l1t::PrescalesVetosHelper::getWriteInstance ( )
inline

◆ prescaleTable()

const std::vector<std::vector<int> >& l1t::PrescalesVetosHelper::prescaleTable ( ) const
inline

Definition at line 51 of file PrescalesVetosHelper.h.

51 { return read_->prescale_table_; };

References L1TGlobalPrescalesVetos::prescale_table_, and read_.

Referenced by L1TGlobalProducer::produce().

◆ readAndWriteFromEventSetup()

PrescalesVetosHelper * PrescalesVetosHelper::readAndWriteFromEventSetup ( const L1TGlobalPrescalesVetos es)
static

Definition at line 9 of file PrescalesVetosHelper.cc.

9  {
11  x->useCopy();
12  return x;
13 }

References PrescalesVetosHelper().

◆ readFromEventSetup()

const PrescalesVetosHelper * PrescalesVetosHelper::readFromEventSetup ( const L1TGlobalPrescalesVetos es)
static

Definition at line 5 of file PrescalesVetosHelper.cc.

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

References PrescalesVetosHelper().

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

◆ setBxMaskDefault()

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

◆ setPrescaleFactorTable()

void l1t::PrescalesVetosHelper::setPrescaleFactorTable ( std::vector< std::vector< int > >  value)
inline

◆ setTriggerAlgoBxMask()

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

◆ setTriggerMaskVeto()

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

◆ triggerAlgoBxMask()

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

Definition at line 62 of file PrescalesVetosHelper.h.

62 { return read_->bxmask_map_; };

References L1TGlobalPrescalesVetos::bxmask_map_, and read_.

◆ triggerMaskVeto()

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

Definition at line 56 of file PrescalesVetosHelper.h.

56 { return read_->veto_; };

References read_, and L1TGlobalPrescalesVetos::veto_.

Referenced by L1TGlobalProducer::produce().

◆ useCopy()

void PrescalesVetosHelper::useCopy ( )
private

Definition at line 28 of file PrescalesVetosHelper.cc.

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

References PrescalesVetos_cff::L1TGlobalPrescalesVetos, read_, we_own_write_, and write_.

Member Data Documentation

◆ read_

const L1TGlobalPrescalesVetos* l1t::PrescalesVetosHelper::read_
private

◆ we_own_write_

bool l1t::PrescalesVetosHelper::we_own_write_
private

Definition at line 79 of file PrescalesVetosHelper.h.

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

◆ write_

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