10#ifndef CBMMCEVENTFILTER_H
11#define CBMMCEVENTFILTER_H 1
15#include "FairMCApplication.h"
18#include "TClonesArray.h"
82 return (
fData.at(type) ==
nullptr ? 0 :
fData.at(type)->GetEntriesFast());
93 std::map<ECbmDataType, TClonesArray*>
fData;
104 virtual void Exec(Option_t*);
118 virtual InitStatus
Init();
Class deciding whether to store an MC event.
std::map< ECbmDataType, Int_t > fMinNofData
Data arrays.
void SetMinNofData(ECbmDataType type, Int_t value)
Set a cut on the minimum number of data of a given type.
Int_t fNofEventsOut
Counter: output events.
TString GetBranchName(ECbmDataType type) const
Get branch name from data type.
void GetBranch(ECbmDataType type)
Get a branch from FairRootManager.
virtual ~CbmMCEventFilter()
Destructor.
std::string Statistics() const
Info on number of MC objects in the arrays.
TObject * GetData(ECbmDataType type, Int_t index) const
Get a data object by index.
virtual void Exec(Option_t *)
Execution.
Int_t fNofEventsIn
Counter: input events.
std::map< ECbmDataType, TClonesArray * > fData
virtual void Finish()
Finish (end of run)
ClassDef(CbmMCEventFilter, 2)
Bool_t SelectEvent() const
Event selector method.
Int_t GetNofInputEvents() const
Number of processed events.
Int_t GetNofData(ECbmDataType type) const
Number of data in a branch.
virtual InitStatus Init()
Initialisation.