ATLAS Offline Software
Public Member Functions | Private Member Functions | List of all members
top::SaveEventSelector Class Reference

Save this event in the output file. More...

#include <SaveEventSelector.h>

Inheritance diagram for top::SaveEventSelector:
Collaboration diagram for top::SaveEventSelector:

Public Member Functions

virtual bool applyParticleLevel (const top::ParticleLevelEvent &) const
 This does stuff based on the information in a particle level event. More...
 

Private Member Functions

bool apply (const top::Event &) const override
 Accept every event. More...
 
std::string name () const override
 The name printed in the cutflow. More...
 

Detailed Description

Save this event in the output file.

This is special. Not only will it mark the event as passing the event selection, but it will also write out the selected objects to the output file in the CollectionTree.

Definition at line 18 of file SaveEventSelector.h.

Member Function Documentation

◆ apply()

bool top::SaveEventSelector::apply ( const top::Event ) const
overrideprivatevirtual

Accept every event.

Returns
Always true, so the event is accepted.

Implements top::EventSelectorBase.

Definition at line 8 of file SaveEventSelector.cxx.

8  {
9  return true;
10  }

◆ applyParticleLevel()

virtual bool top::EventSelectorBase::applyParticleLevel ( const top::ParticleLevelEvent ) const
inlinevirtualinherited

This does stuff based on the information in a particle level event.

The idea is that you implement this to return either true or false, based on the information held within the top::ParticleLevelEvent. If this function returns true, then the event is kept, otherwise it is removed. The function has a default implementation (which returns true) because it is expected that many EventSelector objects do not operate on ParticleLevelEvent objects.

Parameters
top::ParticleLevelEventthe current particle level event.
trueif the event should be kept (i.e. it passed the selector criteria), false otherwise.

Reimplemented in top::JetNGhostSelector, top::PrintEventSelector, top::PseudoTopRecoRun, top::NElectronNMuonTightSelector, top::NElectronNMuonSelector, top::NFwdElectronSelector, top::HTSelector, top::OSLeptonTightSelector, top::MLLSelector, top::MWTSelector, top::NElectronTightSelector, top::NFwdElectronTightSelector, top::NMuonTightSelector, top::OSLeptonSelector, top::METMWTSelector, top::METSelector, top::MLLWindow, top::NElectronSelector, top::NJetSelector, top::NMuonSelector, top::NPhotonSelector, top::NSoftMuonSelector, top::NTauSelector, top::SSLeptonTightSelector, top::SSLeptonSelector, top::ParticleLevelSelector, top::RecoLevelSelector, top::NVarRCJetSelector, top::NLargeJetSelector, and top::NRCJetSelector.

Definition at line 73 of file EventSelectorBase.h.

73 {return true;}

◆ name()

std::string top::SaveEventSelector::name ( ) const
overrideprivatevirtual

The name printed in the cutflow.

The name is extra special for this because it is used to check if we should write-out the event too.

Returns
The word SAVE.

Implements top::EventSelectorBase.

Definition at line 12 of file SaveEventSelector.cxx.

12  {
13  return "SAVE";
14  }

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