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

#include <L1ThrExtraInfo.h>

Collaboration diagram for TrigConf::L1ThrExtraInfo:

Public Member Functions

std::weak_ptr< TrigConf::L1ThrExtraInfoBaseaddExtraInfo (const std::string &thrTypeName, const boost::property_tree::ptree &data)
 
const L1ThrExtraInfo_EMTAULegacyEM () const
 
const L1ThrExtraInfo_EMTAULegacyTAU () const
 
const L1ThrExtraInfo_JETLegacyJET () const
 
const L1ThrExtraInfo_XSLegacyXS () const
 
const L1ThrExtraInfo_eEMeEM () const
 
const L1ThrExtraInfo_jEMjEM () const
 
const L1ThrExtraInfo_eTAUeTAU () const
 
const L1ThrExtraInfo_jTAUjTAU () const
 
const L1ThrExtraInfo_cTAUcTAU () const
 
const L1ThrExtraInfo_jJjJ () const
 
const L1ThrExtraInfo_gJgJ () const
 
const L1ThrExtraInfo_gLJgLJ () const
 
const L1ThrExtraInfo_jLJjLJ () const
 
const L1ThrExtraInfo_gXEgXE () const
 
const L1ThrExtraInfo_jXEjXE () const
 
const L1ThrExtraInfo_gTEgTE () const
 
const L1ThrExtraInfo_jTEjTE () const
 
const L1ThrExtraInfo_MUMU () const
 
const L1ThrExtraInfoBasethrExtraInfo (const std::string &thrTypeName) const
 
bool hasInfo (const std::string &typeName) const
 
void clear ()
 

Static Public Member Functions

static std::unique_ptr< L1ThrExtraInfoBasecreateExtraInfo (const std::string &thrTypeName, const boost::property_tree::ptree &data)
 

Private Attributes

std::map< std::string, std::shared_ptr< TrigConf::L1ThrExtraInfoBase > > m_thrExtraInfo {}
 
std::shared_ptr< TrigConf::L1ThrExtraInfoBasem_emptyInfo { nullptr }
 

Detailed Description

Definition at line 36 of file L1ThrExtraInfo.h.

Member Function Documentation

◆ addExtraInfo()

std::weak_ptr< TrigConf::L1ThrExtraInfoBase > TrigConf::L1ThrExtraInfo::addExtraInfo ( const std::string &  thrTypeName,
const boost::property_tree::ptree data 
)

Definition at line 82 of file L1ThrExtraInfo.cxx.

82  {
83  try {
84  if( auto extraInfo = L1ThrExtraInfo::createExtraInfo( thrTypeName, data) ) {
85  auto success = m_thrExtraInfo.emplace(thrTypeName, std::shared_ptr<TrigConf::L1ThrExtraInfoBase>(std::move(extraInfo)));
86  return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>( success.first->second );
87  }
88  }
89  catch(std::exception & ex) {
90  std::cerr << "L1ThrExtraInfo::addExtraInfo: exception occured when building extra info for " << thrTypeName << std::endl;
91  throw;
92  }
93  return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>( m_emptyInfo );
94 }

◆ clear()

void TrigConf::L1ThrExtraInfo::clear ( )

Definition at line 75 of file L1ThrExtraInfo.cxx.

76 {
77  m_thrExtraInfo.clear();
78 }

◆ createExtraInfo()

std::unique_ptr< TrigConf::L1ThrExtraInfoBase > TrigConf::L1ThrExtraInfo::createExtraInfo ( const std::string &  thrTypeName,
const boost::property_tree::ptree data 
)
static

Definition at line 13 of file L1ThrExtraInfo.cxx.

13  {
14  std::unique_ptr<TrigConf::L1ThrExtraInfoBase> extraInfo(nullptr);
15 
16  if( thrTypeName == "EM" )
17  return std::make_unique<L1ThrExtraInfo_EMTAULegacy>(thrTypeName, data);
18 
19  if( thrTypeName == "TAU" )
20  return std::make_unique<L1ThrExtraInfo_EMTAULegacy>(thrTypeName, data);
21 
22  if( thrTypeName == "JET" )
23  return std::make_unique<L1ThrExtraInfo_JETLegacy>(thrTypeName, data);
24 
25  if( thrTypeName == "XS" )
26  return std::make_unique<L1ThrExtraInfo_XSLegacy>(thrTypeName, data);
27 
28  if( thrTypeName == "MU" )
29  return std::make_unique<L1ThrExtraInfo_MU>(thrTypeName, data);
30 
31  if( thrTypeName == "eEM" )
32  return std::make_unique<L1ThrExtraInfo_eEM>(thrTypeName, data);
33 
34  if( thrTypeName == "jEM" )
35  return std::make_unique<L1ThrExtraInfo_jEM>(thrTypeName, data);
36 
37  if( thrTypeName == "eTAU" )
38  return std::make_unique<L1ThrExtraInfo_eTAU>(thrTypeName, data);
39 
40  if( thrTypeName == "jTAU" )
41  return std::make_unique<L1ThrExtraInfo_jTAU>(thrTypeName, data);
42 
43  if( thrTypeName == "cTAU" )
44  return std::make_unique<L1ThrExtraInfo_cTAU>(thrTypeName, data);
45 
46  if( thrTypeName == "jJ" )
47  return std::make_unique<L1ThrExtraInfo_jJ>(thrTypeName, data);
48 
49  if( thrTypeName == "jLJ" )
50  return std::make_unique<L1ThrExtraInfo_jLJ>(thrTypeName, data);
51 
52  if( thrTypeName == "gJ" )
53  return std::make_unique<L1ThrExtraInfo_gJ>(thrTypeName, data);
54 
55  if( thrTypeName == "gLJ" )
56  return std::make_unique<L1ThrExtraInfo_gLJ>(thrTypeName, data);
57 
58  if( thrTypeName == "jXE" )
59  return std::make_unique<L1ThrExtraInfo_jXE>(thrTypeName, data);
60 
61  if( thrTypeName == "jTE" )
62  return std::make_unique<L1ThrExtraInfo_jTE>(thrTypeName, data);
63 
64  if( thrTypeName == "gXE" )
65  return std::make_unique<L1ThrExtraInfo_gXE>(thrTypeName, data);
66 
67  if( thrTypeName == "gTE" )
68  return std::make_unique<L1ThrExtraInfo_gTE>(thrTypeName, data);
69 
70  // if no special extra information is supplied for the threshold type return base class
71  return std::make_unique<L1ThrExtraInfoBase>(thrTypeName, data);
72 }

◆ cTAU()

const TrigConf::L1ThrExtraInfo_cTAU & TrigConf::L1ThrExtraInfo::cTAU ( ) const

Definition at line 143 of file L1ThrExtraInfo.cxx.

143  {
144  return dynamic_cast<const TrigConf::L1ThrExtraInfo_cTAU&>( * m_thrExtraInfo.at("cTAU") );
145 }

◆ eEM()

const TrigConf::L1ThrExtraInfo_eEM & TrigConf::L1ThrExtraInfo::eEM ( ) const

Definition at line 123 of file L1ThrExtraInfo.cxx.

123  {
124  return dynamic_cast<const TrigConf::L1ThrExtraInfo_eEM&>( * m_thrExtraInfo.at("eEM") );
125 }

◆ EM()

const TrigConf::L1ThrExtraInfo_EMTAULegacy & TrigConf::L1ThrExtraInfo::EM ( ) const

Definition at line 103 of file L1ThrExtraInfo.cxx.

103  {
104  return dynamic_cast<const TrigConf::L1ThrExtraInfo_EMTAULegacy&>( * m_thrExtraInfo.at("EM") );
105 }

◆ eTAU()

const TrigConf::L1ThrExtraInfo_eTAU & TrigConf::L1ThrExtraInfo::eTAU ( ) const

Definition at line 133 of file L1ThrExtraInfo.cxx.

133  {
134  return dynamic_cast<const TrigConf::L1ThrExtraInfo_eTAU&>( * m_thrExtraInfo.at("eTAU") );
135 }

◆ gJ()

const TrigConf::L1ThrExtraInfo_gJ & TrigConf::L1ThrExtraInfo::gJ ( ) const

Definition at line 158 of file L1ThrExtraInfo.cxx.

158  {
159  return dynamic_cast<const TrigConf::L1ThrExtraInfo_gJ&>( * m_thrExtraInfo.at("gJ") );
160 }

◆ gLJ()

const TrigConf::L1ThrExtraInfo_gLJ & TrigConf::L1ThrExtraInfo::gLJ ( ) const

Definition at line 163 of file L1ThrExtraInfo.cxx.

163  {
164  return dynamic_cast<const TrigConf::L1ThrExtraInfo_gLJ&>( * m_thrExtraInfo.at("gLJ") );
165 }

◆ gTE()

const TrigConf::L1ThrExtraInfo_gTE & TrigConf::L1ThrExtraInfo::gTE ( ) const

Definition at line 183 of file L1ThrExtraInfo.cxx.

183  {
184  return dynamic_cast<const TrigConf::L1ThrExtraInfo_gTE&>( * m_thrExtraInfo.at("gTE") );
185 }

◆ gXE()

const TrigConf::L1ThrExtraInfo_gXE & TrigConf::L1ThrExtraInfo::gXE ( ) const

Definition at line 178 of file L1ThrExtraInfo.cxx.

178  {
179  return dynamic_cast<const TrigConf::L1ThrExtraInfo_gXE&>( * m_thrExtraInfo.at("gXE") );
180 }

◆ hasInfo()

bool TrigConf::L1ThrExtraInfo::hasInfo ( const std::string &  typeName) const

Definition at line 97 of file L1ThrExtraInfo.cxx.

98 {
99  return ( m_thrExtraInfo.find(typeName) != m_thrExtraInfo.end() );
100 }

◆ jEM()

const TrigConf::L1ThrExtraInfo_jEM & TrigConf::L1ThrExtraInfo::jEM ( ) const

Definition at line 128 of file L1ThrExtraInfo.cxx.

128  {
129  return dynamic_cast<const TrigConf::L1ThrExtraInfo_jEM&>( * m_thrExtraInfo.at("jEM") );
130 }

◆ JET()

const TrigConf::L1ThrExtraInfo_JETLegacy & TrigConf::L1ThrExtraInfo::JET ( ) const

Definition at line 118 of file L1ThrExtraInfo.cxx.

118  {
119  return dynamic_cast<const TrigConf::L1ThrExtraInfo_JETLegacy&>( * m_thrExtraInfo.at("JET") );
120 }

◆ jJ()

const TrigConf::L1ThrExtraInfo_jJ & TrigConf::L1ThrExtraInfo::jJ ( ) const

Definition at line 148 of file L1ThrExtraInfo.cxx.

148  {
149  return dynamic_cast<const TrigConf::L1ThrExtraInfo_jJ&>( * m_thrExtraInfo.at("jJ") );
150 }

◆ jLJ()

const TrigConf::L1ThrExtraInfo_jLJ & TrigConf::L1ThrExtraInfo::jLJ ( ) const

Definition at line 153 of file L1ThrExtraInfo.cxx.

153  {
154  return dynamic_cast<const TrigConf::L1ThrExtraInfo_jLJ&>( * m_thrExtraInfo.at("jLJ") );
155 }

◆ jTAU()

const TrigConf::L1ThrExtraInfo_jTAU & TrigConf::L1ThrExtraInfo::jTAU ( ) const

Definition at line 138 of file L1ThrExtraInfo.cxx.

138  {
139  return dynamic_cast<const TrigConf::L1ThrExtraInfo_jTAU&>( * m_thrExtraInfo.at("jTAU") );
140 }

◆ jTE()

const TrigConf::L1ThrExtraInfo_jTE & TrigConf::L1ThrExtraInfo::jTE ( ) const

Definition at line 173 of file L1ThrExtraInfo.cxx.

173  {
174  return dynamic_cast<const TrigConf::L1ThrExtraInfo_jTE&>( * m_thrExtraInfo.at("jTE") );
175 }

◆ jXE()

const TrigConf::L1ThrExtraInfo_jXE & TrigConf::L1ThrExtraInfo::jXE ( ) const

Definition at line 168 of file L1ThrExtraInfo.cxx.

168  {
169  return dynamic_cast<const TrigConf::L1ThrExtraInfo_jXE&>( * m_thrExtraInfo.at("jXE") );
170 }

◆ MU()

const TrigConf::L1ThrExtraInfo_MU & TrigConf::L1ThrExtraInfo::MU ( ) const

Definition at line 188 of file L1ThrExtraInfo.cxx.

188  {
189  return dynamic_cast<const TrigConf::L1ThrExtraInfo_MU&>( * m_thrExtraInfo.at("MU") );
190 }

◆ TAU()

const TrigConf::L1ThrExtraInfo_EMTAULegacy & TrigConf::L1ThrExtraInfo::TAU ( ) const

Definition at line 108 of file L1ThrExtraInfo.cxx.

108  {
109  return dynamic_cast<const TrigConf::L1ThrExtraInfo_EMTAULegacy&>( * m_thrExtraInfo.at("TAU") );
110 }

◆ thrExtraInfo()

const TrigConf::L1ThrExtraInfoBase & TrigConf::L1ThrExtraInfo::thrExtraInfo ( const std::string &  thrTypeName) const

Definition at line 193 of file L1ThrExtraInfo.cxx.

194 {
195  try {
196  return * m_thrExtraInfo.at(thrTypeName);
197  }
198  catch(std::exception & ex) {
199  std::cerr << "Threshold type " << thrTypeName << " does not have extra info defined" << endl;
200  throw;
201  }
202 }

◆ XS()

const TrigConf::L1ThrExtraInfo_XSLegacy & TrigConf::L1ThrExtraInfo::XS ( ) const

Definition at line 113 of file L1ThrExtraInfo.cxx.

113  {
114  return dynamic_cast<const TrigConf::L1ThrExtraInfo_XSLegacy&>( * m_thrExtraInfo.at("XS") );
115 }

Member Data Documentation

◆ m_emptyInfo

std::shared_ptr<TrigConf::L1ThrExtraInfoBase> TrigConf::L1ThrExtraInfo::m_emptyInfo { nullptr }
private

Definition at line 70 of file L1ThrExtraInfo.h.

◆ m_thrExtraInfo

std::map<std::string, std::shared_ptr<TrigConf::L1ThrExtraInfoBase> > TrigConf::L1ThrExtraInfo::m_thrExtraInfo {}
private

Definition at line 69 of file L1ThrExtraInfo.h.


The documentation for this class was generated from the following files:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TrigConf::L1ThrExtraInfo_MU
Definition: L1ThrExtraInfo.h:655
TrigConf::L1ThrExtraInfo_XSLegacy
Definition: L1ThrExtraInfo.h:117
TrigConf::L1ThrExtraInfo_jTE
Definition: L1ThrExtraInfo.h:554
TrigConf::L1ThrExtraInfo_gTE
Definition: L1ThrExtraInfo.h:643
TrigConf::L1ThrExtraInfo::m_emptyInfo
std::shared_ptr< TrigConf::L1ThrExtraInfoBase > m_emptyInfo
Definition: L1ThrExtraInfo.h:70
TrigConf::L1ThrExtraInfo_gJ
Definition: L1ThrExtraInfo.h:469
TrigConf::L1ThrExtraInfo_jXE
Definition: L1ThrExtraInfo.h:542
TrigConf::L1ThrExtraInfo_gXE
Definition: L1ThrExtraInfo.h:584
calibdata.exception
exception
Definition: calibdata.py:496
TrigConf::L1ThrExtraInfo_eTAU
Definition: L1ThrExtraInfo.h:251
TrigConf::L1ThrExtraInfo_cTAU
Definition: L1ThrExtraInfo.h:349
TrigConf::L1ThrExtraInfo::createExtraInfo
static std::unique_ptr< L1ThrExtraInfoBase > createExtraInfo(const std::string &thrTypeName, const boost::property_tree::ptree &data)
Definition: L1ThrExtraInfo.cxx:13
TrigConf::L1ThrExtraInfo_jTAU
Definition: L1ThrExtraInfo.h:296
TrigConf::L1ThrExtraInfo_EMTAULegacy
Definition: L1ThrExtraInfo.h:75
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
TrigConf::L1ThrExtraInfo_jLJ
Definition: L1ThrExtraInfo.h:435
TrigConf::L1ThrExtraInfo_gLJ
Definition: L1ThrExtraInfo.h:490
TrigConf::L1ThrExtraInfo_eEM
Definition: L1ThrExtraInfo.h:145
TrigConf::L1ThrExtraInfo_jEM
Definition: L1ThrExtraInfo.h:189
TrigConf::L1ThrExtraInfo::m_thrExtraInfo
std::map< std::string, std::shared_ptr< TrigConf::L1ThrExtraInfoBase > > m_thrExtraInfo
Definition: L1ThrExtraInfo.h:69
TrigConf::L1ThrExtraInfo_JETLegacy
Definition: L1ThrExtraInfo.h:95
TrigConf::L1ThrExtraInfo_jJ
Definition: L1ThrExtraInfo.h:390