ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::EnergyCMX Class Reference

This class simulates the missing ET and total ET triggers. More...

#include <EnergyCMX.h>

Inheritance diagram for LVL1::EnergyCMX:
Collaboration diagram for LVL1::EnergyCMX:

Public Member Functions

 EnergyCMX (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
virtual StatusCode start () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef DataVector< EnergyCMXDataEnergyCMXDataCollection
typedef DataVector< CMXEtSumsCMXEtSumsCollection
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode saveCTPObjects (const SystemEnergy &resultsFull, const SystemEnergy &resultsTrunc, const EventContext &ctx) const
 form CTP objects and store them in SG.
StatusCode saveRoIs (const SystemEnergy &resultsFull, const SystemEnergy &resultsTrunc, const EventContext &ctx) const
 put EnergyRoIs into SG
unsigned int ctpWord (unsigned int metSigPassed, unsigned int etMissPassed, unsigned int etSumPassed) const
 returns the Energy CTP word
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< LVL1::IL1EtToolsm_EtTool
SG::ReadHandleKey< EnergyCMXDataCollectionm_energyCMXDataLocation
SG::WriteHandleKey< EnergyCTPm_energyCTPLocation
SG::WriteHandleKey< EnergyTopoDatam_energyTopoLocation
SG::WriteHandleKey< CMXEtSumsCollectionm_cmxEtsumsLocation
SG::WriteHandleKey< CMXRoIm_cmxRoILocation
SG::ReadHandleKey< TrigConf::L1Menum_L1MenuKey { this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

This class simulates the missing ET and total ET triggers.

EnergyCMX uses EnergyCrate and JetElement objects in order to closely follow the layout of the hardware.

Definition at line 51 of file EnergyCMX.h.

Member Typedef Documentation

◆ CMXEtSumsCollection

Definition at line 54 of file EnergyCMX.h.

◆ EnergyCMXDataCollection

Definition at line 53 of file EnergyCMX.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ EnergyCMX()

LVL1::EnergyCMX::EnergyCMX ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 38 of file EnergyCMX.cxx.

39 : AthReentrantAlgorithm( name, pSvcLocator ) {}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ ctpWord()

unsigned int LVL1::EnergyCMX::ctpWord ( unsigned int metSigPassed,
unsigned int etMissPassed,
unsigned int etSumPassed ) const
private

returns the Energy CTP word

form CTP word from ETmiss and ETsum hits

Definition at line 284 of file EnergyCMX.cxx.

286 {
287
289 (etMissPassed<<L1DataDef::typeConfig(L1DataDef::TE).max) + etSumPassed );
290}
#define max(a, b)
Definition cfImp.cxx:41
static TriggerTypeConfig & typeConfig(TriggerType tt)

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode LVL1::EnergyCMX::execute ( const EventContext & ctx) const
overridevirtual

Find restructed eta range. This will use the min/max values for the first valid threshold in the range 9-16 to define the ranges

Definition at line 77 of file EnergyCMX.cxx.

78{
79 ATH_MSG_DEBUG( "Executing" );
80
81 // form module sums
82 SG::ReadHandle<EnergyCMXDataCollection> jemContainer = SG::makeHandle(m_energyCMXDataLocation, ctx);
83
84 // form crate sums (full eta range)
85 DataVector<CrateEnergy>* cratesFull = new DataVector<CrateEnergy>;
86 m_EtTool->crateSums(jemContainer.cptr(), cratesFull);
87 // system summation and threshold tests
88 const SystemEnergy resultsFull = m_EtTool->systemSums(cratesFull);
89
93 uint32_t maskXE = 0;
94 uint32_t maskTE = 0;
95 bool maskXESet = false;
96 bool maskTESet = false;
97 const float moduleEta[8] = {-4.,-2.,-1.2,-0.4,0.4,1.2,2.,4.};
98
99 auto l1Menu = SG::makeHandle( m_L1MenuKey, ctx );
100 std::vector<std::shared_ptr<TrigConf::L1Threshold>> allThresholds = l1Menu->thresholds();
101 for ( const auto& thresh : allThresholds ) {
102 if ( ( thresh->type() == L1DataDef::typeAsString(L1DataDef::XE) || thresh->type() == L1DataDef::typeAsString(L1DataDef::TE)) && thresh->mapping() > 7 ) {
103 auto thresh_Calo = static_cast<const TrigConf::L1Threshold_Calo*>(thresh.get());
104 auto tvcs = thresh_Calo->thrValuesCounts();
105 // Make sure only set masks from the first valid threshold in the range (for each type)
106 if (maskXE > 0) maskXESet = true;
107 if (maskTE > 0) maskTESet = true;
108 if (tvcs.size() == 0) {
109 tvcs.addRangeValue(thresh_Calo->thrValueCounts(),-49, 49, 1, true);
110 }
111 for (const auto& tVC : tvcs) {
112 // Bits are set false by default, so ignore thresholds that are just doing that
113 if (tVC.value() >= 0x7fff) continue;
114 // Set bits true if module centre between etaMin and etaMax
115 if ( thresh->type() == L1DataDef::typeAsString(L1DataDef::XE) && !maskXESet ) {
116 for (unsigned int bin = 0; bin < 8; ++bin) {
117 if (moduleEta[bin] > tVC.etaMin()*0.1 && moduleEta[bin] < tVC.etaMax()*0.1)
118 maskXE |= (1<<bin);
119 }
120 }
121 else if ( thresh->type() == L1DataDef::typeAsString(L1DataDef::TE) && !maskTESet ) {
122 for (unsigned int bin = 0; bin < 8; ++bin) {
123 if (moduleEta[bin] > tVC.etaMin()*0.1 && moduleEta[bin] < tVC.etaMax()*0.1)
124 maskTE |= (1<<bin);
125 }
126 }
127 } // loop over TTV
128 } // Is this XE or TE threshold?
129 }
130
131 // form crate sums (restricted eta range). Explicitly set restricted eta flag regardless of eta range
132 DataVector<CrateEnergy>* cratesTrunc = new DataVector<CrateEnergy>;
133 m_EtTool->crateSums(jemContainer.cptr(), cratesTrunc, maskXE, maskTE, true);
134 // system summation and threshold tests
135 const SystemEnergy resultsTrunc = m_EtTool->systemSums(cratesTrunc);
136
137 // CTP Data
138 ATH_CHECK(saveCTPObjects(resultsFull, resultsTrunc, ctx));
139
140 // RoI output
141 ATH_CHECK(saveRoIs(resultsFull, resultsTrunc, ctx));
142
143 // Module readout simulation
144 SG::WriteHandle<CMXEtSumsCollection> CMXSums = SG::makeHandle(m_cmxEtsumsLocation, ctx);
145 ATH_CHECK(CMXSums.record(std::make_unique<CMXEtSumsCollection>()));
146
147 std::vector<unsigned int> exVec;
148 std::vector<unsigned int> eyVec;
149 std::vector<unsigned int> etVec;
150 std::vector<int> exErr;
151 std::vector<int> eyErr;
152 std::vector<int> etErr;
153 exErr.assign(1,0);
154 eyErr.assign(1,0);
155 etErr.assign(1,0);
156 const int peak = 0;
157 const int system_crate = 1;
158
159 // Full eta range
160 DataVector<CrateEnergy>::const_iterator itCrate = cratesFull->begin();
161 for ( ; itCrate != cratesFull->end(); ++itCrate) {
162 exVec.clear();
163 exVec.push_back((*itCrate)->exTC());
164 eyVec.clear();
165 eyVec.push_back((*itCrate)->eyTC());
166 etVec.clear();
167 etVec.push_back((*itCrate)->et());
168 int crate = (*itCrate)->crate();
169 CMXEtSums* crateEtSumFull = new CMXEtSums(crate, LVL1::CMXEtSums::LOCAL_STANDARD,
170 exVec, eyVec, etVec, exErr, eyErr, etErr, peak);
171 CMXSums->push_back(crateEtSumFull);
172
173 if (crate != system_crate) {
174 CMXEtSums* remoteEtSumFull = new CMXEtSums(system_crate, LVL1::CMXEtSums::REMOTE_STANDARD,
175 exVec, eyVec, etVec, exErr, eyErr, etErr, peak);
176 CMXSums->push_back(remoteEtSumFull);
177 }
178
179 }
180
181 exVec.clear();
182 exVec.push_back(resultsFull.exTC());
183 eyVec.clear();
184 eyVec.push_back(resultsFull.eyTC());
185 etVec.clear();
186 etVec.push_back(resultsFull.et());
187 CMXEtSums* systemEtSumFull = new CMXEtSums(system_crate, LVL1::CMXEtSums::TOTAL_STANDARD,
188 exVec, eyVec, etVec, exErr, eyErr, etErr, peak);
189 CMXSums->push_back(systemEtSumFull);
190
191 // Restricted eta range
192 DataVector<CrateEnergy>::const_iterator itTrunc = cratesTrunc->begin();
193 for ( ; itTrunc != cratesTrunc->end(); ++itTrunc) {
194 exVec.clear();
195 exVec.push_back((*itTrunc)->exTC());
196 eyVec.clear();
197 eyVec.push_back((*itTrunc)->eyTC());
198 etVec.clear();
199 etVec.push_back((*itTrunc)->et());
200 int crate = (*itTrunc)->crate();
201 CMXEtSums* crateEtSumTrunc = new CMXEtSums(crate, LVL1::CMXEtSums::LOCAL_RESTRICTED,
202 exVec, eyVec, etVec, exErr, eyErr, etErr, peak);
203 CMXSums->push_back(crateEtSumTrunc);
204
205 if (crate != system_crate) {
206 CMXEtSums* remoteEtSumTrunc = new CMXEtSums(system_crate, LVL1::CMXEtSums::REMOTE_RESTRICTED,
207 exVec, eyVec, etVec, exErr, eyErr, etErr, peak);
208 CMXSums->push_back(remoteEtSumTrunc);
209 }
210
211 }
212
213 exVec.clear();
214 exVec.push_back(resultsTrunc.exTC());
215 eyVec.clear();
216 eyVec.push_back(resultsTrunc.eyTC());
217 etVec.clear();
218 etVec.push_back(resultsTrunc.et());
219 CMXEtSums* systemEtSumTrunc = new CMXEtSums(system_crate, LVL1::CMXEtSums::TOTAL_RESTRICTED,
220 exVec, eyVec, etVec, exErr, eyErr, etErr, peak);
221
222 CMXSums->push_back(systemEtSumTrunc);
223
224 // Topo data
225 SG::WriteHandle<EnergyTopoData> topoData = SG::makeHandle(m_energyTopoLocation, ctx);
226 ATH_CHECK(topoData.record(std::make_unique<EnergyTopoData>()));
227
228 topoData->addEx(resultsFull.exTC(), resultsFull.exOverflow(), LVL1::EnergyTopoData::Normal);
229 topoData->addEy(resultsFull.eyTC(), resultsFull.eyOverflow(), LVL1::EnergyTopoData::Normal);
230 topoData->addEt(resultsFull.et(), resultsFull.etOverflow(), LVL1::EnergyTopoData::Normal);
231
232 topoData->addEx(resultsTrunc.exTC(), resultsTrunc.exOverflow(), LVL1::EnergyTopoData::Restricted);
233 topoData->addEy(resultsTrunc.eyTC(), resultsTrunc.eyOverflow(), LVL1::EnergyTopoData::Restricted);
234 topoData->addEt(resultsTrunc.et(), resultsTrunc.etOverflow(), LVL1::EnergyTopoData::Restricted);
235
236 // tidy up at end of event
237 delete cratesFull;
238 delete cratesTrunc;
239
240 return StatusCode::SUCCESS ;
241}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
StatusCode saveRoIs(const SystemEnergy &resultsFull, const SystemEnergy &resultsTrunc, const EventContext &ctx) const
put EnergyRoIs into SG
SG::WriteHandleKey< EnergyTopoData > m_energyTopoLocation
Definition EnergyCMX.h:89
SG::ReadHandleKey< EnergyCMXDataCollection > m_energyCMXDataLocation
Definition EnergyCMX.h:81
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition EnergyCMX.h:99
StatusCode saveCTPObjects(const SystemEnergy &resultsFull, const SystemEnergy &resultsTrunc, const EventContext &ctx) const
form CTP objects and store them in SG.
ToolHandle< LVL1::IL1EtTools > m_EtTool
Definition EnergyCMX.h:77
SG::WriteHandleKey< CMXEtSumsCollection > m_cmxEtsumsLocation
Definition EnergyCMX.h:92
const_pointer_type cptr()
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
static std::string & typeAsString(TriggerType tt)
Definition L1DataDef.h:53
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
setEventNumber uint32_t
CMXEtSums_v1 CMXEtSums
Define the latest version of the CMXEtSums class.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode LVL1::EnergyCMX::initialize ( )
overridevirtual

Definition at line 46 of file EnergyCMX.cxx.

47{
48 ATH_CHECK( m_EtTool.retrieve() );
49 ATH_CHECK( m_energyCMXDataLocation.initialize() );
50 ATH_CHECK( m_energyCTPLocation.initialize() );
51 ATH_CHECK( m_energyTopoLocation.initialize() );
52 ATH_CHECK( m_cmxEtsumsLocation.initialize() );
53 ATH_CHECK( m_cmxRoILocation.initialize() );
54 ATH_CHECK( m_L1MenuKey.initialize() );
55 return StatusCode::SUCCESS ;
56}
SG::WriteHandleKey< EnergyCTP > m_energyCTPLocation
Definition EnergyCMX.h:86
SG::WriteHandleKey< CMXRoI > m_cmxRoILocation
Definition EnergyCMX.h:95

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ saveCTPObjects()

StatusCode LVL1::EnergyCMX::saveCTPObjects ( const SystemEnergy & resultsFull,
const SystemEnergy & resultsTrunc,
const EventContext & ctx ) const
private

form CTP objects and store them in SG.

Definition at line 293 of file EnergyCMX.cxx.

295 {
296 ATH_MSG_DEBUG("saveCTPObjects");
297
298 // get bit words of thresholds passed
299 unsigned int etSumHitsFull = resultsFull.etSumHits();
300 unsigned int etMissHitsFull = resultsFull.etMissHits();
301 unsigned int metSigHitsFull = resultsFull.metSigHits();
302 unsigned int etSumHitsTrunc = resultsTrunc.etSumHits();
303 unsigned int etMissHitsTrunc = resultsTrunc.etMissHits();
304
305 // form CTP words
306 unsigned int word0 = ctpWord(metSigHitsFull, etMissHitsFull, etSumHitsFull);
307 unsigned int word1 = ctpWord(0, etMissHitsTrunc, etSumHitsTrunc);
308 // Comment out parity generation for now - should be in bit 32 of a 34 bit word
309 //Parity genParity;
310 //temp += (genParity.odd(temp)<<31);
311
312 // form CTP object
313 SG::WriteHandle<EnergyCTP> energyCTP = SG::makeHandle(m_energyCTPLocation, ctx);
314 ATH_CHECK(energyCTP.record(std::make_unique<EnergyCTP>(word0, word1)));
315 ATH_MSG_DEBUG( "Stored energy CTP object with words "<< std::hex
316 << (energyCTP->cableWord0()) << ", " << (energyCTP->cableWord1())<< std::dec);
317
318 return StatusCode::SUCCESS;
319}
unsigned int ctpWord(unsigned int metSigPassed, unsigned int etMissPassed, unsigned int etSumPassed) const
returns the Energy CTP word

◆ saveRoIs()

StatusCode LVL1::EnergyCMX::saveRoIs ( const SystemEnergy & resultsFull,
const SystemEnergy & resultsTrunc,
const EventContext & ctx ) const
private

put EnergyRoIs into SG

form CMXRoI & save in SG

Definition at line 247 of file EnergyCMX.cxx.

249 {
250 ATH_MSG_DEBUG("saveRoIs");
251
252 // copy values into roi words
253 unsigned int roiWord0 = resultsFull.roiWord0();
254 unsigned int roiWord2 = resultsFull.roiWord1();
255 unsigned int roiWord4 = resultsFull.roiWord2();
256
257 // Truncated eta range
258 unsigned int roiWord1 = resultsTrunc.roiWord0();
259 unsigned int roiWord3 = resultsTrunc.roiWord1();
260 unsigned int roiWord5 = resultsTrunc.roiWord2();
261
262 // DAQ readout object.
263 SG::WriteHandle<CMXRoI> daqRoI = SG::makeHandle(m_cmxRoILocation, ctx);
264 ATH_CHECK(daqRoI.record(std::make_unique<CMXRoI>()));
265
266 // Add data to RoI object. The object will perform format checks on inputs
267 bool added = daqRoI->setRoiWord(roiWord0);
268 if (!added) ATH_MSG_WARNING("Failed to add RoI Word 0: " << MSG::hex << roiWord0 << MSG::dec);
269 added = daqRoI->setRoiWord(roiWord1);
270 if (!added) ATH_MSG_WARNING("Failed to add RoI Word 1: " << MSG::hex << roiWord1 << MSG::dec);
271 added = daqRoI->setRoiWord(roiWord2);
272 if (!added) ATH_MSG_WARNING( "Failed to add RoI Word 2: " << MSG::hex << roiWord2 << MSG::dec );
273 added = daqRoI->setRoiWord(roiWord3);
274 if (!added) ATH_MSG_WARNING( "Failed to add RoI Word 3: " << MSG::hex << roiWord3 << MSG::dec );
275 added = daqRoI->setRoiWord(roiWord4);
276 if (!added) ATH_MSG_WARNING( "Failed to add RoI Word 4: " << MSG::hex << roiWord4 << MSG::dec );
277 added = daqRoI->setRoiWord(roiWord5);
278 if (!added) ATH_MSG_WARNING( "Failed to add RoI Word 5: " << MSG::hex << roiWord5 << MSG::dec );
279
280 return StatusCode::SUCCESS;
281}
#define ATH_MSG_WARNING(x)
setRoIWord1 roiWord3
setRoIWord1 setRoIWord3 roiWord5

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ start()

StatusCode LVL1::EnergyCMX::start ( )
overridevirtual

Definition at line 63 of file EnergyCMX.cxx.

64{
66
67 return StatusCode::SUCCESS ;
68}
static void setNewJEP3Cabling()

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_cmxEtsumsLocation

SG::WriteHandleKey<CMXEtSumsCollection> LVL1::EnergyCMX::m_cmxEtsumsLocation
private
Initial value:
{
this, "CMXEtSumsLocation", TrigT1CaloDefs::CMXEtSumsLocation,
"Write handle key for CMXEtSumsCollection"}
static const std::string CMXEtSumsLocation

Definition at line 92 of file EnergyCMX.h.

92 {
93 this, "CMXEtSumsLocation", TrigT1CaloDefs::CMXEtSumsLocation,
94 "Write handle key for CMXEtSumsCollection"};

◆ m_cmxRoILocation

SG::WriteHandleKey<CMXRoI> LVL1::EnergyCMX::m_cmxRoILocation
private
Initial value:
{
this, "CMXRoILocation", TrigT1CaloDefs::CMXRoILocation,
"Write handle key for CMXRoI"}
static const std::string CMXRoILocation

Definition at line 95 of file EnergyCMX.h.

95 {
96 this, "CMXRoILocation", TrigT1CaloDefs::CMXRoILocation,
97 "Write handle key for CMXRoI"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_energyCMXDataLocation

SG::ReadHandleKey<EnergyCMXDataCollection> LVL1::EnergyCMX::m_energyCMXDataLocation
private
Initial value:
{
this, "EnergyCMXDataLocation", TrigT1CaloDefs::EnergyCMXDataLocation,
"Read handle key for EnergyCMXDataCollection"}
static const std::string EnergyCMXDataLocation

Definition at line 81 of file EnergyCMX.h.

81 {
82 this, "EnergyCMXDataLocation", TrigT1CaloDefs::EnergyCMXDataLocation,
83 "Read handle key for EnergyCMXDataCollection"};

◆ m_energyCTPLocation

SG::WriteHandleKey<EnergyCTP> LVL1::EnergyCMX::m_energyCTPLocation
private
Initial value:
{
this, "EnergyCTPLocation", TrigT1CaloDefs::EnergyCTPLocation,
"Write handle key for EnergyCTP"}
static const std::string EnergyCTPLocation

Definition at line 86 of file EnergyCMX.h.

86 {
87 this, "EnergyCTPLocation", TrigT1CaloDefs::EnergyCTPLocation,
88 "Write handle key for EnergyCTP"};

◆ m_energyTopoLocation

SG::WriteHandleKey<EnergyTopoData> LVL1::EnergyCMX::m_energyTopoLocation
private
Initial value:
{
this, "EnergyTopoDataLocation", TrigT1CaloDefs::EnergyTopoDataLocation,
"Write handle key for EnergyTopoData"}
static const std::string EnergyTopoDataLocation

Definition at line 89 of file EnergyCMX.h.

89 {
90 this, "EnergyTopoDataLocation", TrigT1CaloDefs::EnergyTopoDataLocation,
91 "Write handle key for EnergyTopoData"};

◆ m_EtTool

ToolHandle<LVL1::IL1EtTools> LVL1::EnergyCMX::m_EtTool
private
Initial value:
{
this, "L1EtTools", "LVL1::L1EtTools/L1EtTools", "Tool performing the simulation"}

Definition at line 77 of file EnergyCMX.h.

77 {
78 this, "L1EtTools", "LVL1::L1EtTools/L1EtTools", "Tool performing the simulation"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_L1MenuKey

SG::ReadHandleKey<TrigConf::L1Menu> LVL1::EnergyCMX::m_L1MenuKey { this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }
private

Definition at line 99 of file EnergyCMX.h.

99{ this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: