ATLAS Offline Software
Loading...
Searching...
No Matches
PileUpXingFolder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef PILEUPTOOLS_PILEUPXINGFOLDER_H
6#define PILEUPTOOLS_PILEUPXINGFOLDER_H 1
12
14#include "GaudiKernel/ToolHandle.h"
16
22class PileUpXingFolder : public extends<AthAlgTool, IPileUpXingFolder> {
23public:
25
26 PileUpXingFolder(const std::string& type,
27 const std::string& name,
28 const IInterface* parent);
29 virtual StatusCode initialize();
31
34
35 virtual const_iterator begin() const { return m_folder->begin(); }
36 virtual const_iterator end() const { return m_folder->end(); }
38// ///add a data object identifier to the list
39// virtual StatusCode add(const std::string& typeName, const std::string& skey) {
40// return m_folder->add(typeName, skey);
41// }
42// ///add a data object identifier to the list
43// virtual StatusCode add(const CLID& clid, const std::string& skey) {
44// return m_folder->add(clid, skey);
45// }
46
48
49 void setXings(int firstXing, int lastXing) {
50 m_firstXing.setValue(firstXing); m_lastXing.setValue(lastXing);
51 }
52 int firstXing() const { return m_firstXing.value(); }
53 int lastXing() const { return m_lastXing.value(); }
55
56 float cacheRefreshFrequency() const {return m_cacheRefreshFrequency.value();}
57
58
60 bool contains(int iCrossing) const {
61 return firstXing() <= iCrossing && iCrossing <= lastXing();
62 }
63
64private:
65 ToolHandle<SG::IFolder> m_folder;
66
67 Gaudi::Property<int> m_firstXing{this, "FirstXing", -999,
68 "First bunch crossing"};
69 Gaudi::Property<int> m_lastXing{this, "LastXing", 999,
70 "Last bunch crossing"};
71 Gaudi::Property<std::vector<std::string>> m_itemList{this, "ItemList", {},
72 "List of data object identifiers"};
73 Gaudi::CheckedProperty<double> m_cacheRefreshFrequency{this, "CacheRefreshFrequency", 0.0,
74 "Frequency with which data objs in this folder should be cleared from bkg caches "
75 "at end of event. Default 0 (never clear), range [0.0, 1.0]"};
76};
77
78#endif
an interface to SG::Folder with an attached bunch crossing interval
SG::IFolder::const_iterator const_iterator
void setXings(int firstXing, int lastXing)
virtual const_iterator end() const
virtual const_iterator begin() const
int firstXing() const
Gaudi::Property< int > m_firstXing
Gaudi::Property< int > m_lastXing
ToolHandle< SG::IFolder > m_folder
Gaudi::CheckedProperty< double > m_cacheRefreshFrequency
Gaudi::Property< std::vector< std::string > > m_itemList
virtual StatusCode initialize()
PileUpXingFolder(const std::string &type, const std::string &name, const IInterface *parent)
bool contains(int iCrossing) const
is iCrossing in the xing range?
float cacheRefreshFrequency() const
controls the rate at which we clear data objs in this folder at the end of event
IPileUpXingFolder::const_iterator const_iterator