CbmRoot
Loading...
Searching...
No Matches
CbmAnaTreeSource.h
Go to the documentation of this file.
1/* Copyright (C) 2023-2023 Warsaw University of Technology, Warsaw
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Daniel Wielanek [committer] */
4#ifndef CBMANATREESOURCE_H_
5#define CBMANATREESOURCE_H_
10#include <FairSource.h>
11
12#include <TString.h>
13
14
17class TChain;
18
19class CbmAnaTreeSource : public FairSource {
20 Int_t fNFiles;
21 TString fTreeName;
22 TChain* fChain;
23 TString* fFileName; //[fNFiles]
26
27 protected:
28 void LoadConf(TString name);
29
30 public:
40 CbmAnaTreeSource(TString inFile, TString treeName = "rTree");
45 CbmAnaTreeSource(const CbmAnaTreeSource& source) = delete;
47 virtual ~CbmAnaTreeSource();
48 virtual Bool_t Init();
49 virtual Int_t ReadEvent(UInt_t = 0);
50 virtual void AddFile(TString file);
51 virtual void Close();
52 virtual void Reset(){};
53 virtual Bool_t ActivateObject(TObject**, const char*) { return kFALSE; }
54 virtual Source_Type GetSourceType() { return kFILE; };
55 virtual void SetParUnpackers(){};
56 virtual Bool_t SpecifyRunId() { return kTRUE; };
57 virtual Bool_t InitUnpackers() { return kTRUE; };
58 virtual Bool_t ReInitUnpackers() { return kTRUE; };
59 virtual Int_t CheckMaxEventNo(Int_t = 0);
60 virtual void ReadBranchEvent(const char* /*BrName*/){};
61 virtual void ReadBranchEvent(const char* /*BrName*/, Int_t /*Event*/){};
62 virtual void FillEventHeader(FairEventHeader* /*feh*/){};
65 void SetRunId(Int_t runId) { fRunId = runId; }
66 ClassDef(CbmAnaTreeSource, 1)
67};
68
69#endif /* CBMANATREESOURCE_H_ */
CbmAnaTreeMcSourceContainer * fContainerSim
virtual void AddFile(TString file)
CbmAnaTreeMcSourceContainer * GetSimContainer() const
virtual void FillEventHeader(FairEventHeader *)
virtual void ReadBranchEvent(const char *)
virtual Bool_t ActivateObject(TObject **, const char *)
void LoadConf(TString name)
virtual Source_Type GetSourceType()
virtual void SetParUnpackers()
virtual Int_t CheckMaxEventNo(Int_t=0)
virtual Bool_t SpecifyRunId()
virtual Bool_t Init()
CbmAnaTreeRecoSourceContainer * fContainerReco
virtual Bool_t ReInitUnpackers()
virtual void Reset()
virtual void ReadBranchEvent(const char *, Int_t)
CbmAnaTreeRecoSourceContainer * GetRecoContainer() const
virtual Bool_t InitUnpackers()
void SetRunId(Int_t runId)
CbmAnaTreeSource & operator=(const CbmAnaTreeSource &)=delete
virtual Int_t ReadEvent(UInt_t=0)
CbmAnaTreeSource(const CbmAnaTreeSource &source)=delete