32 sc = m_weightTools.retrieve();
33 if ( !
sc.isSuccess() ) {
38 unsigned int ntool = m_weightTools.size();
40 for (
size_t itool = 0; itool < ntool; ++itool ) {
42 if(msgLvl(MSG::DEBUG)) m_weightTools[itool]->print();
46 ATH_MSG_ERROR(
"The received tool is not an WeightToolBase?!?" );
47 return StatusCode::FAILURE;
50 std::string toolName = m_weightTools[itool]->name();
51 if(toolName.starts_with (
"ToolSvc.")) toolName.replace(0,8,
"");
52 CutIdentifier cID = cutFlowSvc()->registerTopFilter( toolName,
57 m_cutIDs.push_back(cID);
60 return StatusCode::SUCCESS;
66 ATH_MSG_DEBUG (
"Executing " << name() <<
", will loop over WeightTools...");
69 for (std::size_t i = 0; i <
m_cutIDs.size(); ++i) {
77 return StatusCode::SUCCESS;
84 return StatusCode::SUCCESS;
uint32_t CutIdentifier
InstanceIdentifier is a unique identifer used for every AthFilterAlgorithm instance.
StatusCode SumOfWeightsAlg::initialize ATLAS_NOT_THREAD_SAFE()
Install fatal handler with default options.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< ICutFlowSvc > & cutFlowSvc()
return a handle to an ICutFlowSvc instance
CutIdentifier cutID()
return the CutIdentifier corresponding to the top-level cut of this filter algorithm
virtual void setFilterPassed(bool state) const
Set the filter passed flag to the specified state.
AthFilterAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
ToolHandleArray< IWeightTool > m_weightTools
Athena configured tools.
std::vector< CutIdentifier > m_cutIDs
cut IDs
SumOfWeightsAlg()
Default constructor:
~SumOfWeightsAlg()
Destructor:
unsigned long m_eventsProcessed
number of events processed