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...
 
virtual void print (std::ostream &myCout) const
 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)
 
virtual ~L1GtCorrelationTemplate ()
 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 39 of file L1GtCorrelationTemplate.h.

Constructor & Destructor Documentation

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.

37  : L1GtCondition()
38 {
39 
42  m_condChipNr = -1;
43 
44  // there are in fact two objects
45  int nObjects = nrObjects();
46 
47  if (nObjects > 0) {
48  m_objectType.reserve(nObjects);
49  }
50 
53  m_cond0Index = -1;
54  m_cond1Index = -1;
55 
56 }
const int nrObjects() const
get number of trigger objects
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
int m_condChipNr
condition is located on condition chip m_condChipNr
L1GtCorrelationTemplate::L1GtCorrelationTemplate ( const std::string &  cName)

from condition name

Definition at line 59 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.

60  : L1GtCondition(cName)
61 {
62 
65  m_condChipNr = -1;
66 
67  // there are in fact two objects
68  int nObjects = nrObjects();
69 
70  if (nObjects > 0) {
71  m_objectType.reserve(nObjects);
72  }
73 
76  m_cond0Index = -1;
77  m_cond1Index = -1;
78 
79 }
const int nrObjects() const
get number of trigger objects
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
int m_condChipNr
condition is located on condition chip m_condChipNr
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 84 of file L1GtCorrelationTemplate.cc.

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

88  :
89  L1GtCondition(cName),
90  m_cond0Category(cond0Cat),
91  m_cond1Category(cond1Cat),
93  m_cond1Index(cond1index)
94 
95 {
96 
99  m_condChipNr = -1;
100 
101  // there are in fact two objects
102  int nObjects = nrObjects();
103 
104  if (nObjects> 0) {
105  m_objectType.resize(nObjects);
106  }
107 }
const int nrObjects() const
get number of trigger objects
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
int m_condChipNr
condition is located on condition chip m_condChipNr
L1GtCorrelationTemplate::L1GtCorrelationTemplate ( const L1GtCorrelationTemplate cp)

copy constructor

Definition at line 110 of file L1GtCorrelationTemplate.cc.

References copy().

112 {
113  copy(cp);
114 }
void copy(const L1GtCorrelationTemplate &cp)
copy function for copy constructor and operator=
std::string m_condName
the name of the condition
L1GtCorrelationTemplate::~L1GtCorrelationTemplate ( )
virtual

destructor

Definition at line 117 of file L1GtCorrelationTemplate.cc.

118 {
119  // empty now
120 }

Member Function Documentation

const L1GtConditionCategory L1GtCorrelationTemplate::cond0Category ( ) const
inline

get / set the category of the two sub-conditions

Definition at line 84 of file L1GtCorrelationTemplate.h.

References m_cond0Category.

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

84  {
85  return m_cond0Category;
86  }
L1GtConditionCategory m_cond0Category
const int L1GtCorrelationTemplate::cond0Index ( ) const
inline

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

Definition at line 96 of file L1GtCorrelationTemplate.h.

References m_cond0Index.

Referenced by copy(), and L1GlobalTriggerGTL::run().

96  {
97  return m_cond0Index;
98  }
const L1GtConditionCategory L1GtCorrelationTemplate::cond1Category ( ) const
inline
const int L1GtCorrelationTemplate::cond1Index ( ) const
inline

Definition at line 100 of file L1GtCorrelationTemplate.h.

References m_cond1Index, setCond0Index(), and setCond1Index().

Referenced by copy(), and L1GlobalTriggerGTL::run().

100  {
101  return m_cond1Index;
102  }
void L1GtCorrelationTemplate::copy ( const L1GtCorrelationTemplate cp)
private

copy function for copy constructor and operator=

Definition at line 189 of file L1GtCorrelationTemplate.cc.

References cond0Category(), cond0Index(), cond1Category(), cond1Index(), L1GtCondition::condCategory(), L1GtCondition::condChipNr(), L1GtCondition::condGEq(), L1GtCondition::condName(), L1GtCondition::condType(), correlationParameter(), 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, L1GtCondition::m_objectType, and L1GtCondition::objectType().

Referenced by correlationParameter(), L1GtCorrelationTemplate(), and operator=().

190 {
191 
192  m_condName = cp.condName();
194  m_condType = cp.condType();
195  m_objectType = cp.objectType();
196  m_condGEq = cp.condGEq();
197  m_condChipNr = cp.condChipNr();
198 
201  m_cond0Index = cp.cond0Index();
202  m_cond1Index = cp.cond1Index();
203 
205 
206 }
L1GtConditionCategory m_cond0Category
const std::string & condName() const
get / set condition name
Definition: L1GtCondition.h:57
const int & condChipNr() const
get / set the condition-chip number the condition is located on
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: L1GtCondition.h:90
std::vector< L1GtObject > m_objectType
the trigger object type(s)
L1GtConditionType m_condType
the type of the condition (1s, etc)
const L1GtConditionCategory cond1Category() const
L1GtConditionCategory m_condCategory
the category of the condition
const L1GtConditionType & condType() const
get / set the type of the condition (1s, etc)
Definition: L1GtCondition.h:79
std::string m_condName
the name of the condition
const L1GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
const L1GtConditionCategory & condCategory() const
get / set the category of the condition
Definition: L1GtCondition.h:68
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
L1GtConditionCategory m_cond1Category
bool m_condGEq
the operator used for the condition (>=, =): true for >=
const bool condGEq() const
get / set condition GEq flag
const CorrelationParameter * correlationParameter() const
get / set correlation parameters
int m_condChipNr
condition is located on condition chip m_condChipNr
CorrelationParameter m_correlationParameter
const CorrelationParameter* L1GtCorrelationTemplate::correlationParameter ( ) const
inline

get / set correlation parameters

Definition at line 109 of file L1GtCorrelationTemplate.h.

References copy(), SimDataFormats::CaloAnalysis::cp, m_correlationParameter, operator<<, print(), and setCorrelationParameter().

Referenced by copy(), and L1GtCorrelationCondition::evaluateCondition().

110  {
111  return &m_correlationParameter;
112  }
CorrelationParameter m_correlationParameter
L1GtCorrelationTemplate & L1GtCorrelationTemplate::operator= ( const L1GtCorrelationTemplate cp)

assign operator

Definition at line 123 of file L1GtCorrelationTemplate.cc.

References copy().

124 {
125 
126  copy(cp);
127  return *this;
128 }
void copy(const L1GtCorrelationTemplate &cp)
copy function for copy constructor and operator=
void L1GtCorrelationTemplate::print ( std::ostream &  myCout) const
virtual

print the condition

Reimplemented from L1GtCondition.

Definition at line 162 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 correlationParameter(), operator<<(), and L1GtCorrelationCondition::print().

163 {
164 
165  myCout << "\n L1GtCorrelationTemplate print..." << std::endl;
166 
167  L1GtCondition::print(myCout);
168 
169  myCout << "\n First sub-condition category: " << m_cond0Category << std::endl;
170  myCout << " Second sub-condition category: " << m_cond1Category << std::endl;
171 
172  myCout << "\n First sub-condition index: " << m_cond0Index << std::endl;
173  myCout << " Second sub-condition index: " << m_cond1Index << std::endl;
174 
175  myCout << "\n Correlation parameters " << "[ hex ]" << std::endl;
176 
177 
178  myCout << " deltaEtaRange = "
179  << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
180  myCout << " deltaPhiRange = "
181  << std::hex << m_correlationParameter.deltaPhiRange << std::endl;
182  myCout << " deltaPhiMaxbits = "
183  << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
184 
185  // reset to decimal output
186  myCout << std::dec << std::endl;
187 }
L1GtConditionCategory m_cond0Category
virtual void print(std::ostream &myCout) const
print condition
L1GtConditionCategory m_cond1Category
CorrelationParameter m_correlationParameter
template<class Archive >
void L1GtCorrelationTemplate::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void L1GtCorrelationTemplate::setCond0Category ( const L1GtConditionCategory condCateg)

Definition at line 131 of file L1GtCorrelationTemplate.cc.

References m_cond0Category.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCorrelationCondition(), and cond1Category().

132  {
133 
134  m_cond0Category = condCateg;
135 }
L1GtConditionCategory m_cond0Category
void L1GtCorrelationTemplate::setCond0Index ( const int &  condIndex)

Definition at line 145 of file L1GtCorrelationTemplate.cc.

References m_cond0Index.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCorrelationCondition(), and cond1Index().

145  {
146  m_cond0Index = condIndex;
147 }
void L1GtCorrelationTemplate::setCond1Category ( const L1GtConditionCategory condCateg)

Definition at line 137 of file L1GtCorrelationTemplate.cc.

References m_cond1Category.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCorrelationCondition(), and cond1Category().

138  {
139 
140  m_cond1Category = condCateg;
141 }
L1GtConditionCategory m_cond1Category
void L1GtCorrelationTemplate::setCond1Index ( const int &  condIndex)

Definition at line 149 of file L1GtCorrelationTemplate.cc.

References m_cond1Index.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCorrelationCondition(), and cond1Index().

149  {
150  m_cond1Index = condIndex;
151 }
void L1GtCorrelationTemplate::setCorrelationParameter ( const CorrelationParameter corrParameter)

Definition at line 155 of file L1GtCorrelationTemplate.cc.

References m_correlationParameter.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCorrelationCondition(), and correlationParameter().

156  {
157 
158  m_correlationParameter = corrParameter;
159 
160 }
CorrelationParameter m_correlationParameter

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 139 of file L1GtCorrelationTemplate.h.

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

Definition at line 139 of file L1GtCorrelationTemplate.h.

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

output stream operator

Definition at line 209 of file L1GtCorrelationTemplate.cc.

Referenced by correlationParameter().

210 {
211  result.print(os);
212  return os;
213 
214 }
virtual void print(std::ostream &myCout) const
print the condition

Member Data Documentation

L1GtConditionCategory L1GtCorrelationTemplate::m_cond0Category
private
int L1GtCorrelationTemplate::m_cond0Index
private
L1GtConditionCategory L1GtCorrelationTemplate::m_cond1Category
private
int L1GtCorrelationTemplate::m_cond1Index
private
CorrelationParameter L1GtCorrelationTemplate::m_correlationParameter
private