38 const std::vector<std::pair<std::string,std::string> >&
41 static std::vector<std::pair<std::string,std::string> > s_names;
43 s_names.push_back(std::pair<std::string,std::string>(
"pt",
"GeV"));
44 s_names.push_back(std::pair<std::string,std::string>(
"et",
"GeV"));
45 s_names.push_back(std::pair<std::string,std::string>(
"energy",
"GeV"));
66 boost::shared_ptr<FWItemAccessorBase> iAccessor,
72 m_purpose(iDesc.purpose()),
73 m_accessor(iAccessor),
74 m_displayProperties(iDesc.displayProperties()),
75 m_layer(iDesc.layer()),
77 m_productInstanceLabel(iDesc.productInstanceLabel()),
78 m_processName(iDesc.processName()),
80 m_interestingValueGetter(ROOT::Reflex::
Type::ByTypeInfo(*(m_accessor->modelType()->GetTypeInfo())),
82 m_filter(iDesc.filterExpression(),
""),
83 m_printedErrorThisEvent(
false),
141 const std::string& iProductInstance,
142 const std::string& iProcess)
171 if(!visChange && !colorChanged && !transparencyChanged) {
183 bool changed =
false;
184 changed = visChange && vis;
192 if (transparencyChanged) {
223 std::vector<ModelInfo>::iterator itInfo =
m_itemInfos.begin();
226 bool changed =
false;
227 bool wasVisible = itInfo->m_displayProperties.isVisible();
229 itInfo->m_displayProperties.setIsVisible(
false);
230 changed = wasVisible==
true;
232 itInfo->m_displayProperties.setIsVisible(
true);
233 changed = wasVisible==
false;
242 std::cerr <<
"Exception occurred while running filter on "<<
name()<<
"\n"
243 <<iException.what()<<std::endl;
301 std::vector<ModelInfo>::iterator itInfo =
m_itemInfos.begin();
303 if( itInfo->m_displayProperties.isVisible() ) {
304 itInfo->m_displayProperties.setIsVisible(
false);
309 m_itemInfos.at(iIndex).m_displayProperties.setIsVisible(
true);
323 int largest =
layer();
328 if ((*it) && (*it !=
this) && (*it)->layer() > largest) {
329 largest= (*it)->layer();
333 if(largest >=
layer()) {
346 int smallest =
layer();
351 if((*it) && (*it !=
this) && (*it)->layer() < smallest) {
352 smallest= (*it)->layer();
356 if(smallest <=
layer()) {
394 using namespace Reflex;
396 assert(iInfo == *(
m_type->GetTypeInfo()));
418 std::ostringstream
s;
419 s <<
"Failed to get " <<
name() <<
" because \n" <<iException.what();
470 if((*it) && (*it !=
this) && (*it)->layer() >=
layer()) {
485 if((*it) && (*it !=
this) && (*it)->layer() <=
layer()) {
576 std::ostringstream
s;
577 size_t lastChar =
name().size();
579 if(
name()[lastChar-1]==
's') {
582 s<<
name().substr(0,lastChar)<<
" "<<iIndex;
bool passesFilter(const void *) const
FWItemChangeSignal preItemChanged_
const FWDisplayProperties & defaultDisplayProperties() const
void setColor(Color_t iColor)
FWModelChangeManager * changeManager() const
void select(const FWModelId &iId)
void setData(const Reflex::Object &) const
const FWEventItemsManager * eventItemsManager() const
void moveToLayer(int layer)
std::string modelName(int iIndex) const
void setEvent(const edm::EventBase *iEvent)
const std::string & name() const
FWItemValueGetter m_interestingValueGetter
FWEventItem(fireworks::Context *iContext, unsigned int iItemId, boost::shared_ptr< FWItemAccessorBase > iAccessor, const FWPhysicsObjectDesc &iDesc)
const FWGeometry * getGeom() const
void setDisplayProperties(int iIndex, const FWDisplayProperties &) const
const std::string & filterExpression() const
FWItemChangeSignal defaultDisplayPropertiesChanged_
bool haveInterestingValue() const
one value from the model which is normally used for the popup
void getPrimaryData() const
void unselect(int iIndex) const
FWItemChangeSignal goingToBeDestroyed_
boost::shared_ptr< FWItemAccessorBase > m_accessor
const fireworks::Context * m_context
const std::string & expression() const
bool itemIsSelected() const
const std::string & processName() const
void setLabels(const std::string &iModule, const std::string &iProductInstance, const std::string &iProcess)
std::string m_moduleLabel
static int maxLayerValue()
const void * data(const std::type_info &) const
bool getByLabel(const InputTag &, Handle< T > &) const
Char_t transparency() const
void setDefaultDisplayProperties(const FWDisplayProperties &)
const std::string & productInstanceLabel() const
std::string m_processName
const T & max(const T &a, const T &b)
const std::string & stringValueFor(const void *) const
void setClassName(const std::string &)
const TClass * type() const
void unselectItem(FWEventItem *)
void unselect(const FWModelId &iId)
double modelInterestingValue(int iIndex) const
const std::string & modelInterestingValueAsString(int iIndex) const
static int minLayerValue()
bool m_printedErrorThisEvent
bool hasError() const
returns true if failed to get data for this event
FWSelectionManager * selectionManager() const
void toggleSelect(int iIndex) const
void changed(const FWModelId &)
const_iterator begin() const
NOTE: iterator is allowed to return a null object for items that have been removed.
bool isInBack() const
returns true if item is behind all other items
void setExpression(const std::string &)
FWDisplayProperties m_displayProperties
bool isInFront() const
returns true if item is in front of all other items
void setFilterExpression(const std::string &)
void setTransparency(Char_t transparency)
static const std::vector< std::pair< std::string, std::string > > & defaultMemberFunctionNames()
const edm::EventBase * m_event
double valueFor(const void *) const
std::string m_errorMessage
bool isCollection() const
const TClass * modelType() const
const std::string & errorMessage() const
returns error string if there was a problem this event
std::vector< ModelInfo > m_itemInfos
void select(int iIndex) const
const void * modelData(int iIndex) const
ModelInfo modelInfo(int iIndex) const
void setIsVisible(bool iSet)
const std::string & purpose() const
void setName(const std::string &iName)
std::vector< FWEventItem * >::const_iterator const_iterator
std::string m_productInstanceLabel
const FWGeometry * getGeom() const
const std::string & moduleLabel() const
void selectItem(FWEventItem *)
const_iterator end() const
const std::string * moduleLabel() const
FWItemChangeSignal filterChanged_