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

#include <eTowerMakerFromEfexTowers.h>

Inheritance diagram for LVL1::eTowerMakerFromEfexTowers:
Collaboration diagram for LVL1::eTowerMakerFromEfexTowers:

Public Member Functions

 eTowerMakerFromEfexTowers (const std::string &name, ISvcLocator *pSvcLocator)
 ~eTowerMakerFromEfexTowers ()=default
virtual StatusCode initialize () 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 ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::eFexTowerContainerm_eFexTowerContainerSGKey {this, "InputTowers", "L1_eFexDataTowers", "efexTowers (use L1_eFexEmulatedTowers for built from SC, or L1_eFexDataTowers for efex readout"}
SG::ReadHandleKey< xAOD::eFexTowerContainerm_eFexTowerContainer2SGKey {this, "SecondaryInputTowers", "L1_eFexEmulatedTowers", "If specified, will fallback to this collection of towers if the first collection is incomplete"}
UnsignedIntegerProperty m_minTowersRequired {this,"MinTowersRequired",1,"Will use the primary collection provided there's at least this many towers there"}
SG::WriteHandleKey< LVL1::eTowerContainerm_eTowerContainerSGKey {this, "MyETowers", "eTowerContainer", "MyETowers"}
ToolHandle< IeTowerBuilderm_eTowerBuilderTool {this, "eTowerBuilderTool", "LVL1::eTowerBuilder", "Tool that builds eTowers for simulation"}
SG::ReadCondHandleKey< CondAttrListCollectionm_noiseCutsKey
UnsignedIntegerProperty m_noiseCutBeginTimestamp {this,"NoiseCutsBeginTimestamp",1672531200,"Earliest timestamp that noise cuts will be applied from db. Default is start of 2023"}
std::atomic< bool > m_printedNoiseCuts = false
std::mutex m_debugMutex
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

Definition at line 20 of file eTowerMakerFromEfexTowers.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ eTowerMakerFromEfexTowers()

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

Definition at line 29 of file eTowerMakerFromEfexTowers.cxx.

30 : AthReentrantAlgorithm(name, pSvcLocator)
31 {
32
33 }

◆ ~eTowerMakerFromEfexTowers()

LVL1::eTowerMakerFromEfexTowers::~eTowerMakerFromEfexTowers ( )
default

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}

◆ 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::eTowerMakerFromEfexTowers::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 53 of file eTowerMakerFromEfexTowers.cxx.

54{
55 // load noise cuts .. should really only need to do this at start of runs, not every event!
56 std::map<std::pair<int, int>, int> noiseCutsMap; // key is [eta,layer]
57 bool useHardcodedCuts = false;
58 if(!m_noiseCutsKey.empty()) {
59 // check timestamp of event is not *before* date when started using database
60 if (ctx.eventID().time_stamp() < m_noiseCutBeginTimestamp) {
61 useHardcodedCuts = true;
62 } else {
63 SG::ReadCondHandle <CondAttrListCollection> noiseCuts{m_noiseCutsKey, ctx};
64 if (noiseCuts.isValid()) {
65 if(msgLvl(MSG::DEBUG) && !m_printedNoiseCuts) {
66 m_printedNoiseCuts = true;
67 ATH_MSG_DEBUG("DB Noise cuts are:");
68 noiseCuts->dump();
69 }
70 if(noiseCuts->size()==0) {
71 ATH_MSG_ERROR("No noise cuts loaded from conditions db for event with timestamp" << ctx.eventID().time_stamp());
72 return StatusCode::FAILURE;
73 }
74 for (auto itr = noiseCuts->begin(); itr != noiseCuts->end(); ++itr) {
75 if (itr->first >= 50) continue;
76 noiseCutsMap[std::pair(itr->first, 0)] = itr->second["EmPS"].data<int>();
77 noiseCutsMap[std::pair(itr->first, 1)] = itr->second["EmFR"].data<int>();
78 noiseCutsMap[std::pair(itr->first, 2)] = itr->second["EmMD"].data<int>();
79 noiseCutsMap[std::pair(itr->first, 3)] = itr->second["EmBK"].data<int>();
80 noiseCutsMap[std::pair(itr->first, 4)] = (itr->first >= 10 && itr->first < 40)
81 ? itr->second["Tile"].data<int>()
82 : itr->second["HEC"].data<int>();
83 }
84 }
85 }
86 }
87
88 // STEP 0 - Make a fresh local eTowerContainer
89 std::unique_ptr<eTowerContainer> local_eTowerContainerRaw = std::make_unique<eTowerContainer>();
90
91 // STEP 1 - Make some eTowers and fill the local container
92 m_eTowerBuilderTool->init(local_eTowerContainerRaw);
93 local_eTowerContainerRaw->clearContainerMap();
94 local_eTowerContainerRaw->fillContainerMap();
95
96 SG::ReadHandle<xAOD::eFexTowerContainer> eFexTowers(m_eFexTowerContainerSGKey, ctx);
97 // we may have DataTowers because of error statuses ... so don't use the primary towers if
98 // they all have errors
99 size_t badTowers = 0;
100 if(eFexTowers.isValid()) {
101 for(auto eFexTower : *eFexTowers) {
102 if(eFexTower->em_status()||eFexTower->had_status()) badTowers++;
103 }
104 }
105 if((!eFexTowers.isValid() || eFexTowers->size() < m_minTowersRequired || eFexTowers->size()==badTowers) && !m_eFexTowerContainer2SGKey.empty()) {
106 eFexTowers = SG::ReadHandle<xAOD::eFexTowerContainer>(m_eFexTowerContainer2SGKey, ctx);
107 // removing this to avoid breaking frozen tier0 policy
108 // bug keeping commented out until sure we've replaced with a good alternative
109 //const xAOD::EventInfo* ei = nullptr;
110 //CHECK( evtStore()->retrieve(ei) );
111 //ei->auxdecor<bool>("eTowerMakerFromEfexTowers_usedSecondary") = true;
112 }
113
114 // STEP 2 - Do the efexTower-tower mapping - put this information into the eTowerContainer
115 for(auto eFexTower : *eFexTowers) {
116 // need to ensure this eFexTower is a "core" tower in a module ... so that there aren't disconnected inputs
117 // and also need to only do one tower per location, of course
118 auto tower = local_eTowerContainerRaw->findTower(eFexTower->eFEXtowerID());
119 auto counts = eFexTower->et_count();
120 for(size_t i=0;i<counts.size();i++) {
121 if(i<10 && eFexTower->em_status()) continue; // bad status bits have their energy zerod by the firmware
122 if(i==10 && eFexTower->had_status()) continue;
123 if (eFexTower->disconnectedCount(i)) continue;
124 if (counts.at(i)==0 || (counts.at(i)>1020 && counts.at(i)!=1023)) continue; // absent (1025 from BS decoder), invalid (1022), empty (0) or masked (0) channel
125 // special case logic for reordering |eta|=2.5 and overlap
126 // and l1 1.8-2.0 ... need to put the merged sc counts into slots that wont be split
127 int layer; int cell=i;
128 if(i<1 || (i==4 && std::abs(eFexTower->eta()+0.025)>2.4)) {layer = 0;cell=0;}
129 else if(i<5) layer = 1;
130 else if(i<9) layer = 2;
131 else if(i<10) layer = 3;
132 else layer = 4;
133
134 // apply noise cut ... for runs up to 14th April 2023 was killing with <, then from run 449180 onwards kills with <=
135 // since long-term behaviour is latter, will use that
136 //if(useHardcodedCuts && !eFEXCompression::noiseCut(counts.at(i),layer,true)) continue;
137 if(!useHardcodedCuts && counts.at(i) <= noiseCutsMap[std::pair( int( (eFexTower->eta() + 2.525)/0.1 ), layer)]) continue;
138
139 // checking we haven't already filled this tower (happens when using efexDataTowers ... multiple towers per loc for different modules)
140 // this is ugly as ...
141 if(!tower->getET_float(layer,cell-(layer==1)*1-(layer==2)*5-(layer==3)*9-(layer==4)*10)) {
142 // if tile then count is in steps of 500 MeV, not in latome multilinear encoding
143 bool isTile = (std::abs(eFexTower->eta()+0.025)<1.5 && layer==4);
144 tower->setET(cell,isTile ? (counts.at(i)*500.) : eFEXCompression::expand(counts.at(i)),layer + isTile, useHardcodedCuts);
145 }
146 }
147 }
148
149 if(msgLvl(MSG::DEBUG)) {
150 std::scoped_lock lock(m_debugMutex);
151 // dump towers to histograms
152 // counts are the "codes" of multi-scale latome, or tile count
153
154 TFile *debugFile = dynamic_cast<TFile *>(gROOT->GetListOfFiles()->FindObject("debug_eFexTowerMakerFromEfexTowers.root"));
155 if (!debugFile) debugFile = TFile::Open("debug_eFexTowerMakerFromEfexTowers.root", "RECREATE");
156 if (debugFile->GetListOfKeys()->GetEntries() < 20) {
157 TDirectory *dir = gDirectory;
158 debugFile->cd();
159 TH2D ps("ps", "ps [code];#eta;#phi", 50, -2.5, 2.5, 64, -M_PI, M_PI);
160 TH2D l1("l1", "l1 [code];#eta;#phi", 200, -2.5, 2.5, 64, -M_PI, M_PI);
161 TH2D l2("l2", "l2 [code];#eta;#phi", 200, -2.5, 2.5, 64, -M_PI, M_PI);
162 TH2D l3("l3", "l3 [code];#eta;#phi", 50, -2.5, 2.5, 64, -M_PI, M_PI);
163 TH2D had("had", "had [code~25MeV or 500MeV for tile];#eta;#phi", 50, -2.5, 2.5, 64, -M_PI, M_PI);
164 std::vector < TH1 * > hists{&ps, &l1, &l2, &l3, &had};
165 for(auto eFexTower : *eFexTowers) {
166 auto counts = eFexTower->et_count();
167 if (counts.empty()) continue;
168 int etaIndex = int( (eFexTower->eta()+0.025)*10 ) + (((eFexTower->eta()+0.025)<0) ? -1 : 1); // runs from -25 to 25 (excluding 0)
169 int phiIndex = int( (eFexTower->phi()+0.025)*32./M_PI ) + ((eFexTower->phi()+0.025)<0 ? -1 : 1); // runs from -32 to 32 (excluding 0)
170 double tEta = ((etaIndex < 0 ? 0.5 : -0.5) + etaIndex - 0.5) * 0.1; // left edge
171 double tPhi = ((phiIndex < 0 ? 0.5 : -0.5) + phiIndex) * M_PI / 32; // centre
172 for(size_t i=0;i<counts.size();i++) {
173 if(i<10 && eFexTower->em_status()) continue; // bad status bits have their energy zerod by the firmware
174 if(i==10 && eFexTower->had_status()) continue;
175 if (eFexTower->disconnectedCount(i)) continue;
176 int layer; int cell=i;
177 if(i<1 || (i==4 && std::abs(eFexTower->eta()+0.025)>2.4)) {layer = 0;cell=0;}
178 else if(i<5) {layer = 1;cell = i-1;}
179 else if(i<9) {layer = 2;cell = i-5;}
180 else if(i<10) {layer = 3;cell=0;}
181 else {layer = 4;cell=0;}
182 if(!useHardcodedCuts && counts.at(i) <= noiseCutsMap[std::pair( int( (eFexTower->eta() + 2.525)/0.1 ), layer)]) continue;
183 hists.at(layer)->SetBinContent(hists.at(layer)->FindFixBin(tEta + 0.025 * cell + 0.0125, tPhi),counts.at(i));
184
185 }
186 }
187
188 TCanvas c;
189 c.SetName(TString::Format("evt%lu", ctx.eventID().event_number()));
190 c.SetTitle(TString::Format("Run %u LB %u Event %lu", ctx.eventID().run_number(), ctx.eventID().lumi_block(),
191 ctx.eventID().event_number()));
192 c.Divide(2, 3);
193 TH2D tobs("tobs", "Sum [MeV];#eta;#phi", 50, -2.5, 2.5, 64, -M_PI, M_PI);
194 for (size_t i = 0; i < hists.size(); i++) {
195 c.GetPad(i + 1)->cd();gPad->SetGrid(1,1);
196 hists[i]->SetStats(false);
197 hists[i]->SetMarkerSize(2); // controls text size
198 hists[i]->GetXaxis()->SetRangeUser(-0.3, 0.3);
199 hists[i]->GetYaxis()->SetRangeUser(-0.3, 0.3);
200 hists[i]->Draw((hists[i]->GetNbinsX() > 50) ? "coltext89" : "coltext");
201 for (int ii = 1; ii <= hists[i]->GetNbinsX(); ii++) {
202 bool isTile = (i==4 && std::abs(hists[i]->GetXaxis()->GetBinCenter(ii))<1.5);
203 for (int jj = 1; jj <= hists[i]->GetNbinsY(); jj++)
204 tobs.Fill(hists[i]->GetXaxis()->GetBinCenter(ii), hists[i]->GetYaxis()->GetBinCenter(jj),
205 isTile ? (hists[i]->GetBinContent(ii, jj)*500.) : eFEXCompression::expand(hists[i]->GetBinContent(ii, jj)));
206 }
207 }
208 c.GetPad(hists.size() + 1)->cd();
209 tobs.SetStats(false);
210 tobs.Draw("col");
211 TBox b(-0.3, -0.3, 0.3, 0.3);
212 b.SetLineColor(kRed);
213 b.SetFillStyle(0);
214 b.SetLineWidth(1);
215 b.SetBit(TBox::kCannotMove);
216 tobs.GetListOfFunctions()->Add(b.Clone());
217 gPad->AddExec("onClick", TString::Format(
218 "{ auto pad = gPad->GetCanvas()->GetPad(%lu); if( pad->GetEvent()==kButton1Down ) { double x = pad->PadtoX(pad->AbsPixeltoX(pad->GetEventX())); double y = pad->PadtoY(pad->AbsPixeltoY(pad->GetEventY())); for(int i=1;i<%lu;i++) {auto h = dynamic_cast<TH1*>(gPad->GetCanvas()->GetPad(i)->GetListOfPrimitives()->At(1)); if(h) {h->GetXaxis()->SetRangeUser(x-0.3,x+0.3);h->GetYaxis()->SetRangeUser(y-0.3,y+0.3); } } if(auto b = dynamic_cast<TBox*>(pad->FindObject(\"tobs\")->FindObject(\"TBox\"))) {b->SetX1(x-0.3);b->SetX2(x+0.3);b->SetY1(y-0.3);b->SetY2(y+0.3);} gPad->GetCanvas()->Paint(); gPad->GetCanvas()->Update(); } }",
219 hists.size() + 1, hists.size() + 1));
220 c.Write();
221 gDirectory = dir;
222 }
223 }
224
225
226
227 // STEP 3 - Write the completed eTowerContainer into StoreGate (move the local copy in memory)
228 SG::WriteHandle<LVL1::eTowerContainer> eTowerContainerSG(m_eTowerContainerSGKey, ctx);
229 ATH_CHECK(eTowerContainerSG.record(std::move(/*my_eTowerContainerRaw*/local_eTowerContainerRaw)));
230
231 // STEP 4 - Close and clean the event
232 m_eTowerBuilderTool->reset();
233
234 return StatusCode::SUCCESS;
235}
#define M_PI
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
bool msgLvl(const MSG::Level lvl) const
static int expand(unsigned int code)
Uncompress data.
SG::ReadHandleKey< xAOD::eFexTowerContainer > m_eFexTowerContainer2SGKey
SG::ReadHandleKey< xAOD::eFexTowerContainer > m_eFexTowerContainerSGKey
UnsignedIntegerProperty m_noiseCutBeginTimestamp
SG::ReadCondHandleKey< CondAttrListCollection > m_noiseCutsKey
ToolHandle< IeTowerBuilder > m_eTowerBuilderTool
SG::WriteHandleKey< LVL1::eTowerContainer > m_eTowerContainerSGKey
uint32_t em_status() const
get em status bit
uint32_t had_status() const
setter for the above
uint32_t eFEXtowerID() const
setter for the above
const std::vector< uint16_t > & et_count() const
get Energy Counts
float phi() const
setter for the above
bool disconnectedCount(size_t idx) const
setter for the above
float eta() const
The pseudorapidity ( )
@ layer
Definition HitInfo.h:79
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition EtaPhiLUT.cxx:23
eFexTower_v1 eFexTower
Define the latest version of the TriggerTower class.
Definition eFexTower.h:15

◆ 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::eTowerMakerFromEfexTowers::initialize ( )
overridevirtual

Definition at line 36 of file eTowerMakerFromEfexTowers.cxx.

37{
38 ATH_CHECK( m_eTowerBuilderTool.retrieve() );
41 ATH_CHECK( m_eTowerContainerSGKey.initialize() );
43
44 if (!m_noiseCutsKey.empty()) {
45 // disable built-in noise cuts because will be loading them from conditions db instead
47 }
48
49 return StatusCode::SUCCESS;
50}
static std::atomic< bool > s_disableNoiseCuts

◆ 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 }

◆ 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

◆ 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_WARNING(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_debugMutex

std::mutex LVL1::eTowerMakerFromEfexTowers::m_debugMutex
mutableprivate

Definition at line 47 of file eTowerMakerFromEfexTowers.h.

◆ 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_eFexTowerContainer2SGKey

SG::ReadHandleKey<xAOD::eFexTowerContainer> LVL1::eTowerMakerFromEfexTowers::m_eFexTowerContainer2SGKey {this, "SecondaryInputTowers", "L1_eFexEmulatedTowers", "If specified, will fallback to this collection of towers if the first collection is incomplete"}
private

Definition at line 35 of file eTowerMakerFromEfexTowers.h.

35{this, "SecondaryInputTowers", "L1_eFexEmulatedTowers", "If specified, will fallback to this collection of towers if the first collection is incomplete"};

◆ m_eFexTowerContainerSGKey

SG::ReadHandleKey<xAOD::eFexTowerContainer> LVL1::eTowerMakerFromEfexTowers::m_eFexTowerContainerSGKey {this, "InputTowers", "L1_eFexDataTowers", "efexTowers (use L1_eFexEmulatedTowers for built from SC, or L1_eFexDataTowers for efex readout"}
private

Definition at line 32 of file eTowerMakerFromEfexTowers.h.

32{this, "InputTowers", "L1_eFexDataTowers", "efexTowers (use L1_eFexEmulatedTowers for built from SC, or L1_eFexDataTowers for efex readout"};

◆ m_eTowerBuilderTool

ToolHandle<IeTowerBuilder> LVL1::eTowerMakerFromEfexTowers::m_eTowerBuilderTool {this, "eTowerBuilderTool", "LVL1::eTowerBuilder", "Tool that builds eTowers for simulation"}
private

Definition at line 39 of file eTowerMakerFromEfexTowers.h.

39{this, "eTowerBuilderTool", "LVL1::eTowerBuilder", "Tool that builds eTowers for simulation"};

◆ m_eTowerContainerSGKey

SG::WriteHandleKey<LVL1::eTowerContainer> LVL1::eTowerMakerFromEfexTowers::m_eTowerContainerSGKey {this, "MyETowers", "eTowerContainer", "MyETowers"}
private

Definition at line 38 of file eTowerMakerFromEfexTowers.h.

38{this, "MyETowers", "eTowerContainer", "MyETowers"};

◆ 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_minTowersRequired

UnsignedIntegerProperty LVL1::eTowerMakerFromEfexTowers::m_minTowersRequired {this,"MinTowersRequired",1,"Will use the primary collection provided there's at least this many towers there"}
private

Definition at line 36 of file eTowerMakerFromEfexTowers.h.

36{this,"MinTowersRequired",1,"Will use the primary collection provided there's at least this many towers there"};

◆ m_noiseCutBeginTimestamp

UnsignedIntegerProperty LVL1::eTowerMakerFromEfexTowers::m_noiseCutBeginTimestamp {this,"NoiseCutsBeginTimestamp",1672531200,"Earliest timestamp that noise cuts will be applied from db. Default is start of 2023"}
private

Definition at line 43 of file eTowerMakerFromEfexTowers.h.

43{this,"NoiseCutsBeginTimestamp",1672531200,"Earliest timestamp that noise cuts will be applied from db. Default is start of 2023"};

◆ m_noiseCutsKey

SG::ReadCondHandleKey<CondAttrListCollection> LVL1::eTowerMakerFromEfexTowers::m_noiseCutsKey
private
Initial value:
{this,"NoiseCutsKey","",
"Key to noise cuts (AttrListCollection)"}

Definition at line 41 of file eTowerMakerFromEfexTowers.h.

41 {this,"NoiseCutsKey","",
42 "Key to noise cuts (AttrListCollection)"};

◆ m_printedNoiseCuts

std::atomic<bool> LVL1::eTowerMakerFromEfexTowers::m_printedNoiseCuts = false
mutableprivate

Definition at line 45 of file eTowerMakerFromEfexTowers.h.

◆ 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: