1 #ifndef ALIMUONTREEMANAGER_H
2 #define ALIMUONTREEMANAGER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONTreeManager
11 /// \brief Helper class to ease TTree (MUON) branches manipulations
13 // Author Laurent Aphecetche, Subatech
23 class AliMUONTreeManager : public TObject
28 virtual ~AliMUONTreeManager();
30 void AddClassName(TTree& tree, const char* pattern,
31 const char* className) const;
33 Bool_t MakeBranch(TTree& tree, const char* storeClassName,
34 const char* branchClassName, const char* branchName,
36 Int_t bufferSize = 4000, Int_t splitLevel = 1) const;
38 Bool_t SetAddress(TTree& tree, const char* branchName, void* address) const;
40 TObject* CreateObject(const TTree& tree, const char* detail) const;
42 void UpdateBranchStatuses(TTree& tree, const char* pattern) const;
44 const char* GetClassName(const TTree& tree, const char* pattern,
45 Bool_t makeDefault) const;
47 /** Debug method to get an event, but checking beforehand that all selected
48 branches do have a non-zero address set (otherwise we leak memory).
50 void GetEvent(TTree& tree, Int_t event) const;
52 /// Debug method to show the tree branch statuses and addresses.
53 void ShowStatus(TTree& tree) const;
57 const char* DefaultClassName(const char* treename, const char* pattern) const;
59 ClassDef(AliMUONTreeManager,0) // Helper class to handle MUON TTrees