Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4AnalysisObjectManager.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TGO4ANALYSISOBJECTMANAGER_H
00017 #define TGO4ANALYSISOBJECTMANAGER_H
00018 
00019 #include "TNamed.h"
00020 #include "Htypes.h"
00021 
00022 class TCanvas;
00023 class TTree;
00024 class TMutex;
00025 class TFolder;
00026 class TH1;
00027 class TH2;
00028 class TFile;
00029 class TDirectory;
00030 class TIterator;
00031 
00032 class TGo4EventElement;
00033 class TGo4EventProcessor;
00034 class TGo4EventSource;
00035 class TGo4EventStore;
00036 class TGo4ObjectStatus;
00037 class TGo4TreeStructure;
00038 class TGo4CompositeEvent;
00039 class TObjArray;
00040 class TGo4Condition;
00041 class TGo4WinCond;
00042 class TGo4PolyCond;
00043 class TGo4AnalysisObjectNames;
00044 class TGo4DynamicEntry;
00045 class TGo4MbsHist;
00046 class TGo4Picture;
00047 class TGo4Parameter;
00048 class TGo4ParameterStatus;
00049 
00056 class TGo4AnalysisObjectManager : public TNamed
00057    {
00058    public:
00059 
00060       TGo4AnalysisObjectManager();
00061 
00062       TGo4AnalysisObjectManager(const char* name);
00063 
00064       ~TGo4AnalysisObjectManager();
00065 
00074       Bool_t AddObject(TNamed * anything, const Text_t* subfolder=0, Bool_t replace=kTRUE);
00075 
00083       TNamed * GetObject(const Text_t * name, const Text_t* folder=0);
00084 
00090       Bool_t RemoveObject(const Text_t * name, Bool_t del=kTRUE);
00091 
00092 
00093 
00100       Bool_t DeleteObjects(const Text_t * name);
00101 
00110     TObject* NextMatchingObject(const Text_t* expr,
00111                                 const Text_t* folder,
00112                                 Bool_t reset);
00113 
00121       TFolder * CreateBranchFolder(TObjArray* branchlist,
00122                                    const char* name,
00123                                    const char* title,
00124                                    Bool_t istopbranch=kFALSE);
00125 
00133       TFolder * CreateCompositeBranchFolder(TObjArray* branchlist,
00134                                             TGo4CompositeEvent* compevent,
00135                                             Int_t startindex, Int_t* skip,
00136                                             const char* name, const char* title);
00137 
00142       TGo4TreeStructure * CreateTreeStructure(TTree * thetree);
00143 
00145       TGo4TreeStructure * CreateTreeStructure(const Text_t* treename);
00146 
00148       TFolder* CreateMembersFolder(const char* membrfoldername, TClass* cl);
00149 
00150 
00155       Bool_t AddHistogram(TH1 * his, const Text_t* subfolder=0, Bool_t replace=kTRUE);
00156 
00160       TH1* GetHistogram(const Text_t * name);
00161 
00168       Bool_t RemoveHistogram(const Text_t * name, Bool_t del=kTRUE);
00169 
00187       TH1* MakeH1(const Text_t* histotype,
00188                   const Text_t* foldername,
00189                   const Text_t* histoname,
00190                   Int_t         nbinsx,
00191                   Axis_t        xlow,
00192                   Axis_t        xup,
00193                   const Text_t* title = 0,
00194                   const Text_t* xtitle = 0,
00195                   const Text_t* ytitle = 0);
00196 
00217       TH2* MakeH2(const Text_t* histotype,
00218                   const Text_t* foldername,
00219                   const Text_t* histoname,
00220                   Int_t         nbinsx,
00221                   Axis_t        xlow,
00222                   Axis_t        xup,
00223                   Int_t         nbinsy,
00224                   Axis_t        ylow,
00225                   Axis_t        yup,
00226                   const Text_t* title = 0,
00227                   const Text_t* xtitle = 0,
00228                   const Text_t* ytitle = 0);
00229 
00236       Bool_t AddTree(TTree* tree, const Text_t* subfolder=0);
00237 
00241       TTree * GetTree(const Text_t * name);
00242 
00249       Bool_t RemoveTree(TTree * tree, const Text_t* stepname=0);
00250 
00256       Bool_t AddAnalysisCondition(TGo4Condition * con, const Text_t* subfolder=0);
00257 
00265       Bool_t SetAnalysisCondition(const Text_t * name, TGo4Condition* con,
00266                                       Bool_t counter=kTRUE, TFolder* parent=0);
00267 
00272       TGo4Condition * GetAnalysisCondition(const Text_t * name);
00273 
00278       Bool_t RemoveAnalysisCondition(const Text_t * name);
00279 
00294       TGo4WinCond* MakeWindowCond(const Text_t* foldername,
00295                                   const Text_t* conditionname,
00296                                   Double_t      xlow,
00297                                   Double_t      xup,
00298                                   const Text_t* bindhistogram = 0,
00299                                   Bool_t        invert = kFALSE);
00300 
00317       TGo4WinCond* MakeWindowCond(const Text_t* foldername,
00318                                   const Text_t* conditionname,
00319                                   Double_t      xlow,
00320                                   Double_t      xup,
00321                                   Double_t      ylow,
00322                                   Double_t      yup,
00323                                   const Text_t* bindhistogram = 0,
00324                                   Bool_t        invert = kFALSE);
00325 
00349       TGo4PolyCond* MakePolyCond(const Text_t* foldername,
00350                                  const Text_t* conditionname,
00351                                  Int_t         size,
00352                                  Float_t       (*points)[2],
00353                                  const Text_t* bindhistogram = 0,
00354                                  Bool_t        invert = kFALSE);
00360       Bool_t AddParameter(TGo4Parameter * par, const Text_t* subfolder=0);
00361 
00369       Bool_t SetParameter(const Text_t * name, TGo4Parameter * par, TFolder* parent=0);
00370 
00378       Bool_t SetParameterStatus(const char* name, TGo4ParameterStatus* par, TFolder* parent=0);
00379 
00384       TGo4Parameter * GetParameter(const Text_t * name);
00385 
00390       Bool_t RemoveParameter(const Text_t * name);
00391 
00397       Bool_t AddPicture(TGo4Picture * pic, const Text_t* subfolder=0);
00398 
00406       Bool_t SetPicture(const Text_t * name, TGo4Picture * pic, TFolder* parent=0);
00407 
00412       TGo4Picture * GetPicture(const Text_t * name);
00413 
00418       Bool_t RemovePicture(const Text_t * name);
00419 
00420 
00426       Bool_t AddCanvas(TCanvas * can, const Text_t* subfolder=0);
00427 
00432       TCanvas * GetCanvas(const Text_t * name);
00433 
00438       Bool_t RemoveCanvas(const Text_t * name);
00439 
00444       TGo4ObjectStatus * CreateObjectStatus(const Text_t * name, const Text_t* folder=0);
00445 
00448       TGo4ObjectStatus * CreateObjectStatus(TObject* ob, Bool_t fullinfo=kTRUE);
00449 
00450 
00455       TGo4AnalysisObjectNames * CreateNamesList();
00456 
00462       TFolder * CreateNamesFolder(TFolder * objectfolder);
00463 
00467       TFolder * GetObjectFolder();
00468 
00472       Bool_t AddEventStore(TGo4EventStore * store);
00473 
00477       Bool_t RemoveEventStore(TGo4EventStore * store);
00478 
00482       Bool_t AddEventSource(TGo4EventSource * source);
00483 
00487       Bool_t RemoveEventSource(TGo4EventSource* source);
00488 
00492       Bool_t AddEventProcessor(TGo4EventProcessor * pro);
00493 
00497       Bool_t RemoveEventProcessor(TGo4EventProcessor * pro);
00498 
00502       Bool_t AddEventStructure(TGo4EventElement * ev);
00503 
00507       Bool_t RemoveEventStructure(TGo4EventElement * ev);
00508 
00512       TGo4EventElement * GetEventStructure(const Text_t * name);
00513 
00517       Bool_t ResetBackStores(Bool_t clearflag=kFALSE);
00518 
00522       void CloseAnalysis();
00523 
00525      void SaveObjects(TFile* file);
00526 
00531       Bool_t LoadObjects(TFile* statusfile);
00532 
00534       Bool_t AddDynamicEntry(TGo4DynamicEntry* entry);
00535 
00537       void ResetCurrentDynList();
00538 
00541       void ProcessDynamicList();
00542 
00543       void SetDynListInterval(Int_t val) { fiDynListInterval=val; }
00544 
00545       Int_t GetDynListInterval() const { return fiDynListInterval; }
00546 
00559       Bool_t AddDynamicHistogram(const char* name,
00560                                  const char* histo,
00561                                  const char* hevx, const char* hmemx,
00562                                  const char* hevy=0, const char* hmemy=0,
00563                                  const char* hevz=0, const char* hmemz=0,
00564                                  const char* condition=0,
00565                                  const char* cevx=0, const char* cmemx=0,
00566                                  const char* cevy=0, const char* cmemy=0);
00567 
00568 
00569 
00577    Bool_t AddTreeHistogram(const char* hisname, const char* treename, const char* varexp, const char* cutexp);
00578 
00579 
00584    void PrintHistograms(const Text_t* expression=0);
00589    void PrintConditions(const Text_t* expression=0);
00593    void PrintDynamicList();
00594 
00595 
00602    Bool_t ClearObjects(const Text_t* name);
00603 
00604 
00613    Bool_t ProtectObjects(const Text_t* name, const Option_t* flags);
00614 
00621        Bool_t RemoveDynamicEntry(const char* entryname);
00622 
00623 
00627       TFolder* FindSubFolder(TFolder* parent, const Text_t* subfolder, Bool_t create=kTRUE);
00628 
00629 
00630       Bool_t CreatedInMake() const { return fbCreatedinMake; }
00631 
00633       static const Text_t fgcTOPDYNAMICLIST[];
00634 
00636       static const Text_t fgcTOPFOLDER[];
00637 
00639       static const Text_t fgcHISTFOLDER[];
00640 
00642       static const Text_t fgcDYNFOLDER[];
00643 
00645       static const Text_t fgcCONDFOLDER[];
00646 
00648       static const Text_t fgcPARAFOLDER[];
00649 
00651       static const Text_t fgcTREEFOLDER[];
00652 
00654       static const Text_t fgcPICTFOLDER[];
00655 
00657       static const Text_t fgcCANVFOLDER[];
00658 
00660       static const Text_t fgcANALYSISFOLDER[];
00661 
00663       static const Text_t fgcEVENTFOLDER[];
00664 
00666       static const Text_t fgcSRCFOLDER[];
00667 
00669       static const Text_t fgcSTOREFOLDER[];
00670 
00672       static const Text_t fgcPROCFOLDER[];
00673 
00675       static const Text_t fgcUSRFOLDER[];
00676 
00678       static const Text_t fgcTMPFOLDER[];
00679 
00680    private:
00681 
00685       TFolder * fxGo4Dir;
00686 
00687 
00692       TFolder * fxHistogramDir;
00693 
00698       TFolder * fxConditionDir;
00699 
00703       TFolder * fxParameterDir;
00704 
00709       TFolder * fxDynListDir;
00710 
00714       TFolder * fxUserDir;
00715 
00719       TFolder * fxTreeDir;
00720 
00724       TFolder * fxPictureDir;
00725 
00729       TFolder * fxCanvasDir;
00730 
00734       TFolder * fxStoreDir;
00735 
00739       TFolder * fxSourceDir;
00740 
00744       TFolder * fxProcessorDir;
00745 
00749       TFolder * fxEventDir;
00750 
00754       TFolder * fxAnalysisDir;
00755 
00759       TFolder * fxTempFolder;
00760 
00764       TMutex * fxDirMutex;
00765 
00766 
00770       TList * fxMatchList;
00771 
00773       TIterator * fxMatchIterator; 
00774 
00775 
00781       Int_t fiDynListCount;
00782 
00786       Int_t fiDynListInterval;
00787 
00792       Bool_t fbCreatedinMake;    
00793 
00800       Bool_t fbSuppressLoadHistograms;    
00801 
00810       Bool_t AddObjectToFolder(TObject * ob,
00811                                TFolder* fold,
00812                                const char* subfolder=0,
00813                                Bool_t replace=kTRUE,
00814                                Bool_t uniquename=kFALSE,
00815                                Bool_t resetbits=kTRUE);
00816 
00823       Bool_t RemoveObjectFromFolder(const Text_t* fullname, TFolder* fold, Bool_t isDel);
00824 
00830       Bool_t LoadFolder(TFolder* source, TFolder* destination, Bool_t replace=kFALSE);
00831 
00837       Bool_t LoadFolder(TDirectory* source, TFolder* destination, Bool_t replace=kFALSE);
00838 
00844       Bool_t PutToFolder(TObject* ob, TFolder* destination, Bool_t replace=kFALSE);
00845 
00846 
00847 
00853       Bool_t SaveFolder(TFolder* source);
00854 
00860       void RemoveFromDir(TFolder* fold, TDirectory* dir);
00861 
00866     void AppendToDir(TObject* ob, TDirectory* dir);
00867 
00868 
00874    Int_t PrintFolder(TFolder* fold, Option_t* opt, const Text_t* expression=0);
00875 
00880    Bool_t ClearFolder(TFolder* fold);
00881 
00886    Bool_t ClearObject(TObject* ob);
00887 
00888 
00893    Bool_t DeleteFolder(TFolder* fold);
00894 
00899    Bool_t DeleteObject(TObject* ob);
00900 
00901 
00910     Bool_t ProtectFolder(TFolder* fold, const Option_t* flags);
00911 
00912 
00921    Bool_t ProtectObject(TObject* ob, const Option_t* flags);
00922 
00923 
00927      void CleanupDynamicLists(TObject* oldobject);
00928 
00932     TList* CreateObjectList(const Text_t* expr, const Text_t* folder=0);
00933 
00935     TList* CreateObjectList(const Text_t* expr, TFolder* fold);
00936 
00938     Bool_t IsMatching(const Text_t* string, const Text_t* expression);
00939 
00943     TObject* FindObjectInFolder(TFolder* folder, const Text_t* fullname);
00944 
00951     TObject* TestObject(TFolder* folder,
00952                         const Text_t* &pathname,
00953                         const Text_t* objectname,
00954                         const TClass* cl);
00955 
00956 };
00957 
00958 #endif //TGO4ANALYSISOBJECTMANAGER_H
00959 
00960 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:04 2008 for Go4-v3.04-1 by  doxygen 1.4.2