Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FillData.h

Go to the documentation of this file.
00001 #ifndef ANP_FILLDATA_H
00002 #define ANP_FILLDATA_H
00003 
00004 // $Id: FillData.h,v 1.1 2007/11/30 15:58:16 rustem Exp $
00005 //
00006 // Make tree with branches containing data from Event and Track,
00007 // useful when want to quickly examine _all_ data stored by event and tracks.
00008 
00009 // MINOS
00010 #include "Registry/Registry.h"
00011 
00012 // Local
00013 #include "PhysicsNtuple/AlgSnarl.h"
00014 
00015 class TBranch;
00016 class TFile;
00017 class TTree;
00018 
00019 namespace Anp
00020 {   
00021    class FillData : public AlgSnarl
00022    {
00023    public:
00024       
00025       FillData();
00026       virtual ~FillData();
00027 
00028       bool Run(Record &record);
00029 
00030       void Config(const Registry &reg);
00031 
00032       void Set(TDirectory *dir);
00033       
00034       void End(const DataBlock &);
00035 
00036    private:          
00037 
00038       struct Tree
00039       {
00040          Tree() : tree_ptr(0), branch_ptr(0), data(0.0) {}
00041          TTree *tree_ptr;
00042          TBranch *branch_ptr;
00043          Float_t data;
00044       };
00045      
00046       typedef std::map<std::string, Tree> TreeMap;
00047  
00048    private:
00049 
00050       void Fill(DataIter ibeg, DataIter iend, const std::string &key);
00051 
00052    private:
00053 
00054       TDirectory *fDir;
00055       TFile *fFile;
00056       
00057       std::string fDirName;
00058 
00059       TreeMap fTree;
00060    };
00061 }
00062 
00063 #endif

Generated on Mon Feb 15 11:06:41 2010 for loon by  doxygen 1.3.9.1