hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
EventProcessor.h
Go to the documentation of this file.
1
9#ifndef _EVENT_HEADER_PROCESSOR_H__
10#define _EVENT_HEADER_PROCESSOR_H__
11
12//-----------------//
13// C++ StdLib //
14//-----------------//
15#include <string>
16#include <iostream>
17#include <fstream>
18#include <algorithm>
19//----------//
20// LCIO //
21//----------//
22#include <EVENT/LCGenericObject.h>
23#include <EVENT/LCCollection.h>
24
25//----------//
26// ROOT //
27//----------//
28#include "TClonesArray.h"
29
30//-----------//
31// hpstr //
32//-----------//
33#include "Collections.h"
34#include "EventHeader.h"
35#include "Processor.h"
36#include "VTPData.h"
37#include "TSData.h"
38#include "TriggerData.h"
39#include "Event.h"
40
41// Forward declarations
42class TTree;
43
48class EventProcessor : public Processor {
49
50 public:
51
59 EventProcessor(const std::string& name, Process& process);
60
63
69 virtual void configure(const ParameterSet& parameters);
70
77 virtual void initialize(TTree* tree);
78
84 virtual bool process(IEvent* ievent);
85
90 virtual void finalize();
91
92 private:
93
96 std::string headCollRoot_{"EventHeader"};
97 std::string rfCollLcio_{"RFHits"};
98 std::string trigCollLcio_{"TriggerBank"};
99
101 VTPData* vtpData{nullptr};
102 std::string vtpCollLcio_{""};
103 std::string vtpCollRoot_{""};
104
106 TSData* tsData{nullptr};
107 std::string tsCollLcio_{"TSBank"};
108 std::string tsCollRoot_{"TSBank"};
109
111 void parseVTPData(EVENT::LCGenericObject* vtp_data_lcio);
113 void parseTSData(EVENT::LCGenericObject* ts_data_lcio);
114
116 std::string run_evt_list_{""};
117 std::map<int,std::vector<int >> run_evts_map_;
118
119 int debug_{0};
120 int year_{2021};
121
122}; // EventProcessor
123
124#endif // _EVENT_HEADER_PROCESSOR_H__
Class used to encapsulate event information.
Class defining methods used to access event information and data collections.
Base classes for all user event processing components to extend.
Class used to decode TS words.
Class used to decode TI information.
Class used to decode VTP words.
Processor used to write event info. more details.
EventHeader * header_
std::string tsCollRoot_
description
std::string vtpCollRoot_
description
int debug_
Debug Level.
std::string headCollRoot_
description
virtual void configure(const ParameterSet &parameters)
Callback for the Processor to configure itself from the given set of parameters.
virtual void finalize()
Callback for the Processor to take any necessary action when the processing of events finishes.
std::string trigCollLcio_
description
virtual void initialize(TTree *tree)
Callback for the Processor to take any necessary action when the processing of events starts.
std::string run_evt_list_
std::map< int, std::vector< int > > run_evts_map_
description
std::string rfCollLcio_
description
std::string tsCollLcio_
description
void parseTSData(EVENT::LCGenericObject *ts_data_lcio)
std::string vtpCollLcio_
description
void parseVTPData(EVENT::LCGenericObject *vtp_data_lcio)
Definition IEvent.h:7
description
Base class for all event processing components.
Definition Processor.h:34
virtual bool process()
Process the histograms and generate analysis output.
Definition Processor.h:95