////////////////////////////////////////////////////////// // This class has been automatically generated on // Mon Apr 11 15:52:11 2005 by ROOT version 4.00/08 // from TTree hittree/hittree // found on file: /d/alice01/kschwarz/hitfile.root ////////////////////////////////////////////////////////// #ifndef Anaproof_h #define Anaproof_h #include #include #include #include #include // added by KS class Anaproof : public TSelector { public : TTree *fChain; //!pointer to the analyzed TTree or TChain // Declaration of leave types TMytrackerhit *myHit; // comment removed UInt_t fUniqueID; UInt_t fBits; Int_t trackID; Int_t chamberNb; Double_t edep; UInt_t pos_fUniqueID; UInt_t pos_fBits; Double_t pos_fX; Double_t pos_fY; Double_t pos_fZ; // variables_for TCounter Class TCounter *counterobj; Int_t chambercounter0; Int_t chambercounter1; Int_t chambercounter2; Int_t chambercounter3; Int_t chambercounter4; TFile *myfile; TTree *mytree; TH1F *myhist; // List of branches TBranch *b_myHit_fUniqueID; //! TBranch *b_myHit_fBits; //! TBranch *b_myHit_trackID; //! TBranch *b_myHit_chamberNb; //! TBranch *b_myHit_edep; //! TBranch *b_myHit_pos_fUniqueID; //! TBranch *b_myHit_pos_fBits; //! TBranch *b_myHit_pos_fX; //! TBranch *b_myHit_pos_fY; //! TBranch *b_myHit_pos_fZ; //! TBranch *b_myHit; // my own Branch Anaproof(TTree *tree=0) { // filled with some life !! myHit = new TMytrackerhit(); chambercounter0 = 0; chambercounter1 = 0; chambercounter2 = 0; chambercounter3 = 0; chambercounter4 = 0; myhist = new TH1F("Chamberhisto","comment",5,0,5); } ~Anaproof() { } Int_t Version() const {return 1;} void Begin(TTree *tree); void SlaveBegin(TTree *tree); void Init(TTree *tree); Bool_t Notify(); Bool_t Process(Int_t entry); void SetOption(const char *option) { fOption = option; } void SetObject(TObject *obj) { fObject = obj; } void SetInputList(TList *input) {fInput = input;} TList *GetOutputList() const { return fOutput; } void SlaveTerminate(); void Terminate(); ClassDef(Anaproof,0); }; #endif #ifdef Anaproof_cxx void Anaproof::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses of the tree // will be set. It is normaly not necessary to make changes to the // generated code, but the routine can be extended by the user if needed. // Init() will be called many times when running with PROOF. // Set branch addresses if (tree == 0) return; fChain = tree; // fChain->SetMakeClass(1); // commented out fChain->SetBranchAddress("fUniqueID",&fUniqueID); fChain->SetBranchAddress("fBits",&fBits); fChain->SetBranchAddress("trackID",&trackID); fChain->SetBranchAddress("chamberNb",&chamberNb); fChain->SetBranchAddress("edep",&edep); fChain->SetBranchAddress("pos.fUniqueID",&pos_fUniqueID); fChain->SetBranchAddress("pos.fBits",&pos_fBits); fChain->SetBranchAddress("pos.fX",&pos_fX); fChain->SetBranchAddress("pos.fY",&pos_fY); fChain->SetBranchAddress("pos.fZ",&pos_fZ); fChain->SetBranchAddress("myHit",&myHit); // added by KS } Bool_t Anaproof::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. Typically here the branch pointers // will be retrieved. It is normaly not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. // Get branch pointers b_myHit_fUniqueID = fChain->GetBranch("fUniqueID"); b_myHit_fBits = fChain->GetBranch("fBits"); b_myHit_trackID = fChain->GetBranch("trackID"); b_myHit_chamberNb = fChain->GetBranch("chamberNb"); b_myHit_edep = fChain->GetBranch("edep"); b_myHit_pos_fUniqueID = fChain->GetBranch("pos.fUniqueID"); b_myHit_pos_fBits = fChain->GetBranch("pos.fBits"); b_myHit_pos_fX = fChain->GetBranch("pos.fX"); b_myHit_pos_fY = fChain->GetBranch("pos.fY"); b_myHit_pos_fZ = fChain->GetBranch("pos.fZ"); b_myHit = fChain->GetBranch("myHit"); return kTRUE; } #endif // #ifdef Anaproof_cxx