REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestEventSelectionProcess.h
1 /*************************************************************************
2  * This file is part of the REST software framework. *
3  * *
4  * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5  * For more information see http://gifna.unizar.es/trex *
6  * *
7  * REST is free software: you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * REST is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have a copy of the GNU General Public License along with *
18  * REST in $REST_PATH/LICENSE. *
19  * If not, see http://www.gnu.org/licenses/. *
20  * For the list of contributors see $REST_PATH/CREDITS. *
21  *************************************************************************/
22 
23 #ifndef RestProcess_TRestEventSelectionProcess
24 #define RestProcess_TRestEventSelectionProcess
25 
26 #include <TH1D.h>
27 #include <TRestEventProcess.h>
28 
29 #include <iostream>
30 
33  private:
34  TRestEvent* fEvent;
35  std::string fFileWithIDs;
36  std::string fConditions;
37  std::vector<Int_t> fList;
38 
40  // std::vector<Int_t> fEventIds; //<
41 
42  void Initialize() override;
43 
44  protected:
45  public:
46  RESTValue GetInputEvent() const override { return fEvent; }
47  RESTValue GetOutputEvent() const override { return fEvent; }
48 
49  void InitProcess() override;
50  TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
51 
52  void PrintMetadata() override;
53 
54  // Constructor
56  // Destructor
58 
59  const char* GetProcessName() const override { return "EventSelectionProcess"; }
60 
61  ClassDefOverride(TRestEventSelectionProcess, 3);
62 };
63 #endif
A base class for any REST event process.
A template process to serve as an example to create new TRestRawSignalEventProcess.
void PrintMetadata() override
Prints on screen the process data members.
TRestEventSelectionProcess()
Default constructor.
void Initialize() override
A list with the event ids that have been selected.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
void InitProcess() override
Process initialization.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
A base class for any REST event.
Definition: TRestEvent.h:38