Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TGo4Sniffer.h"
00015
00016 #include "TFolder.h"
00017
00018 #include "TGo4AnalysisImp.h"
00019 #include "TGo4AnalysisObjectManager.h"
00020 #include "TGo4LockGuard.h"
00021
00022 #include "dabc/Hierarchy.h"
00023
00024 TGo4Sniffer::TGo4Sniffer(const char* name) :
00025 TRootSniffer(name,"dabc")
00026 {
00027 }
00028
00029 void TGo4Sniffer::ScanRoot(TRootSnifferScanRec& rec)
00030 {
00031 TGo4AnalysisObjectManager* om(0);
00032 TGo4AnalysisClient* cli(0);
00033 if (TGo4Analysis::Instance()) {
00034 om = TGo4Analysis::Instance()->ObjectManager();
00035 cli = TGo4Analysis::Instance()->GetAnalysisClient();
00036 }
00037
00038 if (om==0) {
00039 TRootSniffer::ScanRoot(rec);
00040 return;
00041 }
00042
00043 rec.SetField(dabc::prop_kind, "GO4.Analysis");
00044
00045 {
00046 TRootSnifferScanRec chld;
00047 if (chld.GoInside(rec, 0, "StreamerInfo"))
00048 chld.SetField(dabc::prop_kind, "ROOT.TStreamerInfoList");
00049 }
00050
00051 TGo4LockGuard mainlock;
00052
00053 TFolder* main = om->GetObjectFolder();
00054
00055 TFolder* hist_fold = dynamic_cast<TFolder*> (main->FindObject(TGo4AnalysisObjectManager::fgcHISTFOLDER));
00056 TFolder* par_fold = dynamic_cast<TFolder*> (main->FindObject(TGo4AnalysisObjectManager::fgcPARAFOLDER));
00057 TFolder* tree_fold = dynamic_cast<TFolder*> (main->FindObject(TGo4AnalysisObjectManager::fgcTREEFOLDER));
00058 TFolder* canv_fold = dynamic_cast<TFolder*> (main->FindObject(TGo4AnalysisObjectManager::fgcCANVFOLDER));
00059 TFolder* anal_fold = dynamic_cast<TFolder*> (main->FindObject(TGo4AnalysisObjectManager::fgcANALYSISFOLDER));
00060 TFolder* even_fold = dynamic_cast<TFolder*> (anal_fold->FindObject(TGo4AnalysisObjectManager::fgcEVENTFOLDER));
00061 TFolder* user_fold = dynamic_cast<TFolder*> (main->FindObject(TGo4AnalysisObjectManager::fgcUSRFOLDER));
00062
00063 ScanCollection(rec, hist_fold->GetListOfFolders(), TGo4AnalysisObjectManager::fgcHISTFOLDER);
00064 ScanCollection(rec, par_fold->GetListOfFolders(), TGo4AnalysisObjectManager::fgcPARAFOLDER, kTRUE);
00065 ScanCollection(rec, tree_fold->GetListOfFolders(), TGo4AnalysisObjectManager::fgcTREEFOLDER);
00066 ScanCollection(rec, canv_fold->GetListOfFolders(), TGo4AnalysisObjectManager::fgcCANVFOLDER);
00067 ScanCollection(rec, even_fold->GetListOfFolders(), TGo4AnalysisObjectManager::fgcEVENTFOLDER, kTRUE);
00068 ScanCollection(rec, user_fold->GetListOfFolders(), TGo4AnalysisObjectManager::fgcUSRFOLDER);
00069 }
00070