#include <VisFramework/VisEvent/interface/VisEventContentTwig.h>
Public Member Functions | |
virtual void | cascade (bool value) |
virtual bool | cascade (void) const |
virtual bool | expand (void) |
virtual void | name (const std::string &value) |
virtual std::string | name (void) const |
virtual void | onNewEvent (const edm::Event &event, const edm::EventSetup &eventSetup) |
virtual void | onPreEvent (const edm::EventID &eventID, const edm::Timestamp &timeStamp) |
virtual void | selfTraverse (bool value) |
virtual bool | selfTraverse (void) const |
virtual void | selfVisible (bool value) |
virtual bool | selfVisible (void) const |
IgState * | state (void) |
VisEventContentTwig (IgState *state, IgTwig *parent, const std::string name, bool traverse=false, bool visible=false, bool open=false) | |
Private Attributes | |
const std::string | m_name |
IgState * | m_state |
std::string | m_text |
Static Private Attributes | |
static const unsigned int | CASCADE = 8 |
static const unsigned int | TRAVERSE = 2 |
static const unsigned int | VISIBLE = 4 |
Definition at line 27 of file VisEventContentTwig.h.
VisEventContentTwig::VisEventContentTwig | ( | IgState * | state, | |
IgTwig * | parent, | |||
const std::string | name, | |||
bool | traverse = false , |
|||
bool | visible = false , |
|||
bool | open = false | |||
) |
Definition at line 38 of file VisEventContentTwig.cc.
References ASSERT.
00044 : IgCompoundTwig (parent), 00045 m_state (state), 00046 m_name (name), 00047 m_text ("No info") 00048 { 00049 ASSERT (parent); 00050 ASSERT (state); 00051 }
Implements IgTwig.
Definition at line 96 of file VisEventContentTwig.cc.
References CASCADE, and IgCompoundTwig::flag().
Implements IgTwig.
Definition at line 92 of file VisEventContentTwig.cc.
References CASCADE, and IgCompoundTwig::flag().
Referenced by VisEventContentTwigOps::actionExpand(), VisEventContentTwigOps::menuUpdate(), and onNewEvent().
Reimplemented from IgCompoundTwig.
Definition at line 62 of file VisEventContentTwig.cc.
References IgCompoundTwig::expand().
00063 { 00064 if (IgCompoundTwig::expand ()) 00065 { 00066 // if (children ()) destroy (); 00067 // VisEventNavigator::build (observed (), this); 00068 00069 return true; 00070 } 00071 00072 return false; 00073 }
void VisEventContentTwig::name | ( | const std::string & | value | ) | [virtual] |
Implements IgTwig.
Definition at line 58 of file VisEventContentTwig.cc.
References ASSERT.
00059 { ASSERT (false); }
std::string VisEventContentTwig::name | ( | void | ) | const [virtual] |
Implements IgTwig.
Definition at line 54 of file VisEventContentTwig.cc.
References m_name.
Referenced by MMM_DEFUN_FUNC(), and onNewEvent().
00055 { return m_name; }
void VisEventContentTwig::onNewEvent | ( | const edm::Event & | event, | |
const edm::EventSetup & | eventSetup | |||
) | [virtual] |
Definition at line 184 of file VisEventContentTwig.cc.
References arg, cascade(), DBSPlugin::get(), edm::Event::id(), IgRepSet::invalidate(), LFfwvis, LOG, m_text, name(), IgTwig::SELF_MASK, state(), IgTwig::STRUCTURE_MASK, and GsfMatrixTools::trace().
Referenced by VisEventCoreContent::init().
00186 { 00187 LOG (1, trace, LFfwvis, "VisEventContentTwig[" << name () 00188 << "]::onNewEvent()\n"); 00189 00190 m_text = QString ("Run # %1, event # %2") 00191 .arg (event.id ().run ()) 00192 .arg (event.id ().event ()).latin1 (); 00193 00194 if (IgQtAppStatusBarService *sbar = IgQtAppStatusBarService::get (state ())) 00195 sbar->setMessage (QString (m_text)); 00196 00197 if (! this->cascade ()) 00198 { 00199 this->cascade (true); 00200 if (! this->selfTraverse ()) 00201 this->selfTraverse (true); 00202 00203 IgRepSet::invalidate (this, IgTwig::SELF_MASK | IgTwig::STRUCTURE_MASK); 00204 } 00205 }
void VisEventContentTwig::onPreEvent | ( | const edm::EventID & | eventID, | |
const edm::Timestamp & | timeStamp | |||
) | [virtual] |
Definition at line 100 of file VisEventContentTwig.cc.
References ASSERT, IgSimpleTwig::cascade(), IgCompoundTwig::children(), VisTwigFactroyService::createTwig(), IgCompoundTwig::flag(), edm::BranchDescription::friendlyClassName(), edm::friendlyname::friendlyName(), DBSPlugin::get(), edm::ParameterSet::getUntrackedParameter(), it, moduleLabel(), edm::BranchDescription::moduleLabel(), p, edm::BranchDescription::processName(), edm::BranchDescription::productInstanceName(), VisConfigurationService::pSet(), python::EventAnalyzer_cfg::pset, IgSimpleTwig::selfTraverse(), IgSimpleTwig::selfVisible(), state(), and VisConfigurationService_cff::VisConfigurationService.
Referenced by VisEventCoreContent::init().
00102 { 00103 const edm::ParameterSet *pset = VisConfigurationService::pSet (); 00104 if(! pset) 00105 { 00106 edm::ParameterSet p; 00107 VisConfigurationService *visServise = new VisConfigurationService (p); 00108 pset = visServise->pSet (); 00109 delete visServise; 00110 } 00111 // We construct the dynamic content here and 00112 // do it only once - product registry gives us the product list 00113 // which is the list of all 'potential' products 00114 // which could ever be made in the job. 00115 // Therefore event to event we could have less products 00116 // then the total but never more. 00117 if (! children ()) 00118 // FIXME: We need to check if the content changes from event to event 00119 // if (children ()) destroy (); 00120 { 00121 edm::Service<edm::ConstProductRegistry> reg; 00122 00123 std::string friendlyName; 00124 std::string moduleLabel; 00125 std::string instanceName; 00126 std::string processName; 00127 00128 IgSimpleTwig *unknownTwigs = 0; 00129 00130 bool flag = pset->getUntrackedParameter<bool> ("UnknownDataCollections", true); 00131 if (flag) 00132 { 00133 unknownTwigs = new IgSimpleTwig (this, "Unknown Collection Types (load more iglets which knows how to represent them)"); 00134 unknownTwigs->selfTraverse (false); 00135 unknownTwigs->selfVisible (false); 00136 unknownTwigs->cascade (false); 00137 } 00138 00139 // Loop over provenance of products in registry. 00140 for (edm::ProductRegistry::ProductList::const_iterator it = reg->productList ().begin (); 00141 it != reg->productList ().end (); ++it) 00142 { 00143 // See FWCore/Framework/interface/BranchDescription.h 00144 // BranchDescription contains all the information for the product. 00145 edm::BranchDescription desc = it->second; 00146 friendlyName = desc.friendlyClassName (); 00147 moduleLabel = desc.moduleLabel (); 00148 instanceName = desc.productInstanceName (); 00149 processName = desc.processName (); 00150 00151 std::string twigName = friendlyName 00152 + std::string (":") + moduleLabel 00153 + std::string (":") + instanceName 00154 + std::string (":") + processName; 00155 // + std::string (" + \"") + moduleLabel 00156 // + std::string ("\" + \"") + instanceName 00157 // + std::string ("\" + \"") + processName + "\""; 00158 00159 VisEventSelector visSel (friendlyName, moduleLabel, instanceName, processName); 00160 00161 try 00162 { 00163 VisTwigFactroyService *tfService = VisTwigFactroyService::get (state ()); 00164 if (tfService) 00165 { 00166 tfService->createTwig (friendlyName, state (), this, friendlyName, moduleLabel, instanceName, processName); 00167 } 00168 } 00169 catch (...) 00170 { 00171 if (flag) 00172 { 00173 ASSERT (unknownTwigs); 00174 IgSimpleTwig *twig = new IgSimpleTwig (unknownTwigs, twigName); 00175 twig->selfTraverse (false); 00176 twig->selfVisible (false); 00177 } 00178 } 00179 } 00180 } 00181 }
Implements IgTwig.
Definition at line 80 of file VisEventContentTwig.cc.
References IgCompoundTwig::flag(), and TRAVERSE.
Implements IgTwig.
Definition at line 76 of file VisEventContentTwig.cc.
References IgCompoundTwig::flag(), and TRAVERSE.
Implements IgTwig.
Definition at line 88 of file VisEventContentTwig.cc.
References IgCompoundTwig::flag(), and VISIBLE.
Implements IgTwig.
Definition at line 84 of file VisEventContentTwig.cc.
References IgCompoundTwig::flag(), and VISIBLE.
Definition at line 69 of file VisEventContentTwig.h.
References m_state.
Referenced by onNewEvent(), and onPreEvent().
00070 { return m_state; }
const unsigned int VisEventContentTwig::CASCADE = 8 [static, private] |
const std::string VisEventContentTwig::m_name [private] |
IgState* VisEventContentTwig::m_state [private] |
std::string VisEventContentTwig::m_text [private] |
const unsigned int VisEventContentTwig::TRAVERSE = 2 [static, private] |
const unsigned int VisEventContentTwig::VISIBLE = 4 [static, private] |