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
EventFile.h
Go to the documentation of this file.
1
7#ifndef __EVENT_FILE_H__
8#define __EVENT_FILE_H__
9
10//----------//
11// ROOT //
12//----------//
13#include <TFile.h>
14#include <TTree.h>
15
16//----------//
17// LCIO //
18//----------//
19#include <IO/LCReader.h>
20#include <IOIMPL/LCFactory.h>
21#include <EVENT/LCEvent.h>
22
23//-----------//
24// hpstr //
25//-----------//
26#include "Event.h"
27#include "IEventFile.h"
28
29class EventFile : public IEventFile {
30
31 public:
38 EventFile(const std::string ifilename, const std::string& ofilename);
39
45 virtual ~EventFile();
46
52 virtual bool nextEvent();
53
58 virtual void FillEvent();
59
65 void setupEvent(IEvent* ievent);
66
70 void close();
71
75 void resetOutputFileDir();
76
77 private:
79 TFile* ofile_{nullptr};
80
82 //std::vector<TFile* > outputs_f;
83
85 Event* event_{nullptr};
86
88 EVENT::LCEvent* lc_event_{nullptr};
89
91 IO::LCReader* lc_reader_{IOIMPL::LCFactory::getInstance()->createLCReader()};
92
93 int entry_{0};
94
97
98}; // EventFile
99
100#endif // __EVENT_FILE_H__
Class defining methods used to access event information and data collections.
int entry_
description
Definition EventFile.h:93
virtual ~EventFile()
Definition EventFile.cxx:21
IO::LCReader * lc_reader_
Definition EventFile.h:91
void close()
Definition EventFile.cxx:54
TFile * ofile_
Definition EventFile.h:79
int objNumRoot_
Definition EventFile.h:96
virtual bool nextEvent()
Load the next event in the file.
Definition EventFile.cxx:31
EVENT::LCEvent * lc_event_
Definition EventFile.h:88
Event * event_
Definition EventFile.h:85
void resetOutputFileDir()
Definition EventFile.cxx:50
virtual void FillEvent()
Persists the event.
Definition EventFile.cxx:24
void setupEvent(IEvent *ievent)
Setup the event object that will be used by this file.
Definition EventFile.cxx:45
Definition Event.h:35
description
Definition IEventFile.h:10
Definition IEvent.h:7