ATLAS Offline Software
|
This implements the methods for ICutFlowSvc. More...
#include <CutFlowSvc.h>
Public Member Functions | |
CutFlowSvc (const std::string &name, ISvcLocator *pSvcLocator) | |
Constructor. More... | |
virtual StatusCode | initialize () override final |
Gaudi Service Implementation. More... | |
virtual void | handle (const Incident &incident) override final |
Incident service handle listening for BeginInputFile, EndInputFile and MetaDataStop. More... | |
virtual CutIdentifier | registerFilter (const std::string &name, const std::string &description, bool nominalOnly) override final |
Register filter in the CutFlowSvc and returns the CutID of the corresponding CutBookkeeper. More... | |
virtual CutIdentifier registerTopFilter | ATLAS_NOT_THREAD_SAFE (const std::string &name, const std::string &description, unsigned int logic, const std::string &outputStream, bool nominalOnly) override final |
Tells CutFlowSvc that a filter is used directly by an outputStream with a given logical context. More... | |
virtual CutIdentifier | registerCut (const std::string &name, const std::string &description, CutIdentifier parentCutID, bool nominalOnly) override final |
Register cut as child of a filter in the CutFlowSvc and returns the CutID of the corresponding EventBookkeeper. More... | |
virtual void | setFilterDescription (CutIdentifier cutID, const std::string &descr) override final |
Set the description of an existing CutBookkeeper. More... | |
virtual void | addEvent (CutIdentifier cutID, const std::vector< float > &weights) override final |
Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID, using CutIdentifier returned by selfRegisterFilter. More... | |
virtual void | addEvent (CutIdentifier cutID, double weight) override final |
Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID, using CutIdentifier returned by selfRegisterFilter. More... | |
virtual uint64_t | getNAcceptedEvents (const CutIdentifier cutID) const override final |
Get number of accepted events for a cut. More... | |
const CutBookkeepersLocalCache & | getCutBookkeepers () const |
Get CutBookkeepers cache. More... | |
StatusCode | setNumberOfWeightVariations (size_t count) |
Set number of weight variations. More... | |
Private Member Functions | |
void | addEvent (CutIdentifier cutID, size_t index, double weight) |
Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID for a specific index in the cache. More... | |
StatusCode | determineCycleNumberFromInput (const std::string &collName) |
Helper function to determine the processing cycle number from the input meta-data store. More... | |
StatusCode | createContainers (size_t count) |
Helper function to create an empty containers (and its aux store) More... | |
xAOD::CutBookkeeper * | getCutBookkeeper (const CutIdentifier cutID, size_t index) const |
Get a CutBookkeeper given a CutID. More... | |
Private Attributes | |
Gaudi::Property< bool > | m_configured {this, "Configured", true, "configuration check"} |
CutFlow service should be explicitly configured. More... | |
ServiceHandle< StoreGateSvc > | m_inMetaDataStore {this, "InputMetaDataStore", "StoreGateSvc/InputMetaDataStore", ""} |
The input meta-data store. More... | |
Gaudi::Property< std::string > | m_completeCollName {this, "OutputCollName", "CutBookkeepers", ""} |
The name of the completed, i.e., fully processed, CutBookkeeperContainer. More... | |
CutBookkeepersLocalCache | m_containers |
Local CutBookkeeperContainers. More... | |
Gaudi::Property< int > | m_skimmingCycle {this, "SkimmingCycle", 0, "Skimming cycle of current job"} |
The current skimming cycle, i.e., how many processing stages we already had. More... | |
Gaudi::Property< std::string > | m_inputStream {this, "InputStream", "N/A", "The name of the input file stream"} |
The name of the currently used input file stream. More... | |
std::recursive_mutex | m_addEventMutex |
Mutex to protect adding an event. More... | |
std::unordered_set< CutIdentifier > | m_nominalOnlyCuts |
List of nominal-only filters. More... | |
This implements the methods for ICutFlowSvc.
Definition at line 43 of file CutFlowSvc.h.
CutFlowSvc::CutFlowSvc | ( | const std::string & | name, |
ISvcLocator * | pSvcLocator | ||
) |
Constructor.
Definition at line 23 of file CutFlowSvc.cxx.
|
finaloverridevirtual |
Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID, using CutIdentifier returned by selfRegisterFilter.
Definition at line 178 of file CutFlowSvc.cxx.
|
finaloverridevirtual |
Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID, using CutIdentifier returned by selfRegisterFilter.
Definition at line 193 of file CutFlowSvc.cxx.
|
private |
Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID for a specific index in the cache.
Definition at line 209 of file CutFlowSvc.cxx.
|
finaloverridevirtual |
Tells CutFlowSvc that a filter is used directly by an outputStream with a given logical context.
The only foreseen client should the DecisionSvc, with its Accept/Require/Veto.
|
private |
Helper function to create an empty containers (and its aux store)
Definition at line 336 of file CutFlowSvc.cxx.
|
private |
Helper function to determine the processing cycle number from the input meta-data store.
Definition at line 309 of file CutFlowSvc.cxx.
|
private |
const CutBookkeepersLocalCache & CutFlowSvc::getCutBookkeepers | ( | ) | const |
Get CutBookkeepers cache.
Definition at line 385 of file CutFlowSvc.cxx.
|
finaloverridevirtual |
|
finaloverridevirtual |
Incident service handle listening for BeginInputFile, EndInputFile and MetaDataStop.
Definition at line 231 of file CutFlowSvc.cxx.
|
finaloverridevirtual |
Gaudi Service Implementation.
Definition at line 32 of file CutFlowSvc.cxx.
|
finaloverridevirtual |
Register cut as child of a filter in the CutFlowSvc and returns the CutID of the corresponding EventBookkeeper.
This method should be used by filters to register their internal cuts that are not the Algs themselves.
Definition at line 130 of file CutFlowSvc.cxx.
|
finaloverridevirtual |
Register filter in the CutFlowSvc and returns the CutID of the corresponding CutBookkeeper.
This method should be used by filters that register themselves.
Definition at line 64 of file CutFlowSvc.cxx.
|
finaloverridevirtual |
StatusCode CutFlowSvc::setNumberOfWeightVariations | ( | size_t | count | ) |
Set number of weight variations.
Definition at line 377 of file CutFlowSvc.cxx.
|
mutableprivate |
Mutex to protect adding an event.
Definition at line 149 of file CutFlowSvc.h.
|
private |
The name of the completed, i.e., fully processed, CutBookkeeperContainer.
Definition at line 137 of file CutFlowSvc.h.
|
private |
CutFlow service should be explicitly configured.
Definition at line 131 of file CutFlowSvc.h.
|
private |
Local CutBookkeeperContainers.
Definition at line 140 of file CutFlowSvc.h.
|
private |
The input meta-data store.
Definition at line 134 of file CutFlowSvc.h.
|
private |
The name of the currently used input file stream.
Definition at line 146 of file CutFlowSvc.h.
|
private |
List of nominal-only filters.
Definition at line 152 of file CutFlowSvc.h.
|
private |
The current skimming cycle, i.e., how many processing stages we already had.
Definition at line 143 of file CutFlowSvc.h.