Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
EventModuloCut.cxx
1/*
2 * EventModuloCut.cxx
3 *
4 * Created on: 8 lut 2016
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "EventModuloCut.h"
10
11#include "Event.h"
12#include "Package.h"
13#include "Parameter.h"
14
15namespace Hal {
16 EventModuloCut::EventModuloCut(Int_t modulo) : EventCut(1), fCount(-1), fModulo(modulo) { SetUnitName("Modulo"); }
17
18 Bool_t EventModuloCut::Pass(Event* /*event*/) {
19 fCount++;
20 Int_t modulo = fCount % fModulo;
21 SetValue(modulo);
22 return Validate();
23 }
24
25 EventModuloCut::~EventModuloCut() {}
26
27 Package* EventModuloCut::Report() const {
28 Package* pack = EventCut::Report();
29 pack->AddObject(new ParameterInt("Modulo", fModulo));
30 return pack;
31 }
32} // namespace Hal
void AddObject(TObject *object)
Definition Package.cxx:209