#ifndef myObjectStorage_h #define myObjectStorage_h #include #include "TString.h" #include "TSystem.h" #include "TTree.h" #include "TString.h" #include "TChain.h" #include "TDirectory.h" #include "TChainIndex.h" #include "TFile.h" #include "myObject.h" #include "DataStorage.h" #include "TBranch.h" class myObjectStorage : public DataStorage { public: myObjectStorage(); ~myObjectStorage(); void Configure(TString datasetName); void SaveTree(); void SaveEvent(Int_t RunNumber, Int_t LumiNumber, Int_t EventNumber, myObject* object); // obtain myObject from Tree. Make sure to test validity of object myObject* GetEvent(UInt_t RunNumber, UInt_t LumiNumber, UInt_t EventNumber); bool isConfigured(){return isConfigured_;} private: void LoadTree(); TFile *outfile_; TTree *outtree_; TChain *intree_; TChainIndex *index_; TString treeName_; UInt_t RunNumber_; UInt_t LumiNumber_; UInt_t EventNumber_; myObject *myObject_; TBranch *b_RunNumber_; TBranch *b_LumiNumber_; TBranch *b_EventNumber_; TBranch *b_object_; bool isConfigured_; bool intreeLoaded_; }; #endif