Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use make_shared in visualization #16768

Merged
merged 1 commit into from Nov 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Fireworks/Core/interface/CmsShowCommonPopup.h
Expand Up @@ -2,7 +2,7 @@
#define Fireworks_Core_CmsShowCommonPopup_h

#ifndef __CINT__
#include <boost/shared_ptr.hpp>
#include <memory>
#endif
#include "GuiTypes.h"
#include "TGFrame.h"
Expand Down Expand Up @@ -64,7 +64,7 @@ class CmsShowCommonPopup : public TGTransientFrame,
FWColorSelect* m_colorSelectWidget[kFWGeomColorSize];
FWColorSelect* m_colorRnrCtxHighlightWidget;
FWColorSelect* m_colorRnrCtxSelectWidget;
std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters;
std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
#endif
TGComboBox *m_combo;
};
Expand Down
4 changes: 2 additions & 2 deletions Fireworks/Core/interface/CmsShowViewPopup.h
Expand Up @@ -21,7 +21,7 @@
// system include files
#include <vector>
#ifndef __CINT__
#include <boost/shared_ptr.hpp>
#include <memory>
#include <sigc++/sigc++.h>
#endif
#include "TGFrame.h"
Expand Down Expand Up @@ -66,7 +66,7 @@ class ViewerParameterGUI : public TGCompositeFrame,
TGTab* m_tab;
std::string m_selectedTabName;
#ifndef __CINT__
std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters;
std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
#endif
};

Expand Down
4 changes: 2 additions & 2 deletions Fireworks/Core/interface/FWEvePtr.h
Expand Up @@ -19,7 +19,7 @@
//

// system include files
#include <boost/shared_ptr.hpp>
#include <memory>
#include "TEveElement.h"

// user include files
Expand Down Expand Up @@ -76,7 +76,7 @@ class FWEvePtr {
//const FWEvePtr& operator=(const FWEvePtr&); // stop default

// ---------- member data --------------------------------
boost::shared_ptr<TEveElement> m_container;
std::shared_ptr<TEveElement> m_container;
};


Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Core/interface/FWEveView.h
Expand Up @@ -145,7 +145,7 @@ class FWEveView : public FWViewBase
FWBoolParameter m_showCameraGuide;
FWBoolParameter m_useGlobalEnergyScale;

boost::shared_ptr<FWViewContextMenuHandlerGL> m_viewContextMenu;
std::shared_ptr<FWViewContextMenuHandlerGL> m_viewContextMenu;
std::auto_ptr<FWViewContext> m_viewContext;
std::auto_ptr<FWViewEnergyScale> m_localEnergyScale;

Expand Down
10 changes: 5 additions & 5 deletions Fireworks/Core/interface/FWEveViewManager.h
Expand Up @@ -22,7 +22,7 @@
#include <vector>
#include <map>
#include <set>
#include <boost/shared_ptr.hpp>
#include <memory>

// user include files
#include "Fireworks/Core/interface/FWViewManagerBase.h"
Expand Down Expand Up @@ -88,7 +88,7 @@ class FWEveViewManager : public FWViewManagerBase
const FWEveViewManager& operator=(const FWEveViewManager&); // stop default

FWViewBase* buildView(TEveWindowSlot* iParent, const std::string& type);
FWEveView* finishViewCreate (boost::shared_ptr<FWEveView>);
FWEveView* finishViewCreate (std::shared_ptr<FWEveView>);

void beingDestroyed(const FWViewBase*);
void modelChanges(const FWModelIds& iIds);
Expand All @@ -99,17 +99,17 @@ class FWEveViewManager : public FWViewManagerBase
// ---------- member data --------------------------------

typedef std::map<std::string, std::vector<BuilderInfo> > TypeToBuilder;
typedef std::vector<boost::shared_ptr<FWProxyBuilderBase> > BuilderVec;
typedef std::vector<std::shared_ptr<FWProxyBuilderBase> > BuilderVec;
typedef BuilderVec::iterator BuilderVec_it;
typedef std::vector<boost::shared_ptr<FWEveView > >::iterator EveViewVec_it;
typedef std::vector<std::shared_ptr<FWEveView > >::iterator EveViewVec_it;

TypeToBuilder m_typeToBuilder;

static bool s_syncAllViews;

std::map<int, BuilderVec> m_builders; // key is viewer bit

std::vector< std::vector<boost::shared_ptr<FWEveView> > > m_views;
std::vector< std::vector<std::shared_ptr<FWEveView> > > m_views;

std::map<const FWEventItem*,FWInteractionList*> m_interactionLists;
};
Expand Down
6 changes: 3 additions & 3 deletions Fireworks/Core/interface/FWEventItem.h
Expand Up @@ -22,7 +22,7 @@
#include <string>
#include <vector>
#include "FWCore/Utilities/interface/TypeWithDict.h"
#include <boost/shared_ptr.hpp>
#include <memory>
#include <sigc++/connection.h>

// user include files
Expand Down Expand Up @@ -75,7 +75,7 @@ class FWEventItem

FWEventItem(fireworks::Context* iContext,
unsigned int iItemId,
boost::shared_ptr<FWItemAccessorBase> iAccessor,
std::shared_ptr<FWItemAccessorBase> iAccessor,
const FWPhysicsObjectDesc& iDesc, const FWConfiguration* pbConf = 0);
virtual ~FWEventItem();

Expand Down Expand Up @@ -231,7 +231,7 @@ class FWEventItem
std::string m_name;
const TClass* m_type;
std::string m_purpose;
boost::shared_ptr<FWItemAccessorBase> m_accessor;
std::shared_ptr<FWItemAccessorBase> m_accessor;
FWDisplayProperties m_displayProperties;
int m_layer;
mutable std::vector<ModelInfo> m_itemInfos;
Expand Down
4 changes: 2 additions & 2 deletions Fireworks/Core/interface/FWEventItemsManager.h
Expand Up @@ -20,7 +20,7 @@

// system include files
#include <vector>
#include <boost/shared_ptr.hpp>
#include <memory>
#include "sigc++/signal.h"

// user include files
Expand Down Expand Up @@ -86,7 +86,7 @@ class FWEventItemsManager : public FWConfigurable
fireworks::Context* m_context;

const edm::EventBase* m_event;
boost::shared_ptr<FWItemAccessorFactory> m_accessorFactory;
std::shared_ptr<FWItemAccessorFactory> m_accessorFactory;
};


Expand Down
1 change: 0 additions & 1 deletion Fireworks/Core/interface/FWGUIManager.h
Expand Up @@ -21,7 +21,6 @@
// system include files
#include <map>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <sigc++/sigc++.h>
#include "Rtypes.h"
#include "GuiTypes.h"
Expand Down
4 changes: 2 additions & 2 deletions Fireworks/Core/interface/FWGeometryTableViewBase.h
Expand Up @@ -2,7 +2,7 @@
#define Fireworks_Core_FWGeometryTableViewBase_h

#ifndef __CINT__
#include <boost/shared_ptr.hpp>
#include <memory>
#endif


Expand Down Expand Up @@ -140,7 +140,7 @@ class FWGeometryTableViewBase
TEveScene* m_eveScene;

#ifndef __CINT__
// std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters;
// std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
#endif
// void resetSetters();
// void makeSetter(TGCompositeFrame* frame, FWParameterBase* param);
Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Core/interface/FWGeometryTableViewManager.h
Expand Up @@ -50,7 +50,7 @@ class FWGeometryTableViewManager : public FWViewManagerBase
virtual void modelChangesComing() {}
virtual void modelChangesDone() {}

std::vector<boost::shared_ptr<FWGeometryTableViewBase> > m_views;
std::vector<std::shared_ptr<FWGeometryTableViewBase> > m_views;

private:
FWGeometryTableViewManager(const FWGeometryTableViewManager&); // stop default
Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Core/interface/FWHLTValidator.h
Expand Up @@ -20,7 +20,7 @@ class FWHLTValidator: public FWValidatorBase {

void setProcess(const char* x) { m_process = x; m_triggerNames.clear(); }
virtual void fillOptions(const char* iBegin, const char* iEnd,
std::vector<std::pair<boost::shared_ptr<std::string>, std::string> >& oOptions) const;
std::vector<std::pair<std::shared_ptr<std::string>, std::string> >& oOptions) const;
private:
FWHLTValidator(const FWHLTValidator&); // stop default
const FWHLTValidator& operator=(const FWHLTValidator&); // stop default
Expand Down
4 changes: 2 additions & 2 deletions Fireworks/Core/interface/FWItemAccessorFactory.h
Expand Up @@ -19,7 +19,7 @@
//

// system include files
#include <boost/shared_ptr.hpp>
#include <memory>
#include <string>

// user include files
Expand All @@ -35,7 +35,7 @@ class FWItemAccessorFactory {
virtual ~FWItemAccessorFactory();

// ---------- const member functions ---------------------
boost::shared_ptr<FWItemAccessorBase> accessorFor(const TClass*) const;
std::shared_ptr<FWItemAccessorBase> accessorFor(const TClass*) const;
static bool hasAccessor(const TClass *iClass, std::string &result);
static bool hasTVirtualCollectionProxy(const TClass *iClass);
static bool hasMemberTVirtualCollectionProxy(const TClass *iClass,
Expand Down
4 changes: 2 additions & 2 deletions Fireworks/Core/interface/FWParameterSetterBase.h
Expand Up @@ -19,7 +19,7 @@
//

// system include files
#include <boost/shared_ptr.hpp>
#include <memory>

// user include files

Expand All @@ -38,7 +38,7 @@ class FWParameterSetterBase

// ---------- static member functions --------------------

static boost::shared_ptr<FWParameterSetterBase> makeSetterFor(FWParameterBase*);
static std::shared_ptr<FWParameterSetterBase> makeSetterFor(FWParameterBase*);

// ---------- member functions ---------------------------

Expand Down
4 changes: 2 additions & 2 deletions Fireworks/Core/interface/FWProxyBuilderConfiguration.h
Expand Up @@ -28,7 +28,7 @@
#include "Fireworks/Core/interface/FWGenericParameterWithRange.h"

#ifndef __CINT__
#include <boost/shared_ptr.hpp>
#include <memory>
#include <sigc++/sigc++.h>
#endif

Expand Down Expand Up @@ -64,7 +64,7 @@ class FWProxyBuilderConfiguration : public FWConfigurableParameterizable,
const FWEventItem* m_item;

#ifndef __CINT__
std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters;
std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
#endif

};
Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Core/interface/FWTableViewManager.h
Expand Up @@ -88,7 +88,7 @@ class FWTableViewManager : public FWViewManagerBase, public FWConfigurable
virtual void colorsChanged();
void dataChanged ();

typedef std::vector<boost::shared_ptr<FWTableView> > Views;
typedef std::vector<std::shared_ptr<FWTableView> > Views;

Views m_views;
Items m_items;
Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Core/interface/FWTriggerTableViewManager.h
Expand Up @@ -48,7 +48,7 @@ class FWTriggerTableViewManager : public FWViewManagerBase, public FWConfigurabl

void updateProcessList();

std::vector<boost::shared_ptr<FWTriggerTableView> > m_views;
std::vector<std::shared_ptr<FWTriggerTableView> > m_views;

private:
FWTriggerTableViewManager(const FWTriggerTableViewManager&); // stop default
Expand Down
6 changes: 3 additions & 3 deletions Fireworks/Core/interface/FWTypeToRepresentations.h
Expand Up @@ -22,7 +22,7 @@
#include <string>
#include <vector>
#include <map>
#include <boost/shared_ptr.hpp>
#include <memory>

// user include files
#include "Fireworks/Core/interface/FWRepresentationInfo.h"
Expand All @@ -42,7 +42,7 @@ class FWTypeToRepresentations {
// ---------- static member functions --------------------

// ---------- member functions ---------------------------
void add( boost::shared_ptr<FWRepresentationCheckerBase> iChecker);
void add( std::shared_ptr<FWRepresentationCheckerBase> iChecker);
void insert( const FWTypeToRepresentations& );

private:
Expand All @@ -52,7 +52,7 @@ class FWTypeToRepresentations {

// ---------- member data --------------------------------
mutable std::map<std::string, std::vector<FWRepresentationInfo> > m_typeToReps;
std::vector<boost::shared_ptr<FWRepresentationCheckerBase> > m_checkers;
std::vector<std::shared_ptr<FWRepresentationCheckerBase> > m_checkers;
};


Expand Down
4 changes: 2 additions & 2 deletions Fireworks/Core/interface/FWViewEnergyScaleEditor.h
Expand Up @@ -22,7 +22,7 @@

// user include files
#ifndef __CINT__
#include <boost/shared_ptr.hpp>
#include <memory>
#endif
#include "TGFrame.h"
#include "Fireworks/Core/interface/FWParameterSetterEditorBase.h"
Expand Down Expand Up @@ -61,7 +61,7 @@ class FWViewEnergyScaleEditor : public TGVerticalFrame, public FWParameterSetter
bool m_enabled;

#ifndef __CINT__
std::vector<boost::shared_ptr<FWParameterSetterBase> > m_setters;
std::vector<std::shared_ptr<FWParameterSetterBase> > m_setters;
#endif
};

Expand Down
6 changes: 3 additions & 3 deletions Fireworks/Core/interface/FWViewManagerManager.h
Expand Up @@ -21,7 +21,7 @@
// system include files
#include <vector>
#include <map>
#include <boost/shared_ptr.hpp>
#include <memory>
#include <set>
#include <string>

Expand All @@ -47,7 +47,7 @@ class FWViewManagerManager
// ---------- static member functions --------------------

// ---------- member functions ---------------------------
void add( boost::shared_ptr<FWViewManagerBase>);
void add( std::shared_ptr<FWViewManagerBase>);
void registerEventItem(const FWEventItem*iItem);
void removeEventItem(const FWEventItem*iItem);
void eventBegin();
Expand All @@ -59,7 +59,7 @@ class FWViewManagerManager
const FWViewManagerManager& operator=(const FWViewManagerManager&); // stop default

// ---------- member data --------------------------------
std::vector<boost::shared_ptr<FWViewManagerBase> > m_viewManagers;
std::vector<std::shared_ptr<FWViewManagerBase> > m_viewManagers;
FWModelChangeManager* m_changeManager;
FWColorManager* m_colorManager;
std::map<std::string, const FWEventItem*> m_typeToItems; //use this to tell view managers registered after the item
Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Core/src/CmsShowCommonPopup.cc
Expand Up @@ -337,7 +337,7 @@ void CmsShowCommonPopup::getColorSetColors (int& hci, int& sci)
TGFrame*
CmsShowCommonPopup::makeSetter(TGCompositeFrame* frame, FWParameterBase* param)
{
boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor(param) );
std::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor(param) );
ptr->attach(param, this);

TGFrame* pframe = ptr->build(frame);
Expand Down
1 change: 0 additions & 1 deletion Fireworks/Core/src/CmsShowMain.h
Expand Up @@ -26,7 +26,6 @@
#include <vector>
#include <string>
#include <memory>
#include <boost/shared_ptr.hpp>
#include "Rtypes.h"


Expand Down
8 changes: 4 additions & 4 deletions Fireworks/Core/src/CmsShowMainBase.cc
Expand Up @@ -111,22 +111,22 @@ CmsShowMainBase::setupViewManagers()
{
guiManager()->updateStatus("Setting up view manager...");

boost::shared_ptr<FWViewManagerBase> eveViewManager(new FWEveViewManager(guiManager()));
std::shared_ptr<FWViewManagerBase> eveViewManager = std::make_shared<FWEveViewManager>(guiManager());
eveViewManager->setContext(m_contextPtr);
viewManager()->add(eveViewManager);

boost::shared_ptr<FWTableViewManager> tableViewManager(new FWTableViewManager(guiManager()));
auto tableViewManager = std::make_shared<FWTableViewManager>(guiManager());
configurationManager()->add(std::string("Tables"), tableViewManager.get());
viewManager()->add(tableViewManager);
eiManager()->goingToClearItems_.connect(boost::bind(&FWTableViewManager::removeAllItems, tableViewManager.get()));

boost::shared_ptr<FWTriggerTableViewManager> triggerTableViewManager(new FWTriggerTableViewManager(guiManager()));
auto triggerTableViewManager = std::make_shared<FWTriggerTableViewManager>(guiManager());
configurationManager()->add(std::string("TriggerTables"), triggerTableViewManager.get());
configurationManager()->add(std::string("L1TriggerTables"), triggerTableViewManager.get()); // AMT: added for backward compatibilty
triggerTableViewManager->setContext(m_contextPtr);
viewManager()->add(triggerTableViewManager);

boost::shared_ptr<FWGeometryTableViewManager> geoTableViewManager(new FWGeometryTableViewManager(guiManager(), m_simGeometryFilename));
auto geoTableViewManager = std::make_shared<FWGeometryTableViewManager>(guiManager(), m_simGeometryFilename);
geoTableViewManager->setContext(m_contextPtr);
viewManager()->add(geoTableViewManager);

Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Core/src/CmsShowViewPopup.cc
Expand Up @@ -245,7 +245,7 @@ ViewerParameterGUI::requestTab(const char* name)
ViewerParameterGUI&
ViewerParameterGUI::addParam( const FWParameterBase* param)
{
boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor((FWParameterBase*)param) );
std::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor((FWParameterBase*)param) );
ptr->attach((FWParameterBase*)param, this);
TGCompositeFrame* parent = m_tab->GetCurrentContainer();

Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Core/src/FWCollectionSummaryTableManager.h
Expand Up @@ -20,7 +20,7 @@

// system include files
#include <vector>
#include <boost/shared_ptr.hpp>
#include <memory>

// user include files
#include "Fireworks/TableWidget/interface/FWTableManagerBase.h"
Expand Down