ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
TrigConf::Random Class Reference

#include <Random.h>

Inheritance diagram for TrigConf::Random:
Collaboration diagram for TrigConf::Random:

Public Member Functions

 Random ()
 
virtual ~Random () override=default
 
uint32_t cuts (unsigned int idx) const
 
const std::string & rndmName (unsigned int idx) const
 
int rate1 () const
 
int rate2 () const
 
float getRateFromCut (unsigned int idx) const
 
void setRndmName (uint32_t idx, const std::string &name)
 
void setCut (uint32_t idx, uint32_t cut)
 
void setRate1 (int rate)
 
void setRate2 (int rate)
 
virtual void print (const std::string &indent="", unsigned int detail=1) const override
 
virtual void writeXML (std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
 
unsigned int lvl1MasterTableId () const
 
void setLvl1MasterTableId (unsigned int id)
 
int superMasterTableId () const
 
unsigned int smk () const
 
unsigned int id () const
 
const std::string & name () const
 
const std::string & comment () const
 
unsigned int version () const
 
void setSuperMasterTableId (int id)
 
void setSMK (int id)
 
void setId (unsigned int id)
 
void setName (const std::string &name)
 
void setVersion (unsigned int version)
 
void setComment (const std::string &c)
 
void printNameIdV (const std::string &indent="") const
 
virtual std::string __str__ () const
 

Protected Member Functions

std::ostream & indent (std::ostream &o, int lvl, int size) const
 

Private Attributes

int m_rate1
 
int m_rate2
 
std::string m_names [4]
 
uint32_t m_cuts [4]
 
unsigned int m_Lvl1MasterId
 
unsigned int m_smk
 
unsigned int m_id
 
std::string m_name
 
unsigned int m_version
 
std::string m_comment
 

Detailed Description

Definition at line 16 of file TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h.

Constructor & Destructor Documentation

◆ Random()

Random::Random ( )

Definition at line 12 of file Random.cxx.

12  : L1DataBaseclass(),
13  m_rate1( 0 ), m_rate2( 0 ),
14  m_names{ "Random0", "Random1",
15  "Random2", "Random3" },
16  m_cuts{ 0xffffff, 0xffffff, 0xffffff,
17  0xffffff }
18 {}

◆ ~Random()

virtual TrigConf::Random::~Random ( )
overridevirtualdefault

Member Function Documentation

◆ __str__()

string TrigConfData::__str__ ( ) const
virtualinherited

Reimplemented in TrigConf::HLTChain, TrigConf::HLTPrescaleSet, TrigConf::TriggerItem, and TrigConf::HLTSequence.

Definition at line 50 of file TrigConfData.cxx.

50  {
51  stringstream s;
52  s << *this;
53  return s.str();
54 }

◆ comment()

const std::string& TrigConf::TrigConfData::comment ( ) const
inlineinherited

Definition at line 23 of file TrigConfData.h.

23 {return m_comment;}

◆ cuts()

uint32_t TrigConf::Random::cuts ( unsigned int  idx) const
inline

Definition at line 22 of file TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h.

22 { return m_cuts[idx]; }

◆ getRateFromCut()

float Random::getRateFromCut ( unsigned int  idx) const

Definition at line 21 of file Random.cxx.

21  {
22  int32_t cut = m_cuts[idx];
23  float ucut = abs(cut);
24  return ( 0x1000000 / ( ucut + 1 ) );
25 }

◆ id()

unsigned int TrigConf::TrigConfData::id ( ) const
inlineinherited

Definition at line 21 of file TrigConfData.h.

21 {return m_id;}

◆ indent()

std::ostream & TrigConfData::indent ( std::ostream &  o,
int  lvl,
int  size 
) const
protectedinherited

Definition at line 23 of file TrigConfData.cxx.

23  {
24  int width = lvl*size;
25  if(width==0) return o;
26  o << setw(lvl*size) << " ";
27  return o;
28 }

◆ lvl1MasterTableId()

unsigned int TrigConf::L1DataBaseclass::lvl1MasterTableId ( ) const
inlineinherited

Definition at line 30 of file L1DataBaseclass.h.

30 { return m_Lvl1MasterId; }

◆ name()

const std::string& TrigConf::TrigConfData::name ( ) const
inlineinherited

Definition at line 22 of file TrigConfData.h.

22 {return m_name;}

◆ print()

void Random::print ( const std::string &  indent = "",
unsigned int  detail = 1 
) const
overridevirtual

Implements TrigConf::TrigConfData.

Definition at line 28 of file Random.cxx.

28  {
29  if(detail>=1) {
30  cout << indent << "Random "; printNameIdV();
31  if(detail>=2) {
32  if( m_cuts[0]!=0xffffffff ||
33  m_cuts[1]!=0xffffffff ||
34  m_cuts[2]!=0xffffffff ||
35  m_cuts[3]!=0xffffffff )
36  {
37  for(int i=0; i<4; i++) {
38  cout << indent << " " << m_names[i] << ": cut=" << m_cuts[i] << " (prescale=" << PrescaleSet::getPrescaleFromCut(m_cuts[i]) << ")" << endl;
39  }
40  } else {
41  cout << indent << " Rate 1: " << m_rate1 << endl;
42  cout << indent << " Rate 2: " << m_rate2 << endl;
43  }
44  }
45  }
46 }

◆ printNameIdV()

void TrigConfData::printNameIdV ( const std::string &  indent = "") const
inherited

Definition at line 31 of file TrigConfData.cxx.

31  {
32  cout << indent << name();
33  if(id()>0 || version()>0)
34  cout << " (id=" << id() << "/v=" << version() << ")";
35  cout << endl;
36  if(comment()!="")
37  cout << indent << "Comment: " << comment() << endl;
38 }

◆ rate1()

int TrigConf::Random::rate1 ( ) const
inline

Definition at line 24 of file TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h.

24 { return m_rate1; }

◆ rate2()

int TrigConf::Random::rate2 ( ) const
inline

Definition at line 25 of file TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h.

25 { return m_rate2; }

◆ rndmName()

const std::string& TrigConf::Random::rndmName ( unsigned int  idx) const
inline

Definition at line 23 of file TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h.

23 { return m_names[idx]; }

◆ setComment()

void TrigConf::TrigConfData::setComment ( const std::string &  c)
inlineinherited

Definition at line 32 of file TrigConfData.h.

32 { m_comment = c;}

◆ setCut()

void TrigConf::Random::setCut ( uint32_t  idx,
uint32_t  cut 
)
inline

◆ setId()

void TrigConf::TrigConfData::setId ( unsigned int  id)
inlineinherited

Definition at line 29 of file TrigConfData.h.

29 { m_id=id; }

◆ setLvl1MasterTableId()

void TrigConf::L1DataBaseclass::setLvl1MasterTableId ( unsigned int  id)
inlineinherited

Definition at line 31 of file L1DataBaseclass.h.

31 { m_Lvl1MasterId = id; }

◆ setName()

void TrigConf::TrigConfData::setName ( const std::string &  name)
inlineinherited

Definition at line 30 of file TrigConfData.h.

30 { m_name = name;}

◆ setRate1()

void TrigConf::Random::setRate1 ( int  rate)
inline

Definition at line 31 of file TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h.

31 { m_rate1 = rate; }

◆ setRate2()

void TrigConf::Random::setRate2 ( int  rate)
inline

Definition at line 32 of file TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h.

32 { m_rate2 = rate; }

◆ setRndmName()

void TrigConf::Random::setRndmName ( uint32_t  idx,
const std::string &  name 
)
inline

◆ setSMK()

void TrigConf::TrigConfData::setSMK ( int  id)
inlineinherited

Definition at line 28 of file TrigConfData.h.

28 {m_smk=id;}

◆ setSuperMasterTableId()

void TrigConf::TrigConfData::setSuperMasterTableId ( int  id)
inlineinherited

Definition at line 27 of file TrigConfData.h.

27 {m_smk=id;}

◆ setVersion()

void TrigConf::TrigConfData::setVersion ( unsigned int  version)
inlineinherited

Definition at line 31 of file TrigConfData.h.

31 { m_version = version;}

◆ smk()

unsigned int TrigConf::TrigConfData::smk ( ) const
inlineinherited

Definition at line 20 of file TrigConfData.h.

20 {return m_smk;}

◆ superMasterTableId()

int TrigConf::TrigConfData::superMasterTableId ( ) const
inlineinherited

Definition at line 19 of file TrigConfData.h.

19 {return (int)m_smk;}

◆ version()

unsigned int TrigConf::TrigConfData::version ( ) const
inlineinherited

Definition at line 24 of file TrigConfData.h.

24 {return m_version;}

◆ writeXML()

void Random::writeXML ( std::ostream &  xmlfile,
int  indentLevel = 0,
int  indentWidth = 2 
) const
virtual

Definition at line 49 of file Random.cxx.

49  {
50  if( m_cuts[0]!=0xffffffff ||
51  m_cuts[1]!=0xffffffff ||
52  m_cuts[2]!=0xffffffff ||
53  m_cuts[3]!=0xffffffff )
54  {
55  indent(xmlfile,indentLevel, indentWidth)
56  << "<Random "
57  << "name0=\""<< m_names[0] << "\" cut0=\"" << m_cuts[0] << "\" "
58  << "name1=\""<< m_names[1] << "\" cut1=\"" << m_cuts[1] << "\" "
59  << "name2=\""<< m_names[2] << "\" cut2=\"" << m_cuts[2] << "\" "
60  << "name3=\""<< m_names[3] << "\" cut3=\"" << m_cuts[3] << "\"/>" << endl;
61  } else {
62  indent(xmlfile,indentLevel, indentWidth)
63  << "<Random name=\"" << name() << "\" rate1=\"" << m_rate1
64  << "\" rate2=\"" << m_rate2
65  << "\" seed1=\"1\" seed2=\"1\"/>" << endl;
66  }
67 }

Member Data Documentation

◆ m_comment

std::string TrigConf::TrigConfData::m_comment
privateinherited

Definition at line 48 of file TrigConfData.h.

◆ m_cuts

uint32_t TrigConf::Random::m_cuts[4]
private

◆ m_id

unsigned int TrigConf::TrigConfData::m_id
privateinherited

Definition at line 45 of file TrigConfData.h.

◆ m_Lvl1MasterId

unsigned int TrigConf::L1DataBaseclass::m_Lvl1MasterId
privateinherited

Definition at line 35 of file L1DataBaseclass.h.

◆ m_name

std::string TrigConf::TrigConfData::m_name
privateinherited

Definition at line 46 of file TrigConfData.h.

◆ m_names

std::string TrigConf::Random::m_names[4]
private

◆ m_rate1

int TrigConf::Random::m_rate1
private

◆ m_rate2

int TrigConf::Random::m_rate2
private

◆ m_smk

unsigned int TrigConf::TrigConfData::m_smk
privateinherited

Definition at line 44 of file TrigConfData.h.

◆ m_version

unsigned int TrigConf::TrigConfData::m_version
privateinherited

Definition at line 47 of file TrigConfData.h.


The documentation for this class was generated from the following files:
TrigConf::TrigConfData::m_id
unsigned int m_id
Definition: TrigConfData.h:45
TrigConf::TrigConfData::m_name
std::string m_name
Definition: TrigConfData.h:46
TrigConf::TrigConfData::name
const std::string & name() const
Definition: TrigConfData.h:22
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrigConf::Random::m_rate2
int m_rate2
Definition: TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h:39
TrigConf::TrigConfData::comment
const std::string & comment() const
Definition: TrigConfData.h:23
TrigConf::L1DataBaseclass::L1DataBaseclass
L1DataBaseclass()
Definition: L1DataBaseclass.h:24
detail
Definition: extract_histogram_tag.cxx:14
TrigConf::Random::m_names
std::string m_names[4]
Definition: TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h:40
TrigConf::TrigConfData::m_version
unsigned int m_version
Definition: TrigConfData.h:47
TrigConf::Random::m_cuts
uint32_t m_cuts[4]
Definition: TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h:41
TrigConf::L1DataBaseclass::m_Lvl1MasterId
unsigned int m_Lvl1MasterId
Definition: L1DataBaseclass.h:35
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TrigConf::PrescaleSet::getPrescaleFromCut
static double getPrescaleFromCut(int32_t cut)
prescale = 2*24/(cut+1.)
Definition: PrescaleSet.cxx:52
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigConf::TrigConfData::m_comment
std::string m_comment
Definition: TrigConfData.h:48
TrigConf::TrigConfData::version
unsigned int version() const
Definition: TrigConfData.h:24
BindingsTest.cut
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
Definition: BindingsTest.py:13
TrigConf::TrigConfData::id
unsigned int id() const
Definition: TrigConfData.h:21
TrigConf::TrigConfData::m_smk
unsigned int m_smk
Definition: TrigConfData.h:44
TrigConf::Random::m_rate1
int m_rate1
Definition: TrigConfiguration/TrigConfL1Data/TrigConfL1Data/Random.h:38
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition: TrigConfData.cxx:23
python.compressB64.c
def c
Definition: compressB64.py:93
TrigConf::TrigConfData::printNameIdV
void printNameIdV(const std::string &indent="") const
Definition: TrigConfData.cxx:31