ATLAS Offline Software
Loading...
Searching...
No Matches
BackgroundWordFiller Class Reference

#include <BackgroundWordFiller.h>

Inheritance diagram for BackgroundWordFiller:

Public Member Functions

 BackgroundWordFiller (const std::string &name, ISvcLocator *pSvcLocator)
 ~BackgroundWordFiller ()
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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::EventInfom_eventInfoKey
 ReadHandleKey for EventInfo object.
SG::ReadHandleKey< BeamBackgroundDatam_beamBackgroundDataKey
 ReadHandleKey for BeamBackgroundData.
SG::ReadHandleKey< LUCID_RawDataContainerm_LUCID_rawDataContainerKey
 ReadHandleKey for LUCID_RawDataContainer.
SG::ReadHandleKey< BcmCollisionTimem_bcmCollisionTimeKey
 ReadHandleKey for BcmCollisionTime.
SG::ReadHandleKey< SpacePointContainerm_sctSpacePointKey
 ReadHandleKey for SpacePointContainers.
SG::ReadHandleKey< SpacePointContainerm_pixSpacePointKey
SG::ReadHandleKey< TileCellContainerm_tileCellContainerKey
 ReadHandleKey for TileCellContainer.
SG::ReadHandleKey< LArCollisionTimem_lArCollisionTimeKey
 ReadHandleKey for LArCollisionTime.
SG::WriteDecorHandleKey< xAOD::EventInfom_eventInfoDecorKey
 WriteDecorHandleKey: needed for scheduling downstream clients.
Gaudi::Property< bool > m_isMC
int m_HaloNumSegment_Cut
int m_HaloNumClusterShape_Cut
int m_HaloNumOneSidedLoose_Cut
int m_HaloNumTwoSided_Cut
int m_PixMultiplicityHuge_Cut
int m_PixSPNonEmpty_Cut
int m_SCTMultiplicityHuge_Cut
int m_SCTSPNonEmpty_Cut
int m_LUCIDBeamVeto_Cut
float m_BCMTimeDiffCol_Cut
float m_BCMTimeDiffHalo_CutLo
int m_BCMHiGainCut
int m_BCMLowGainCut
int m_MBTSBeamVeto_MultiplicityCut
int m_MBTSBeamVeto_TimeCut
float m_MBTSBeamVeto_ThresholdCut
const uint8_t m_MBTSmask
const uint8_t m_MBTSpattern
int m_LArEC_SideCut
float m_LArECTimeDiffCol_Cut
float m_LArECTimeDiffHalo_CutLo
float m_LArECTimeDiffHalo_CutHi
unsigned int m_totalcnt
std::array< unsigned int, xAOD::EventInfo::NBackgroundWordsm_bitcntvec
std::array< const char *, xAOD::EventInfo::NBackgroundWordsm_bitnamevec
DataObjIDColl m_extendedExtraObjects
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 25 of file BackgroundWordFiller.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ BackgroundWordFiller()

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

Definition at line 45 of file BackgroundWordFiller.cxx.

47 : AthAlgorithm(name, pSvcLocator),
71 m_totalcnt(0),
72 m_bitnamevec{{"MBTSTimeDiffHalo", "MBTSTimeDiffCol",
73 "LArECTimeDiffHalo", "LArECTimeDiffCol",
74 "PixMultiplicityHuge", "PixSPNonEmpty",
75 "SCTMultiplicityHuge", "SCTSPNonEmpty",
76 "CSCTimeDiffHalo", "CSCTimeDiffCol",
77 "BCMTimeDiffHalo", "BCMTimeDiffCol",
78 "MuonTimingCol", "MuonTimingCosmic",
79 "MBTSBeamVeto", "BCMBeamVeto",
80 "LUCIDBeamVeto", "HaloMuonSegment",
81 "HaloClusterShape", "HaloMuonOneSided",
82 "HaloMuonTwoSided", "HaloTileClusterPattern",
83 "BeamGasPixel", "CosmicStandAlone",
84 "CosmicStandAloneTight", "CosmicCombined",
85 "CosmicCombinedTight", "BkgdResvBit1",
86 "BkgdResvBit2", "BkgdResvBit3",
87 "BkgdResvBit4", "BkgdResvBit5"}}
88
89{
90 // ID
91 declareProperty("HaloNumSegment_Cut", m_HaloNumSegment_Cut = 0);
92 declareProperty("HaloNumClusterShape_Cut", m_HaloNumClusterShape_Cut = 0);
93 declareProperty("HaloNumOneSidedLoose_Cut", m_HaloNumOneSidedLoose_Cut = 0);
94 declareProperty("HaloNumTwoSided_Cut", m_HaloNumTwoSided_Cut = 0);
95 declareProperty("PixMultiplicityHuge_Cut",
97 declareProperty("PixSPNonEmpty_Cut", m_PixSPNonEmpty_Cut = 10);
98 declareProperty("SCTMultiplicityHuge_Cut",
100 declareProperty("SCTSPNonEmpty_Cut", m_SCTSPNonEmpty_Cut = 10);
101
102 // LUCID
103 declareProperty("LUCIDBeamVeto_Cut", m_LUCIDBeamVeto_Cut = 0); // >0
104
105 declareProperty("BCMTimeDiffCol_Cut", m_BCMTimeDiffCol_Cut = 6.);
106 declareProperty("BCMTimeDiffHalo_CutLo", m_BCMTimeDiffHalo_CutLo = 6.);
107 declareProperty("BCMLowGainCut", m_BCMLowGainCut = 1);
108 declareProperty("BCMHiGainCut", m_BCMHiGainCut = 1);
109
110 declareProperty("MBTSBeamVeto_MultiplicityCut",
112 declareProperty("MBTSBeamVeto_TimeCut", m_MBTSBeamVeto_TimeCut = 15.);
113 declareProperty("MBTSBeamVeto_ThresholdCut",
114 m_MBTSBeamVeto_ThresholdCut = 40.0 / 222.0);
115 // LAr
116 declareProperty("LArEC_SideCut", m_LArEC_SideCut = 1);
117 declareProperty("LArECTimeDiffCol_Cut", m_LArECTimeDiffCol_Cut = 10.);
118 declareProperty("LArECTimeDiffHalo_CutLo", m_LArECTimeDiffHalo_CutLo = 10.);
119 declareProperty("LArECTimeDiffHalo_CutHi", m_LArECTimeDiffHalo_CutHi = 30.);
120
121 // Reset counter-array
122 m_bitcntvec.fill(0);
123}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::array< const char *, xAOD::EventInfo::NBackgroundWords > m_bitnamevec
std::array< unsigned int, xAOD::EventInfo::NBackgroundWords > m_bitcntvec
@ MASK_TIME
Definition TileCell.h:67
@ MASK_OVER
Definition TileCell.h:64
@ MASK_BADCH
Definition TileCell.h:63

◆ ~BackgroundWordFiller()

BackgroundWordFiller::~BackgroundWordFiller ( )

Definition at line 127 of file BackgroundWordFiller.cxx.

127{}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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< 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< 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 BackgroundWordFiller::execute ( )

Definition at line 149 of file BackgroundWordFiller.cxx.

149 {
150
152 // get the EventInfo
154
155 SG::ReadHandle<xAOD::EventInfo> eventInfoReadHandle(m_eventInfoKey);
156
157 m_totalcnt++;
158
160 // NOW SET THE BITS!!
162
164 // Halo Identification
166 if (!m_isMC) { // do not request in MC
167 SG::ReadHandle<BeamBackgroundData> beamBackgroundDataReadHandle(
169
170 if (!beamBackgroundDataReadHandle.isValid())
171 ATH_MSG_WARNING("Invalid ReadHandle to BeamBackgoundData with name: "
172 << m_beamBackgroundDataKey.key());
173 else {
174 if (beamBackgroundDataReadHandle->GetNumSegment() >
176 if (eventInfoReadHandle->updateEventFlagBit(
178 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
180 else
182 }
183 if (beamBackgroundDataReadHandle->GetNumClusterShape() >
185 if (eventInfoReadHandle->updateEventFlagBit(
187 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
189 else
191 }
192 if (beamBackgroundDataReadHandle->GetNumNoTimeLoose() >
194 if (eventInfoReadHandle->updateEventFlagBit(
196 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
198 else
200 }
201 if (beamBackgroundDataReadHandle->GetNumTwoSidedNoTime() >
203 if (eventInfoReadHandle->updateEventFlagBit(
205 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
207 else
209 }
210 }
211 }
212
214 // LUCID: LUCIDBeamVeto
216
217 if (!m_isMC) { // do not request in MC
218 SG::ReadHandle<LUCID_RawDataContainer> LUCID_rawDataContainerReadHandle(
220
221 if (!LUCID_rawDataContainerReadHandle.isValid())
222 ATH_MSG_WARNING("Invalid ReadHandle to LUCID_RawDataContainer with name: "
224 else {
225 int LUCIDcounter(0);
226 for (auto LUCID_rawData : *LUCID_rawDataContainerReadHandle) {
227 LUCIDcounter += LUCID_rawData->getNhitsPMTsideA();
228 LUCIDcounter += LUCID_rawData->getNhitsPMTsideC();
229 }
230 if (LUCIDcounter > m_LUCIDBeamVeto_Cut) {
231 if (eventInfoReadHandle->updateEventFlagBit(
233 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
235 else
237 }
238 }
239 }
240
242 // BCM: BCMTimeDiffHalo, BCMTimeDiffCol, BCMBeamVeto
244
245 SG::ReadHandle<BcmCollisionTime> bcmCollisionTimeReadHandle(
247
248 if (!bcmCollisionTimeReadHandle.isValid())
249 ATH_MSG_WARNING("Invalid ReadHandle to BcmCollisionTime with name: "
250 << m_bcmCollisionTimeKey.key());
251 else {
252 std::vector<float> bcmTDs = bcmCollisionTimeReadHandle->getDeltaT();
253 ATH_MSG_DEBUG(" got BCMCollisionTime object getMultiLG "
254 << bcmCollisionTimeReadHandle->getMultiLG() << " getMultiHG "
255 << bcmCollisionTimeReadHandle->getMultiHG() << " TDs size "
256 << bcmTDs.size());
257 float minTD = 999;
258 float maxTD = 0;
259
260 for (unsigned int i = 0; i < bcmTDs.size(); i++) {
261 float td = bcmTDs.at(i);
262 ATH_MSG_DEBUG(" BCMCollisionTime td " << i << " " << td);
263 if (fabs(td) > fabs(maxTD))
264 maxTD = td;
265 if (fabs(td) < fabs(minTD))
266 minTD = td;
267 }
268
269 ATH_MSG_DEBUG(" BCMCollisionTime minDT " << minTD << " maxDT " << maxTD);
270
271 if (fabs(minTD) < m_BCMTimeDiffCol_Cut) {
272 if (eventInfoReadHandle->updateEventFlagBit(
274 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
276 else
278 }
279 if (fabs(maxTD) > m_BCMTimeDiffHalo_CutLo) {
280 if (eventInfoReadHandle->updateEventFlagBit(
282 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
284 else
286 }
287 if (bcmCollisionTimeReadHandle->getMultiLG() > m_BCMLowGainCut ||
288 bcmCollisionTimeReadHandle->getMultiHG() > m_BCMHiGainCut) {
289 if (eventInfoReadHandle->updateEventFlagBit(
291 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
293 else
295 }
296 }
297
299 // ID SP multiplicities from Raw for filling: IDMultiplicityHuge,
300 // IDSPNonEmpty
302 if (!m_isMC) { // do not request in MC
303 SG::ReadHandle<SpacePointContainer> sctSP{m_sctSpacePointKey};
304 SG::ReadHandle<SpacePointContainer> pixSP{m_pixSpacePointKey};
305
306 if (!sctSP.isValid() or !pixSP.isValid()) {
307 ATH_MSG_WARNING("Invalid ReadHandle to SCT/Pix spacepoints");
308 } else {
309 int NSCTsps = 0;
310 int NPIXsps = 0;
311 std::for_each(sctSP->begin(), sctSP->end(), [&NSCTsps](const auto coll) {
312 if (coll)
313 NSCTsps += coll->size();
314 });
315 std::for_each(pixSP->begin(), pixSP->end(), [&NPIXsps](const auto coll) {
316 if (coll)
317 NPIXsps += coll->size();
318 });
319
320 // set IDMultiplicityHuge
321 if ((NPIXsps) > m_PixMultiplicityHuge_Cut) {
322 if (eventInfoReadHandle->updateEventFlagBit(
324 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
326 else
328 }
329
330 // set PixSPNonEmpty
331 if ((NPIXsps) > m_PixSPNonEmpty_Cut) {
332 if (eventInfoReadHandle->updateEventFlagBit(
334 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
336 else
338 }
339
340 if ((NSCTsps) > m_SCTMultiplicityHuge_Cut) {
341 if (eventInfoReadHandle->updateEventFlagBit(
343 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
345 else
347 }
348
349 // set SCTSPNonEmpty
350 if ((NSCTsps) > m_SCTSPNonEmpty_Cut) {
351 if (eventInfoReadHandle->updateEventFlagBit(
353 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
355 else
357 }
358 }
359 }
360
362 // MBTSBeamVeto
364
365 SG::ReadHandle<TileCellContainer> tileCellContainerReadHandle(
367
368 if (!tileCellContainerReadHandle.isValid())
369 ATH_MSG_WARNING("Invalid ReadHandle to TileCellContainer: "
370 << m_tileCellContainerKey.key());
371 else {
372 int MBTScount(0);
373
374 for (auto tileCellContainer : *tileCellContainerReadHandle) {
375 if (tileCellContainer->energy() < m_MBTSBeamVeto_ThresholdCut)
376 continue;
377 const uint8_t qbit1 = tileCellContainer->qbit1();
378
379 if ((qbit1 & m_MBTSmask) != m_MBTSpattern) {
380 ATH_MSG_DEBUG("Rejected based on quality bits");
381 continue;
382 }
383 if (fabs(tileCellContainer->time()) < m_MBTSBeamVeto_TimeCut)
384 MBTScount++;
385 } // loop on MBTS containers
386
387 if (MBTScount > m_MBTSBeamVeto_MultiplicityCut) {
388 if (eventInfoReadHandle->updateEventFlagBit(
390 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
392 else
394 }
395 }
396
398 // LAr EC collision timing stuff (from Guillaume...) - for filling:
399 // LArECTimeDiffHalo, LArECTimeDiffCol
401
402 if (!m_isMC) { // do not request in MC
403 SG::ReadHandle<LArCollisionTime> lArCollisionTimeReadHandle(
405
406 if (!lArCollisionTimeReadHandle.isValid())
407 ATH_MSG_WARNING("Invalid ReadHandle to LArCollisionTime: "
408 << m_lArCollisionTimeKey.key());
409 else {
410 if (lArCollisionTimeReadHandle->ncellA() > m_LArEC_SideCut &&
411 lArCollisionTimeReadHandle->ncellC() > m_LArEC_SideCut) {
412 float LArECtimeDiff = lArCollisionTimeReadHandle->timeA() -
413 lArCollisionTimeReadHandle->timeC();
414 if (fabs(LArECtimeDiff) < m_LArECTimeDiffCol_Cut) {
415 if (eventInfoReadHandle->updateEventFlagBit(
417 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
419 else
421 }
422 if (fabs(LArECtimeDiff) > m_LArECTimeDiffHalo_CutLo &&
423 fabs(LArECtimeDiff) < m_LArECTimeDiffHalo_CutHi) {
424 if (eventInfoReadHandle->updateEventFlagBit(
426 ATH_MSG_WARNING("Failed to set EventInfo Background word bit "
428 else
430 } // halo timing
431 } // enough hits per side
432 }
433 }
434
436 // printout the final background word
438 ATH_MSG_DEBUG("Summary of background word contents:");
439 ATH_MSG_DEBUG("MBTSTimeDiffHalo: " << eventInfoReadHandle->isEventFlagBitSet(
441 ATH_MSG_DEBUG("MBTSTimeDiffCol: " << eventInfoReadHandle->isEventFlagBitSet(
443 ATH_MSG_DEBUG("MBTSBeamVeto: " << eventInfoReadHandle->isEventFlagBitSet(
445 ATH_MSG_DEBUG("LArECTimeDiffHalo: " << eventInfoReadHandle->isEventFlagBitSet(
447 ATH_MSG_DEBUG("LArECTimeDiffCol: " << eventInfoReadHandle->isEventFlagBitSet(
450 "PixMultiplicityHuge: " << eventInfoReadHandle->isEventFlagBitSet(
452 ATH_MSG_DEBUG("PixSPNonEmpty: " << eventInfoReadHandle->isEventFlagBitSet(
455 "SCTMultiplicityHuge: " << eventInfoReadHandle->isEventFlagBitSet(
457 ATH_MSG_DEBUG("SCTSPNonEmpty: " << eventInfoReadHandle->isEventFlagBitSet(
459 ATH_MSG_DEBUG("CSCTimeDiffHalo: " << eventInfoReadHandle->isEventFlagBitSet(
461 ATH_MSG_DEBUG("CSCTimeDiffCol: " << eventInfoReadHandle->isEventFlagBitSet(
463 ATH_MSG_DEBUG("BCMTimeDiffHalo: " << eventInfoReadHandle->isEventFlagBitSet(
465 ATH_MSG_DEBUG("BCMTimeDiffCol: " << eventInfoReadHandle->isEventFlagBitSet(
467 ATH_MSG_DEBUG("BCMBeamVeto: " << eventInfoReadHandle->isEventFlagBitSet(
469 ATH_MSG_DEBUG("MuonTimingCol: " << eventInfoReadHandle->isEventFlagBitSet(
471 ATH_MSG_DEBUG("MuonTimingCosmic: " << eventInfoReadHandle->isEventFlagBitSet(
473 ATH_MSG_DEBUG("LUCIDBeamVeto: " << eventInfoReadHandle->isEventFlagBitSet(
475
476 return StatusCode::SUCCESS;
477}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
ReadHandleKey for EventInfo object.
SG::ReadHandleKey< BcmCollisionTime > m_bcmCollisionTimeKey
ReadHandleKey for BcmCollisionTime.
SG::ReadHandleKey< TileCellContainer > m_tileCellContainerKey
ReadHandleKey for TileCellContainer.
SG::ReadHandleKey< SpacePointContainer > m_pixSpacePointKey
SG::ReadHandleKey< SpacePointContainer > m_sctSpacePointKey
ReadHandleKey for SpacePointContainers.
SG::ReadHandleKey< BeamBackgroundData > m_beamBackgroundDataKey
ReadHandleKey for BeamBackgroundData.
SG::ReadHandleKey< LUCID_RawDataContainer > m_LUCID_rawDataContainerKey
ReadHandleKey for LUCID_RawDataContainer.
Gaudi::Property< bool > m_isMC
SG::ReadHandleKey< LArCollisionTime > m_lArCollisionTimeKey
ReadHandleKey for LArCollisionTime.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
@ Background
The beam background detectors.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode BackgroundWordFiller::finalize ( )

Definition at line 481 of file BackgroundWordFiller.cxx.

481 {
482
483 ATH_MSG_INFO("In finalize()");
484
486 "Job Summary for Background Word (NB. MBTS time bits not counted by this "
487 "alg)");
488 for (int ibit = 0; ibit < EventInfo::NBackgroundWords; ++ibit)
489 ATH_MSG_INFO(" " << m_bitnamevec[ibit] << ": " << m_bitcntvec[ibit] << "/"
490 << m_totalcnt << " events");
491
492 return StatusCode::SUCCESS;
493}
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode BackgroundWordFiller::initialize ( )

Definition at line 131 of file BackgroundWordFiller.cxx.

131 {
132
133 // initialise the read handle keys
134 ATH_CHECK(m_eventInfoKey.initialize());
137 ATH_CHECK(m_bcmCollisionTimeKey.initialize());
138 ATH_CHECK(m_sctSpacePointKey.initialize(!m_isMC));
139 ATH_CHECK(m_pixSpacePointKey.initialize(!m_isMC));
140 ATH_CHECK(m_tileCellContainerKey.initialize());
142 ATH_CHECK(m_eventInfoDecorKey.initialize());
143
144 return StatusCode::SUCCESS;
145}
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::WriteDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
WriteDecorHandleKey: needed for scheduling downstream clients.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< 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.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< 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< 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< 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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::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< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_ERROR(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< 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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_bcmCollisionTimeKey

SG::ReadHandleKey<BcmCollisionTime> BackgroundWordFiller::m_bcmCollisionTimeKey
private
Initial value:
{
this, "BcmCollisionTimeKey", "BcmCollisionTime",
"Key for BcmCollisionTime"}

ReadHandleKey for BcmCollisionTime.

Definition at line 51 of file BackgroundWordFiller.h.

51 {
52 this, "BcmCollisionTimeKey", "BcmCollisionTime",
53 "Key for BcmCollisionTime"};

◆ m_BCMHiGainCut

int BackgroundWordFiller::m_BCMHiGainCut
private

Definition at line 90 of file BackgroundWordFiller.h.

◆ m_BCMLowGainCut

int BackgroundWordFiller::m_BCMLowGainCut
private

Definition at line 91 of file BackgroundWordFiller.h.

◆ m_BCMTimeDiffCol_Cut

float BackgroundWordFiller::m_BCMTimeDiffCol_Cut
private

Definition at line 88 of file BackgroundWordFiller.h.

◆ m_BCMTimeDiffHalo_CutLo

float BackgroundWordFiller::m_BCMTimeDiffHalo_CutLo
private

Definition at line 89 of file BackgroundWordFiller.h.

◆ m_beamBackgroundDataKey

SG::ReadHandleKey<BeamBackgroundData> BackgroundWordFiller::m_beamBackgroundDataKey
private
Initial value:
{
this, "BeamBackgroundDataKey", "BeamBackgroundData",
"Key for BeamBackgroundData object"}

ReadHandleKey for BeamBackgroundData.

Definition at line 41 of file BackgroundWordFiller.h.

41 {
42 this, "BeamBackgroundDataKey", "BeamBackgroundData",
43 "Key for BeamBackgroundData object"};

◆ m_bitcntvec

std::array<unsigned int, xAOD::EventInfo::NBackgroundWords> BackgroundWordFiller::m_bitcntvec
private

Definition at line 102 of file BackgroundWordFiller.h.

◆ m_bitnamevec

std::array<const char*, xAOD::EventInfo::NBackgroundWords> BackgroundWordFiller::m_bitnamevec
private

Definition at line 103 of file BackgroundWordFiller.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventInfoDecorKey

SG::WriteDecorHandleKey<xAOD::EventInfo> BackgroundWordFiller::m_eventInfoDecorKey
private
Initial value:
{
this, "eventInfoDecorKey", m_eventInfoKey, "backgroundWord",
"Decoration key for downstream clients"}

WriteDecorHandleKey: needed for scheduling downstream clients.

Definition at line 72 of file BackgroundWordFiller.h.

72 {
73 this, "eventInfoDecorKey", m_eventInfoKey, "backgroundWord",
74 "Decoration key for downstream clients"};

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> BackgroundWordFiller::m_eventInfoKey
private
Initial value:
{
this, "eventInfoKey", "EventInfo", "Key for EventInfo object"}

ReadHandleKey for EventInfo object.

Definition at line 37 of file BackgroundWordFiller.h.

37 {
38 this, "eventInfoKey", "EventInfo", "Key for EventInfo object"};

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_HaloNumClusterShape_Cut

int BackgroundWordFiller::m_HaloNumClusterShape_Cut
private

Definition at line 80 of file BackgroundWordFiller.h.

◆ m_HaloNumOneSidedLoose_Cut

int BackgroundWordFiller::m_HaloNumOneSidedLoose_Cut
private

Definition at line 81 of file BackgroundWordFiller.h.

◆ m_HaloNumSegment_Cut

int BackgroundWordFiller::m_HaloNumSegment_Cut
private

Definition at line 79 of file BackgroundWordFiller.h.

◆ m_HaloNumTwoSided_Cut

int BackgroundWordFiller::m_HaloNumTwoSided_Cut
private

Definition at line 82 of file BackgroundWordFiller.h.

◆ m_isMC

Gaudi::Property<bool> BackgroundWordFiller::m_isMC
private
Initial value:
{this, "IsMC", false,
"Sets whether we should expect MC objects"}

Definition at line 76 of file BackgroundWordFiller.h.

76 {this, "IsMC", false,
77 "Sets whether we should expect MC objects"};

◆ m_lArCollisionTimeKey

SG::ReadHandleKey<LArCollisionTime> BackgroundWordFiller::m_lArCollisionTimeKey
private
Initial value:
{
this, "LArCollisionTimeKey", "LArCollisionTime",
"Key for LArCollisionTime"}

ReadHandleKey for LArCollisionTime.

Definition at line 67 of file BackgroundWordFiller.h.

67 {
68 this, "LArCollisionTimeKey", "LArCollisionTime",
69 "Key for LArCollisionTime"};

◆ m_LArEC_SideCut

int BackgroundWordFiller::m_LArEC_SideCut
private

Definition at line 97 of file BackgroundWordFiller.h.

◆ m_LArECTimeDiffCol_Cut

float BackgroundWordFiller::m_LArECTimeDiffCol_Cut
private

Definition at line 98 of file BackgroundWordFiller.h.

◆ m_LArECTimeDiffHalo_CutHi

float BackgroundWordFiller::m_LArECTimeDiffHalo_CutHi
private

Definition at line 99 of file BackgroundWordFiller.h.

◆ m_LArECTimeDiffHalo_CutLo

float BackgroundWordFiller::m_LArECTimeDiffHalo_CutLo
private

Definition at line 99 of file BackgroundWordFiller.h.

◆ m_LUCID_rawDataContainerKey

SG::ReadHandleKey<LUCID_RawDataContainer> BackgroundWordFiller::m_LUCID_rawDataContainerKey
private
Initial value:
{
this, "LUCID_rawDataContainerKey", "Lucid_RawData",
"Key for LUCID_RawDataContainer object"}

ReadHandleKey for LUCID_RawDataContainer.

Definition at line 46 of file BackgroundWordFiller.h.

46 {
47 this, "LUCID_rawDataContainerKey", "Lucid_RawData",
48 "Key for LUCID_RawDataContainer object"};

◆ m_LUCIDBeamVeto_Cut

int BackgroundWordFiller::m_LUCIDBeamVeto_Cut
private

Definition at line 87 of file BackgroundWordFiller.h.

◆ m_MBTSBeamVeto_MultiplicityCut

int BackgroundWordFiller::m_MBTSBeamVeto_MultiplicityCut
private

Definition at line 92 of file BackgroundWordFiller.h.

◆ m_MBTSBeamVeto_ThresholdCut

float BackgroundWordFiller::m_MBTSBeamVeto_ThresholdCut
private

Definition at line 94 of file BackgroundWordFiller.h.

◆ m_MBTSBeamVeto_TimeCut

int BackgroundWordFiller::m_MBTSBeamVeto_TimeCut
private

Definition at line 93 of file BackgroundWordFiller.h.

◆ m_MBTSmask

const uint8_t BackgroundWordFiller::m_MBTSmask
private

Definition at line 95 of file BackgroundWordFiller.h.

◆ m_MBTSpattern

const uint8_t BackgroundWordFiller::m_MBTSpattern
private

Definition at line 95 of file BackgroundWordFiller.h.

◆ m_PixMultiplicityHuge_Cut

int BackgroundWordFiller::m_PixMultiplicityHuge_Cut
private

Definition at line 83 of file BackgroundWordFiller.h.

◆ m_pixSpacePointKey

SG::ReadHandleKey<SpacePointContainer> BackgroundWordFiller::m_pixSpacePointKey
private
Initial value:
{
this, "Pixel_SpacePointKey", "PixelSpacePoints", ""}

Definition at line 58 of file BackgroundWordFiller.h.

58 {
59 this, "Pixel_SpacePointKey", "PixelSpacePoints", ""};

◆ m_PixSPNonEmpty_Cut

int BackgroundWordFiller::m_PixSPNonEmpty_Cut
private

Definition at line 84 of file BackgroundWordFiller.h.

◆ m_SCTMultiplicityHuge_Cut

int BackgroundWordFiller::m_SCTMultiplicityHuge_Cut
private

Definition at line 85 of file BackgroundWordFiller.h.

◆ m_sctSpacePointKey

SG::ReadHandleKey<SpacePointContainer> BackgroundWordFiller::m_sctSpacePointKey
private
Initial value:
{
this, "SCT_SpacePointKey", "SCT_SpacePoints", ""}

ReadHandleKey for SpacePointContainers.

Definition at line 56 of file BackgroundWordFiller.h.

56 {
57 this, "SCT_SpacePointKey", "SCT_SpacePoints", ""};

◆ m_SCTSPNonEmpty_Cut

int BackgroundWordFiller::m_SCTSPNonEmpty_Cut
private

Definition at line 86 of file BackgroundWordFiller.h.

◆ m_tileCellContainerKey

SG::ReadHandleKey<TileCellContainer> BackgroundWordFiller::m_tileCellContainerKey
private
Initial value:
{
this, "TileCellContainerKey", "MBTSContainer",
"Key for TileCellContainer"}

ReadHandleKey for TileCellContainer.

Definition at line 62 of file BackgroundWordFiller.h.

62 {
63 this, "TileCellContainerKey", "MBTSContainer",
64 "Key for TileCellContainer"};

◆ m_totalcnt

unsigned int BackgroundWordFiller::m_totalcnt
private

Definition at line 101 of file BackgroundWordFiller.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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