Diana Software
QRootFileReaderBase.hh
Go to the documentation of this file.
1 
12 #ifndef __Q_ROOT_FILE_READER_BASE_HH__
13 #define __Q_ROOT_FILE_READER_BASE_HH__
14 
15 #include "QReader.hh"
16 #include "QDiana.hh"
17 #include <string>
18 #include <map>
19 
20 class QChain;
21 class TBranch;
22 
23 class QRootFileReaderBase : public Diana::QReader {
24 
25 public:
26 
27  virtual ~QRootFileReaderBase();
28 
30  virtual const QError& JumpToEvent(Long64_t event);
39  virtual void SetBranches(Diana::QEventAssembler& eva);
40 
41 protected:
47  virtual void LoadQChain();
53  virtual void AddToEvent(const char* brname,Diana::QObject **evData,
54  Diana::QEventAssembler& eva);
55 
64  virtual std::vector<TBranch*> GetBranches(QChain* chain,
65  Diana::QEventAssembler& eva);
66 
70  Long64_t fEvents;
72  Long64_t fEventNumber;
76  bool fInclusive;
77 
79  // std::string fCutsFile;
81  std::map<std::string,Diana::QObject **> fObjectList;
82 
83 };
84 #endif
TChain used in diana.
Definition: QChain.hh:23
error class with error type and description
Definition: QError.hh:115
Base class for readers for diana and apollo root files.
virtual void SetBranches(Diana::QEventAssembler &eva)
Set the branch caches.
std::map< std::string, Diana::QObject ** > fObjectList
???
virtual std::vector< TBranch * > GetBranches(QChain *chain, Diana::QEventAssembler &eva)
Get a list of the branches needed by the event.
QChain * fChain
Pointer to the QChain built by LoadQChain()
Long64_t fEventNumber
Current event number in the loop.
virtual void AddToEvent(const char *brname, Diana::QObject **evData, Diana::QEventAssembler &eva)
Add an object from a branch to the event.
bool fInclusive
Flag to automatically include ALL branches.
virtual void LoadQChain()
Build a QChain.
bool fDeleteInput
Flag to delete the input files.
Long64_t fEvents
Total number of events in fChain.
virtual const QError & JumpToEvent(Long64_t event)
Jump to a particular event in the chain.