#include <VisReco/VisPF/interface/VisPFContent.h>
Public Member Functions | |
VisPFContent (IgState *state) | |
Private Member Functions | |
IG_DECLARE_STATE_ELEMENT (VisPFContent) | |
void | init (void) |
Definition at line 6 of file VisPFContent.h.
VisPFContent::VisPFContent | ( | IgState * | state | ) |
Definition at line 17 of file VisPFContent.cc.
00018 : VisContent (state, s_key, MAIN_THREAD, 00019 lat::CreateCallback (this, &VisPFContent::init)) 00020 { 00021 }
VisPFContent::IG_DECLARE_STATE_ELEMENT | ( | VisPFContent | ) | [private] |
Definition at line 23 of file VisPFContent.cc.
References VisExceptionService::cmsExceptionCallback(), lat::CreateCallback(), VisExceptionService::errorCallback(), VisExceptionService::exceptionCallback(), find(), DBSPlugin::get(), edm::ParameterSet::getUntrackedParameter(), IgTwig::lookup(), VisQueuedTwig::onCmsException(), VisQueuedTwig::onError(), VisQueuedTwig::onException(), VisQueuedTwig::onUnhandledException(), VisConfigurationService::pSet(), python::EventAnalyzer_cfg::pset, VisContent::state(), and VisExceptionService::unhandledExceptionCallback().
00024 { 00025 IgQtLock (); 00026 00027 IgTwig *rootTwig = IgDocumentData::get (state ())->root (); 00028 IgTwig *topTwig = 0; 00029 IgTwig *eventTwig = 0; 00030 00031 topTwig = rootTwig->lookup ("CMS Event and Detector"); 00032 if (!topTwig) topTwig = new IgSimpleTwig (rootTwig, "CMS Event and Detector"); 00033 00034 eventTwig = topTwig->lookup ("CMS Event"); 00035 if (!eventTwig) eventTwig = new IgSimpleTwig (topTwig, "CMS Event"); 00036 00037 std::vector<std::string> twigs (3); 00038 00039 twigs.push_back("VisPFClusterTwig"); 00040 twigs.push_back("VisPFRecHitTwig"); 00041 twigs.push_back("VisPFRecTrackTwig"); 00042 twigs.push_back("VisTrackingParticleTwig"); 00043 twigs.push_back("VisGsfPFRecTrackTwig"); 00044 00045 const edm::ParameterSet *pset = VisConfigurationService::pSet (); 00046 if (pset) 00047 { 00048 twigs = pset->getUntrackedParameter<std::vector<std::string> > ("VisPFContent", twigs); 00049 } 00050 00051 VisExceptionService *exService = VisExceptionService::get (state ()); 00052 if (! exService) 00053 { 00054 exService = new VisExceptionService (state ()); 00055 } 00056 00057 IgTwig *pfEventTwig = new IgSimpleTwig(eventTwig, "PF Event"); 00058 00059 if (std::find (twigs.begin (), twigs.end (), "VisPFClusterTwig")!= twigs.end()) 00060 { 00061 VisPFClusterTwig* pfClusters = new VisPFClusterTwig(state(), pfEventTwig, "PF clusters"); 00062 00063 pfClusters->onException (lat::CreateCallback (exService, &VisExceptionService::exceptionCallback)); 00064 pfClusters->onError (lat::CreateCallback (exService, &VisExceptionService::errorCallback)); 00065 pfClusters->onCmsException (lat::CreateCallback (exService, &VisExceptionService::cmsExceptionCallback)); 00066 pfClusters->onUnhandledException (lat::CreateCallback (exService, &VisExceptionService::unhandledExceptionCallback)); 00067 } 00068 00069 if (std::find (twigs.begin (), twigs.end (), "VisPFRecHitTwig")!= twigs.end()) 00070 { 00071 VisPFRecHitTwig* recHits = new VisPFRecHitTwig(state (), pfEventTwig, "PF rec hits"); 00072 00073 recHits->onException (lat::CreateCallback (exService, &VisExceptionService::exceptionCallback)); 00074 recHits->onError (lat::CreateCallback (exService, &VisExceptionService::errorCallback)); 00075 recHits->onCmsException (lat::CreateCallback (exService, &VisExceptionService::cmsExceptionCallback)); 00076 recHits->onUnhandledException (lat::CreateCallback (exService, &VisExceptionService::unhandledExceptionCallback)); 00077 } 00078 00079 if (std::find (twigs.begin (), twigs.end (), "VisPFRecTrackTwig")!= twigs.end()) 00080 { 00081 VisPFRecTrackTwig* pfTracks = new VisPFRecTrackTwig(state (), pfEventTwig, "PF rec tracks"); 00082 00083 pfTracks->onException (lat::CreateCallback (exService, &VisExceptionService::exceptionCallback)); 00084 pfTracks->onError (lat::CreateCallback (exService, &VisExceptionService::errorCallback)); 00085 pfTracks->onCmsException (lat::CreateCallback (exService, &VisExceptionService::cmsExceptionCallback)); 00086 pfTracks->onUnhandledException (lat::CreateCallback (exService, &VisExceptionService::unhandledExceptionCallback)); 00087 } 00088 00089 if (std::find (twigs.begin (), twigs.end (), "VisTrackingParticleTwig")!= twigs.end()) 00090 { 00091 VisTrackingParticleTwig* trackingPs = new VisTrackingParticleTwig(state (), pfEventTwig, "tracking particles"); 00092 00093 trackingPs->onException (lat::CreateCallback (exService, &VisExceptionService::exceptionCallback)); 00094 trackingPs->onError (lat::CreateCallback (exService, &VisExceptionService::errorCallback)); 00095 trackingPs->onCmsException (lat::CreateCallback (exService, &VisExceptionService::cmsExceptionCallback)); 00096 trackingPs->onUnhandledException (lat::CreateCallback (exService, &VisExceptionService::unhandledExceptionCallback)); 00097 } 00098 00099 if (std::find (twigs.begin (), twigs.end (), "VisGsfPFRecTrackTwig")!= twigs.end()) 00100 { 00101 VisGsfPFRecTrackTwig* gsfRTs = new VisGsfPFRecTrackTwig(state (), pfEventTwig, "Gsf PF rec tracks"); 00102 00103 gsfRTs->onException (lat::CreateCallback (exService, &VisExceptionService::exceptionCallback)); 00104 gsfRTs->onError (lat::CreateCallback (exService, &VisExceptionService::errorCallback)); 00105 gsfRTs->onCmsException (lat::CreateCallback (exService, &VisExceptionService::cmsExceptionCallback)); 00106 gsfRTs->onUnhandledException (lat::CreateCallback (exService, &VisExceptionService::unhandledExceptionCallback)); 00107 } 00108 }