Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
EventAna.h
1/*
2 * EventAna.h
3 *
4 * Created on: 05-08-2013
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#ifndef HALEVENTANA_H_
11#define HALEVENTANA_H_
12
13#include "Cut.h"
14#include "CutMonitor.h"
15#include "Std.h"
16#include "Task.h"
17
18#include <Rtypes.h>
19#include <RtypesCore.h>
20#include <TString.h>
21
22
23class TDatabasePDG;
24
25namespace Hal {
26 class Event;
27 class CutsAndMonitors;
28 class DataFormatManager;
29 class MemoryMapManager;
30
31 // s#define _HAL_CLEAR_BUFFER_ // realy need to clear bufferes?
32 class EventAnaChain;
36 class EventAna : public Task {
37 friend EventAnaChain;
38
39 protected:
49 enum eBitFormat { kCompression = 0, kSource = 1, kDirectAcesss = 2, kReader = 3, kChecking = 4 };
57 Int_t fMixSize;
70 const ECutUpdate fTiers;
74 TDatabasePDG* fPDG;
90 TString fComment;
94 Int_t fInit;
99 TString GetInputFileName() const { return fInFileName; };
104 void SetInputFileName(TString name) { fInFileName = name; };
108 virtual void InitMemoryMap();
109
110
111 private:
115 Bool_t fInChain;
116 std::vector<TString> fTagList;
117 Int_t fTaskID;
118 TString fInFileName;
119 DataFormatManager* fDataFormatManager; //->
120#ifdef _HAL_CLEAR_BUFFER_
121 Bool_t fIsLastTask;
122#endif
123
124 protected:
129 Bool_t IsInChain() const { return fInChain; };
133 void MarkAsInChain() { fInChain = kTRUE; };
139 void AddToAnaMetadata(Package* main_pack, TObject* obj) const;
144 Task::EInitFlag InitCutContainer();
149 virtual Task::EInitFlag CheckFormat();
155 inline Int_t GetTaskID() const { return fTaskID; };
159 virtual void LinkCollections();
163 virtual void ProcessEvent() {};
168 virtual void InitNewCutContainer();
172 virtual void CheckCutContainerCollections();
178 virtual Package* Report() const;
179#ifdef _HAL_CLEAR_BUFFER_
183 void ClearMemory();
184#endif
202 virtual Task::EInitFlag Init();
207 EventAna(ECutUpdate tiers);
208
209 public:
213 enum class EFormatOption {
214 kCompress,
228 kNoReaderAcces,
233 };
237 EventAna() : EventAna(ECutUpdate::kEvent) {};
242 EventAna(const EventAna& ana);
248 EventAna& operator=(const EventAna& other);
253 virtual void AddTags(TString tag);
266 virtual void AddCut(const Cut& cut, Option_t* opt = "");
281 virtual void AddCutMonitor(const CutMonitor& mon, Option_t* opt = "");
286 virtual void AddCutsAndMonitors(const CutsAndMonitors& monCuts);
291 virtual void Exec(Option_t* opt);
296 virtual void SetOption(Option_t* opt);
305 void SetFormatOption(EFormatOption option);
310 virtual void SetComment(TString comment);
318 virtual void SetFormat(Event* format, EFormatDepth depth = EFormatDepth::kAll);
322 virtual void FinishTask();
326 virtual ~EventAna();
327 ClassDef(EventAna, 1)
328 };
329} // namespace Hal
330#endif /* HALEVENTANA_H_ */
Definition Cut.h:40
Int_t fFormatOption
Definition EventAna.h:48
CutContainer * fCutContainer
Definition EventAna.h:78
virtual Task::EInitFlag CheckFormat()
Definition EventAna.cxx:371
Int_t fEventCollectionsNo
Definition EventAna.h:61
Int_t GetTaskID() const
Definition EventAna.h:155
Int_t fInit
Definition EventAna.h:94
virtual void LinkCollections()
Definition EventAna.cxx:190
Task::EInitFlag InitCutContainer()
Definition EventAna.cxx:127
virtual void AddCutMonitor(const CutMonitor &mon, Option_t *opt="")
Definition EventAna.cxx:327
virtual void CheckCutContainerCollections()
Definition EventAna.cxx:200
void MarkAsInChain()
Definition EventAna.h:133
virtual void SetOption(Option_t *opt)
Definition EventAna.cxx:115
Int_t fMixSize
Definition EventAna.h:57
void SetInputFileName(TString name)
Definition EventAna.h:104
Event * fCurrentEvent
Definition EventAna.h:86
virtual void InitNewCutContainer()
Definition EventAna.cxx:192
void SetFormatOption(EFormatOption option)
Definition EventAna.cxx:332
void AddToAnaMetadata(Package *main_pack, TObject *obj) const
Definition EventAna.cxx:239
virtual void InitMemoryMap()
Definition EventAna.cxx:423
TString GetInputFileName() const
Definition EventAna.h:99
Bool_t IsInChain() const
Definition EventAna.h:129
virtual void SetComment(TString comment)
Definition EventAna.cxx:302
UInt_t fProcessedEvents
Definition EventAna.h:53
MemoryMapManager * fMemoryMap
Definition EventAna.h:82
const ECutUpdate fTiers
Definition EventAna.h:70
EventAna & operator=(const EventAna &other)
Definition EventAna.cxx:449
TDatabasePDG * fPDG
Definition EventAna.h:74
virtual void AddCut(const Cut &cut, Option_t *opt="")
Definition EventAna.cxx:322
virtual Package * Report() const
Definition EventAna.cxx:259
virtual void FinishTask()
Definition EventAna.cxx:291
virtual ~EventAna()
Definition EventAna.cxx:252
Int_t fCurrentEventCollectionID
Definition EventAna.h:65
virtual void Exec(Option_t *opt)
Definition EventAna.cxx:104
virtual void AddCutsAndMonitors(const CutsAndMonitors &monCuts)
Definition EventAna.cxx:440
virtual void SetFormat(Event *format, EFormatDepth depth=EFormatDepth::kAll)
Definition EventAna.cxx:210
TString fComment
Definition EventAna.h:90
virtual void ProcessEvent()
Definition EventAna.h:163
virtual Task::EInitFlag Init()
Definition EventAna.cxx:66
virtual void AddTags(TString tag)
Definition EventAna.cxx:304