00001
00002
00003 #include "VisReco/VisHcal/interface/VisHcalRecoContent.h"
00004 #include "VisFramework/VisFrameworkBase/interface/VisExceptionService.h"
00005 #include "VisReco/VisHcal/interface/VisHBHERecHitTwig.h"
00006 #include "VisReco/VisHcal/interface/VisHFRecHitTwig.h"
00007 #include "VisReco/VisHcal/interface/VisHORecHitTwig.h"
00008 #include "VisReco/VisHcal/interface/VisHFDataFrameTwig.h"
00009 #include "VisFramework/VisFrameworkBase/interface/debug.h"
00010 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00011 #include "Iguana/Studio/interface/IgDocumentData.h"
00012 #include "Iguana/Framework/interface/IgTwig.h"
00013 #include "Iguana/Studio/interface/IgQtLock.h"
00014 #include <classlib/utils/Callback.h>
00015
00016
00017
00018
00019
00020
00021
00022
00023 IG_DEFINE_STATE_ELEMENT (VisHcalRecoContent, "Data/Reco/Hcal");
00024
00025
00026
00027
00028
00030 VisHcalRecoContent::VisHcalRecoContent (IgState *state)
00031 : VisContent (state, s_key, MAIN_THREAD,
00032 lat::CreateCallback (this, &VisHcalRecoContent::init))
00033 {
00034 }
00035
00038 void
00039 VisHcalRecoContent::init (void)
00040 {
00041 LOG (0, trace, LFfwvis, "VisHcalRecoContent::init()\n");
00042
00043 IgQtLock ();
00044
00045 IgTwig *rootTwig = IgDocumentData::get (state ())->root ();
00046 IgTwig *topTwig = 0;
00047 IgTwig *eventTwig = 0;
00048
00049 topTwig = rootTwig->lookup ("CMS Event and Detector");
00050 if (!topTwig) topTwig = new IgSimpleTwig (rootTwig, "CMS Event and Detector");
00051
00052 eventTwig = topTwig->lookup ("CMS Event");
00053 if (!eventTwig) eventTwig = new IgSimpleTwig (topTwig, "CMS Event");
00054
00055 IgTwig *hcalEventTwig = new IgSimpleTwig (eventTwig, "HCAL Event");
00056
00057 VisHBHERecHitTwig *hbheHits = new VisHBHERecHitTwig (state (), hcalEventTwig, "Hcal Barrel and Endcap RecHits");
00058 VisHFRecHitTwig *hfHits = new VisHFRecHitTwig (state (), hcalEventTwig, "Hcal Forward RecHits");
00059 VisHORecHitTwig *hoHits = new VisHORecHitTwig (state (), hcalEventTwig, "Hcal Outer RecHits", "", "", "", "", 0x0011ff00);
00060
00061 VisHFDataFrameTwig *hfDataFrame = new VisHFDataFrameTwig (state (), hcalEventTwig, "Hcal Forward Digis");
00062
00063 VisExceptionService *exService = VisExceptionService::get (state ());
00064 if (! exService)
00065 {
00066 exService = new VisExceptionService (state ());
00067 }
00068 hbheHits->onException (lat::CreateCallback (exService, &VisExceptionService::exceptionCallback));
00069 hbheHits->onError (lat::CreateCallback (exService, &VisExceptionService::errorCallback));
00070 hbheHits->onCmsException (lat::CreateCallback (exService, &VisExceptionService::cmsExceptionCallback));
00071 hbheHits->onUnhandledException (lat::CreateCallback (exService, &VisExceptionService::unhandledExceptionCallback));
00072
00073 hfHits->onException (lat::CreateCallback (exService, &VisExceptionService::exceptionCallback));
00074 hfHits->onError (lat::CreateCallback (exService, &VisExceptionService::errorCallback));
00075 hfHits->onCmsException (lat::CreateCallback (exService, &VisExceptionService::cmsExceptionCallback));
00076 hfHits->onUnhandledException (lat::CreateCallback (exService, &VisExceptionService::unhandledExceptionCallback));
00077
00078 hoHits->onException (lat::CreateCallback (exService, &VisExceptionService::exceptionCallback));
00079 hoHits->onError (lat::CreateCallback (exService, &VisExceptionService::errorCallback));
00080 hoHits->onCmsException (lat::CreateCallback (exService, &VisExceptionService::cmsExceptionCallback));
00081 hoHits->onUnhandledException (lat::CreateCallback (exService, &VisExceptionService::unhandledExceptionCallback));
00082
00083 hfDataFrame->onException (lat::CreateCallback (exService, &VisExceptionService::exceptionCallback));
00084 hfDataFrame->onError (lat::CreateCallback (exService, &VisExceptionService::errorCallback));
00085 hfDataFrame->onCmsException (lat::CreateCallback (exService, &VisExceptionService::cmsExceptionCallback));
00086 hfDataFrame->onUnhandledException (lat::CreateCallback (exService, &VisExceptionService::unhandledExceptionCallback));
00087 }