CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends
L1GtCorrelationTemplate Class Reference

#include <L1GtCorrelationTemplate.h>

Inheritance diagram for L1GtCorrelationTemplate:
L1GtCondition

Classes

struct  CorrelationParameter
 typedef for correlation parameters More...
 

Public Member Functions

const L1GtConditionCategory cond0Category () const
 get / set the category of the two sub-conditions More...
 
const int cond0Index () const
 get / set the index of the two sub-conditions in the cor* vector from menu More...
 
const L1GtConditionCategory cond1Category () const
 
const int cond1Index () const
 
const CorrelationParametercorrelationParameter () const
 get / set correlation parameters More...
 
 L1GtCorrelationTemplate ()
 
 L1GtCorrelationTemplate (const std::string &)
 from condition name More...
 
 L1GtCorrelationTemplate (const std::string &, const L1GtConditionCategory &, const L1GtConditionCategory &, const int, const int)
 
 L1GtCorrelationTemplate (const L1GtCorrelationTemplate &)
 copy constructor More...
 
L1GtCorrelationTemplateoperator= (const L1GtCorrelationTemplate &)
 assign operator More...
 
void print (std::ostream &myCout) const override
 print the condition More...
 
void setCond0Category (const L1GtConditionCategory &)
 
void setCond0Index (const int &)
 
void setCond1Category (const L1GtConditionCategory &)
 
void setCond1Index (const int &)
 
void setCorrelationParameter (const CorrelationParameter &corrParameter)
 
 ~L1GtCorrelationTemplate () override
 destructor More...
 
- Public Member Functions inherited from L1GtCondition
const L1GtConditionCategorycondCategory () const
 get / set the category of the condition More...
 
const int & condChipNr () const
 get / set the condition-chip number the condition is located on More...
 
const bool condGEq () const
 get / set condition GEq flag More...
 
const std::string & condName () const
 get / set condition name More...
 
const L1GtConditionTypecondType () const
 get / set the type of the condition (1s, etc) More...
 
const bool corr () const
 
 L1GtCondition ()
 
 L1GtCondition (const std::string &)
 constructor from condition name More...
 
 L1GtCondition (const std::string &, const L1GtConditionCategory &, const L1GtConditionType &)
 constructor from condition name, category and type More...
 
const int nrObjects () const
 get number of trigger objects More...
 
const std::vector< L1GtObject > & objectType () const
 get / set the trigger object type(s) in the condition More...
 
void setCondCategory (const L1GtConditionCategory &cCategory)
 
void setCondChipNr (const int &cChipNr)
 
void setCondGEq (const bool &cGEq)
 
void setCondName (const std::string &cName)
 
void setCondType (const L1GtConditionType &cType)
 
void setObjectType (const std::vector< L1GtObject > &objType)
 
const bool wsc () const
 
virtual ~L1GtCondition ()
 destructor More...
 

Private Member Functions

void copy (const L1GtCorrelationTemplate &cp)
 copy function for copy constructor and operator= More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

L1GtConditionCategory m_cond0Category
 
int m_cond0Index
 
L1GtConditionCategory m_cond1Category
 
int m_cond1Index
 
CorrelationParameter m_correlationParameter
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 
std::ostream & operator<< (std::ostream &, const L1GtCorrelationTemplate &)
 output stream operator More...
 

Additional Inherited Members

- Protected Attributes inherited from L1GtCondition
L1GtConditionCategory m_condCategory
 the category of the condition More...
 
int m_condChipNr
 condition is located on condition chip m_condChipNr More...
 
bool m_condGEq
 the operator used for the condition (>=, =): true for >= More...
 
std::string m_condName
 the name of the condition More...
 
L1GtConditionType m_condType
 the type of the condition (1s, etc) More...
 
std::vector< L1GtObjectm_objectType
 the trigger object type(s) More...
 

Detailed Description

Description: L1 Global Trigger correlation template. Includes spatial correlation for two objects of different type.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 37 of file L1GtCorrelationTemplate.h.

Constructor & Destructor Documentation

◆ L1GtCorrelationTemplate() [1/4]

L1GtCorrelationTemplate::L1GtCorrelationTemplate ( )

constructor(s) default

Definition at line 36 of file L1GtCorrelationTemplate.cc.

References CondCorrelation, CondNull, m_cond0Category, m_cond0Index, m_cond1Category, m_cond1Index, L1GtCondition::m_condCategory, L1GtCondition::m_condChipNr, L1GtCondition::m_condType, L1GtCondition::m_objectType, L1GtCondition::nrObjects(), and Type2cor.

36  : L1GtCondition() {
39  m_condChipNr = -1;
40 
41  // there are in fact two objects
42  int nObjects = nrObjects();
43 
44  if (nObjects > 0) {
45  m_objectType.reserve(nObjects);
46  }
47 
50  m_cond0Index = -1;
51  m_cond1Index = -1;
52 }
L1GtConditionCategory m_cond0Category
std::vector< L1GtObject > m_objectType
the trigger object type(s)
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
L1GtConditionCategory m_cond1Category
const int nrObjects() const
get number of trigger objects
int m_condChipNr
condition is located on condition chip m_condChipNr

◆ L1GtCorrelationTemplate() [2/4]

L1GtCorrelationTemplate::L1GtCorrelationTemplate ( const std::string &  cName)

from condition name

Definition at line 55 of file L1GtCorrelationTemplate.cc.

References CondCorrelation, CondNull, m_cond0Category, m_cond0Index, m_cond1Category, m_cond1Index, L1GtCondition::m_condCategory, L1GtCondition::m_condChipNr, L1GtCondition::m_condType, L1GtCondition::m_objectType, L1GtCondition::nrObjects(), and Type2cor.

55  : L1GtCondition(cName) {
58  m_condChipNr = -1;
59 
60  // there are in fact two objects
61  int nObjects = nrObjects();
62 
63  if (nObjects > 0) {
64  m_objectType.reserve(nObjects);
65  }
66 
69  m_cond0Index = -1;
70  m_cond1Index = -1;
71 }
L1GtConditionCategory m_cond0Category
std::vector< L1GtObject > m_objectType
the trigger object type(s)
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
L1GtConditionCategory m_cond1Category
const int nrObjects() const
get number of trigger objects
int m_condChipNr
condition is located on condition chip m_condChipNr

◆ L1GtCorrelationTemplate() [3/4]

L1GtCorrelationTemplate::L1GtCorrelationTemplate ( const std::string &  cName,
const L1GtConditionCategory cond0Cat,
const L1GtConditionCategory cond1Cat,
const int  cond0Index,
const int  cond1index 
)

from condition name, the category of first sub-condition, the category of the second sub-condition, the index of first sub-condition in the cor* vector, the index of second sub-condition in the cor* vector

Definition at line 76 of file L1GtCorrelationTemplate.cc.

References CondCorrelation, L1GtCondition::m_condCategory, L1GtCondition::m_condChipNr, L1GtCondition::m_condType, L1GtCondition::m_objectType, L1GtCondition::nrObjects(), and Type2cor.

81  : L1GtCondition(cName),
82  m_cond0Category(cond0Cat),
83  m_cond1Category(cond1Cat),
85  m_cond1Index(cond1index)
86 
87 {
90  m_condChipNr = -1;
91 
92  // there are in fact two objects
93  int nObjects = nrObjects();
94 
95  if (nObjects > 0) {
96  m_objectType.resize(nObjects);
97  }
98 }
L1GtConditionCategory m_cond0Category
std::vector< L1GtObject > m_objectType
the trigger object type(s)
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
L1GtConditionCategory m_cond1Category
const int nrObjects() const
get number of trigger objects
int m_condChipNr
condition is located on condition chip m_condChipNr

◆ L1GtCorrelationTemplate() [4/4]

L1GtCorrelationTemplate::L1GtCorrelationTemplate ( const L1GtCorrelationTemplate cp)

copy constructor

Definition at line 101 of file L1GtCorrelationTemplate.cc.

References copy().

101  : L1GtCondition(cp.m_condName) {
102  copy(cp);
103 }
void copy(const L1GtCorrelationTemplate &cp)
copy function for copy constructor and operator=

◆ ~L1GtCorrelationTemplate()

L1GtCorrelationTemplate::~L1GtCorrelationTemplate ( )
override

destructor

Definition at line 106 of file L1GtCorrelationTemplate.cc.

106  {
107  // empty now
108 }

Member Function Documentation

◆ cond0Category()

const L1GtConditionCategory L1GtCorrelationTemplate::cond0Category ( ) const
inline

get / set the category of the two sub-conditions

Definition at line 74 of file L1GtCorrelationTemplate.h.

References m_cond0Category.

Referenced by L1GtCorrelationCondition::evaluateCondition(), and L1GlobalTriggerGTL::run().

74 { return m_cond0Category; }
L1GtConditionCategory m_cond0Category

◆ cond0Index()

const int L1GtCorrelationTemplate::cond0Index ( ) const
inline

get / set the index of the two sub-conditions in the cor* vector from menu

Definition at line 82 of file L1GtCorrelationTemplate.h.

References m_cond0Index.

Referenced by L1GlobalTriggerGTL::run().

◆ cond1Category()

const L1GtConditionCategory L1GtCorrelationTemplate::cond1Category ( ) const
inline

Definition at line 76 of file L1GtCorrelationTemplate.h.

References m_cond1Category.

Referenced by L1GtCorrelationCondition::evaluateCondition(), and L1GlobalTriggerGTL::run().

76 { return m_cond1Category; }
L1GtConditionCategory m_cond1Category

◆ cond1Index()

const int L1GtCorrelationTemplate::cond1Index ( ) const
inline

Definition at line 84 of file L1GtCorrelationTemplate.h.

References m_cond1Index.

Referenced by L1GlobalTriggerGTL::run().

◆ copy()

void L1GtCorrelationTemplate::copy ( const L1GtCorrelationTemplate cp)
private

copy function for copy constructor and operator=

Definition at line 153 of file L1GtCorrelationTemplate.cc.

References m_cond0Category, m_cond0Index, m_cond1Category, m_cond1Index, L1GtCondition::m_condCategory, L1GtCondition::m_condChipNr, L1GtCondition::m_condGEq, L1GtCondition::m_condName, L1GtCondition::m_condType, m_correlationParameter, and L1GtCondition::m_objectType.

Referenced by SequenceTypes._TaskBase::copyAndAdd(), L1GtCorrelationTemplate(), and operator=().

153  {
154  m_condName = cp.condName();
155  m_condCategory = cp.condCategory();
156  m_condType = cp.condType();
157  m_objectType = cp.objectType();
158  m_condGEq = cp.condGEq();
159  m_condChipNr = cp.condChipNr();
160 
161  m_cond0Category = cp.cond0Category();
162  m_cond1Category = cp.cond1Category();
163  m_cond0Index = cp.cond0Index();
164  m_cond1Index = cp.cond1Index();
165 
166  m_correlationParameter = *(cp.correlationParameter());
167 }
L1GtConditionCategory m_cond0Category
std::vector< L1GtObject > m_objectType
the trigger object type(s)
L1GtConditionType m_condType
the type of the condition (1s, etc)
L1GtConditionCategory m_condCategory
the category of the condition
std::string m_condName
the name of the condition
L1GtConditionCategory m_cond1Category
bool m_condGEq
the operator used for the condition (>=, =): true for >=
int m_condChipNr
condition is located on condition chip m_condChipNr
CorrelationParameter m_correlationParameter

◆ correlationParameter()

const CorrelationParameter* L1GtCorrelationTemplate::correlationParameter ( ) const
inline

get / set correlation parameters

Definition at line 91 of file L1GtCorrelationTemplate.h.

References m_correlationParameter.

Referenced by L1GtCorrelationCondition::evaluateCondition().

91 { return &m_correlationParameter; }
CorrelationParameter m_correlationParameter

◆ operator=()

L1GtCorrelationTemplate & L1GtCorrelationTemplate::operator= ( const L1GtCorrelationTemplate cp)

assign operator

Definition at line 111 of file L1GtCorrelationTemplate.cc.

References copy().

111  {
112  copy(cp);
113  return *this;
114 }
void copy(const L1GtCorrelationTemplate &cp)
copy function for copy constructor and operator=

◆ print()

void L1GtCorrelationTemplate::print ( std::ostream &  myCout) const
overridevirtual

print the condition

Reimplemented from L1GtCondition.

Definition at line 131 of file L1GtCorrelationTemplate.cc.

References TauDecayModes::dec, L1GtCorrelationTemplate::CorrelationParameter::deltaEtaRange, L1GtCorrelationTemplate::CorrelationParameter::deltaPhiMaxbits, L1GtCorrelationTemplate::CorrelationParameter::deltaPhiRange, m_cond0Category, m_cond0Index, m_cond1Category, m_cond1Index, m_correlationParameter, and L1GtCondition::print().

Referenced by L1GtCorrelationCondition::print().

131  {
132  myCout << "\n L1GtCorrelationTemplate print..." << std::endl;
133 
134  L1GtCondition::print(myCout);
135 
136  myCout << "\n First sub-condition category: " << m_cond0Category << std::endl;
137  myCout << " Second sub-condition category: " << m_cond1Category << std::endl;
138 
139  myCout << "\n First sub-condition index: " << m_cond0Index << std::endl;
140  myCout << " Second sub-condition index: " << m_cond1Index << std::endl;
141 
142  myCout << "\n Correlation parameters "
143  << "[ hex ]" << std::endl;
144 
145  myCout << " deltaEtaRange = " << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
146  myCout << " deltaPhiRange = " << std::hex << m_correlationParameter.deltaPhiRange << std::endl;
147  myCout << " deltaPhiMaxbits = " << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
148 
149  // reset to decimal output
150  myCout << std::dec << std::endl;
151 }
L1GtConditionCategory m_cond0Category
L1GtConditionCategory m_cond1Category
virtual void print(std::ostream &myCout) const
print condition
CorrelationParameter m_correlationParameter

◆ serialize()

template<class Archive >
void L1GtCorrelationTemplate::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setCond0Category()

void L1GtCorrelationTemplate::setCond0Category ( const L1GtConditionCategory condCateg)

Definition at line 117 of file L1GtCorrelationTemplate.cc.

References m_cond0Category.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCorrelationCondition().

117 { m_cond0Category = condCateg; }
L1GtConditionCategory m_cond0Category

◆ setCond0Index()

void L1GtCorrelationTemplate::setCond0Index ( const int &  condIndex)

◆ setCond1Category()

void L1GtCorrelationTemplate::setCond1Category ( const L1GtConditionCategory condCateg)

Definition at line 119 of file L1GtCorrelationTemplate.cc.

References m_cond1Category.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCorrelationCondition().

119 { m_cond1Category = condCateg; }
L1GtConditionCategory m_cond1Category

◆ setCond1Index()

void L1GtCorrelationTemplate::setCond1Index ( const int &  condIndex)

◆ setCorrelationParameter()

void L1GtCorrelationTemplate::setCorrelationParameter ( const CorrelationParameter corrParameter)

Definition at line 127 of file L1GtCorrelationTemplate.cc.

References m_correlationParameter.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCorrelationCondition().

127  {
128  m_correlationParameter = corrParameter;
129 }
CorrelationParameter m_correlationParameter

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 112 of file L1GtCorrelationTemplate.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 112 of file L1GtCorrelationTemplate.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const L1GtCorrelationTemplate result 
)
friend

output stream operator

Definition at line 170 of file L1GtCorrelationTemplate.cc.

170  {
171  result.print(os);
172  return os;
173 }

Member Data Documentation

◆ m_cond0Category

L1GtConditionCategory L1GtCorrelationTemplate::m_cond0Category
private

◆ m_cond0Index

int L1GtCorrelationTemplate::m_cond0Index
private

◆ m_cond1Category

L1GtConditionCategory L1GtCorrelationTemplate::m_cond1Category
private

◆ m_cond1Index

int L1GtCorrelationTemplate::m_cond1Index
private

◆ m_correlationParameter

CorrelationParameter L1GtCorrelationTemplate::m_correlationParameter
private