ATLAS Offline Software
PileUpXingFolder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef PILEUPTOOLS_PILEUPXINGFOLDER_H
6 #define PILEUPTOOLS_PILEUPXINGFOLDER_H 1
7 
14 #include "GaudiKernel/ToolHandle.h"
16 
22 class PileUpXingFolder : public extends<AthAlgTool, IPileUpXingFolder> {
23 public:
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  float cacheRefreshFrequency() const {return m_cacheRefreshFrequency.value();}
57 
58 
60  bool contains(int iCrossing) const {
61  return firstXing() <= iCrossing && iCrossing <= lastXing();
62  }
63 
64 private:
66 
67  ToolHandle<SG::IFolder> m_folder;
68  Gaudi::Property<int> m_firstXing;
69  Gaudi::Property<int> m_lastXing;
70  Gaudi::Property<std::vector<std::string>> m_itemList;
71  Gaudi::CheckedProperty<double> m_cacheRefreshFrequency;
75 };
76 
77 #endif
PileUpXingFolder::PileUpXingFolder
PileUpXingFolder(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PileUpXingFolder.cxx:8
PileUpXingFolder
specify time interval we want to study pileup for a set of data objs
Definition: PileUpXingFolder.h:22
PileUpXingFolder::m_cacheRefreshFrequency
Gaudi::CheckedProperty< double > m_cacheRefreshFrequency
Bound property [0.0, 1.0]: frequency with which data objs in this folder should be cleared from bkg c...
Definition: PileUpXingFolder.h:73
PileUpXingFolder::m_itemList
Gaudi::Property< std::vector< std::string > > m_itemList
this must match SG::Folder::m_itemList
Definition: PileUpXingFolder.h:70
PileUpXingFolder::m_folder
ToolHandle< SG::IFolder > m_folder
Definition: PileUpXingFolder.h:67
PileUpXingFolder::cacheRefreshFrequency
float cacheRefreshFrequency() const
controls the rate at which we clear data objs in this folder at the end of event
Definition: PileUpXingFolder.h:56
PileUpXingFolder::setXings
void setXings(int firstXing, int lastXing)
Definition: PileUpXingFolder.h:49
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PileUpXingFolder::firstXing
int firstXing() const
Definition: PileUpXingFolder.h:52
IPileUpXingFolder::const_iterator
SG::IFolder::const_iterator const_iterator
Definition: IPileUpXingFolder.h:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
PileUpXingFolder::m_lastXing
Gaudi::Property< int > m_lastXing
Definition: PileUpXingFolder.h:69
PileUpXingFolder::contains
bool contains(int iCrossing) const
is iCrossing in the xing range?
Definition: PileUpXingFolder.h:60
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PileUpXingFolder::end
virtual const_iterator end() const
Definition: PileUpXingFolder.h:36
IPileUpXingFolder.h
an interface to SG::Folder with an attached bunch crossing interval
PileUpXingFolder::lastXing
int lastXing() const
Definition: PileUpXingFolder.h:53
PileUpXingFolder::initialize
virtual StatusCode initialize()
Definition: PileUpXingFolder.cxx:26
PileUpXingFolder::const_iterator
IPileUpXingFolder::const_iterator const_iterator
Definition: PileUpXingFolder.h:32
PileUpXingFolder::begin
virtual const_iterator begin() const
Definition: PileUpXingFolder.h:35
PileUpXingFolder::m_firstXing
Gaudi::Property< int > m_firstXing
Definition: PileUpXingFolder.h:68