More information on this package is here.
#ifndef __TVIRTUAL_READER__
#define __TVIRTUAL_READER__
#include <iostream>
using namespace std;
#include <stdlib.h>
#include <unistd.h>
#include "TROOT.h"
#include "TSystem.h"
#include "TObject.h"
#include "TString.h"
#include "TChain.h"
#include "TChainElement.h"
#include "TFile.h"
#include "TGFileDialog.h"
#include "TTree.h"
#include "TClonesArray.h"
#include "TVector2.h"
#include "TVector3.h"
#include "TRotation.h"
#include "TLorentzVector.h"
#include "TLorentzRotation.h"
#include "TMath.h"
#include "TH1.h"
#include "TRandom.h"
#include "TString.h"
#include "TObjString.h"
#include "THEADERClass.h"
#include "TEVNTClass.h"
#include "TECPBClass.h"
#include "TSCPBClass.h"
#include "TDCPBClass.h"
#include "TCCPBClass.h"
#include "TLCPBClass.h"
#include "THEADClass.h"
#include "TTGBIClass.h"
#include "TEPICClass.h"
#ifdef __USE_MYSQL__
#include "TSQLServer.h"
#include "TSQLRow.h"
#include "TSQLResult.h"
#endif
#if ROOT_VERSION_CODE >= ROOT_VERSION(4,01,99)
#define GetEntries_return_t Long64_t
#else
#define GetEntries_return_t Double_t
#endif
#ifdef WRITE_GSIM
#include "TGSIMClass.h"
#endif
#include "TVirtualReader.h"
#include "THLSClass.h"
#include "TS1STClass.h"
#include "TTRGSClass.h"
enum Reader_Return_Codes { kNextEvent = 1,
kNOERR = 0,
kERR = -1,
kERR_end_of_file = -2,
kERR_No_Electron = -3,
kERR_File_Not_Found= -4,
kERR_Invalid_Runnum= -5,
kERR_Invalid_Evtnum= -6,
kERR_End_Of_Scaler_Seq=-7,
kERR_Scaler_Seq_Skip=-8
};
enum ReaderBits{ kBit0 = 1 << 0,
kBit1 = 1 << 1,
kBit2 = 1 << 2,
kBit3 = 1 << 3,
kBit4 = 1 << 4,
kBit5 = 1 << 5,
kBit6 = 1 << 6,
kBit7 = 1 << 7,
kBit8 = 1 << 8,
kBit9 = 1 << 9,
kBit10 = 1 << 10,
kBit11 = 1 << 11,
kBit12 = 1 << 12,
kBit13 = 1 << 13,
kBit14 = 1 << 14,
kBit15 = 1 << 15,
kBit16 = 1 << 16,
kBit17 = 1 << 17,
kBit18 = 1 << 18,
kBit19 = 1 << 19,
kBit20 = 1 << 20,
kBit21 = 1 << 21,
kBit22 = 1 << 22,
kBit23 = 1 << 23,
kBit24 = 1 << 24,
kBit25 = 1 << 25
};
enum Reader_DEBUG_Bits { kDBG_Error = kBit0,
kDBG_Info = kBit1,
kDBG_Debug = kBit2,
kDBG_Debug1 = kBit2,
kDBG_Debug2 = kBit3,
kDBG_Debug3 = kBit4
};
class TVirtualReader : public TObject{
public:
Int_t fDebug_Mode;
Int_t fCurrentEvent;
Int_t fCurrentScaler;
Int_t fScalerLastEvt;
Bool_t fReadScaler;
Bool_t fReadMCHD;
Bool_t fReadGSIM;
Bool_t fUseGSIM;
static Int_t fgInstanceCount;
Int_t fThisInstance;
public:
TVirtualReader();
~TVirtualReader();
virtual Int_t Add(const Char_t *filename);
virtual Int_t AddFile(const Char_t *filename,Int_t nentries=TChain::kBigNumber);
virtual Int_t AddEPICFile(const Char_t *filename, Int_t nentries);
virtual void Browse(TBrowser *b);
virtual Int_t Draw(const char *varexp, const char *selection, Option_t *option="",Int_t nentries=1234567890, Int_t firstentry=0);
virtual TObject *GetBankRow(const Char_t *bankname,Int_t nrow);
virtual Int_t GetCurrentEvent();
virtual GetEntries_return_t GetEntries() const;
virtual GetEntries_return_t GetEntriesFast() const;
virtual Int_t GetEntry(Int_t entry=-1,Int_t getall=0);
virtual Float_t GetEPICValue(const Char_t *fName);
virtual TEPICClass *GetEPICClass();
virtual Int_t GetEventNumber();
virtual TObjArray *GetFiles(void);
virtual THEADERClass *GetHEADER();
virtual Int_t GetHelicity();
virtual Int_t GetNFiles();
virtual TObject *GetNotify(void){return NULL;};
virtual Int_t GetNPart();
virtual Int_t GetNRows(const Char_t *bankname="EVNT");
virtual Int_t GetNtrees(void);
virtual TVector3 GetPart3Vector(Int_t indx);
virtual Int_t GetPartCharge(Int_t indx);
virtual Int_t GetPartID(Int_t indx);
virtual TVector3 GetPartVertex(Int_t indx);
virtual TString GetReaderType();
virtual Int_t GetRunNumber();
virtual TChain *GetTree(Char_t *treename="EVENT");
virtual Int_t GetTreeNumber(void);
virtual Int_t Next();
virtual Bool_t Notify();
virtual void Print(Int_t full=0);
virtual void PrintEventStatus();
virtual void PrintEPICPosition();
virtual Int_t ReadEvent(Int_t event,Int_t runnum=0);
virtual void Reset();
virtual void SetNotify(TObject *obj);
inline Int_t SetDebugMode( Int_t mode ) { return ( fDebug_Mode = mode ); }
ClassDef(TVirtualReader,1)
};
#endif
Author: Maurik Holtrop
Last update: VirtualReader/TVirtualReader:$Name: $:$Id: TVirtualReader.cc,v 1.12 2007/03/01 22:27:00 holtrop Exp $
CopyLeft - This code is freely available.
ROOT Home page - ClasTool Class index - Class Hierarchy - Top of the page