Skip to content

Commit

Permalink
do not inline map accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed Nov 16, 2023
1 parent 72b4da6 commit 1e22fb2
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 7 deletions.
2 changes: 2 additions & 0 deletions StarVMC/StarAgmlLib/AgMLExtension.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ AgMLExtension::AgMLExtension() : TGeoRCExtension(),
{
Grab();
}

void AgMLExtension::AddCut( TString cut, double value ){ mGstpar[cut] = value; }
2 changes: 1 addition & 1 deletion StarVMC/StarAgmlLib/AgMLExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AgMLExtension : public TGeoRCExtension {

std::vector<AgMLScoring*> GetUserHits(){ return mHitScoring; }

void AddCut( TString cut, double value ){ mGstpar[cut] = value; }
void AddCut( TString cut, double value );
std::map<TString,double>& GetCuts() { return mGstpar; }


Expand Down
2 changes: 2 additions & 0 deletions StarVMC/StarAgmlLib/AgModule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ TDataSet *AgModule::Geom()
else return mGeomSet;
};

void AgModule::AddHitScoring( TString name, AgMLScoring* sc ){ mHitScoring[name] = sc; }

// ---------------------------------------------------------------------------------------------
AgBlock *AgModule::AddBlock( const Char_t *name, AgBlock *_block )
{
Expand Down
2 changes: 1 addition & 1 deletion StarVMC/StarAgmlLib/AgModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AgModule : public AgBlock
void SetTrackingFlag( int flag ){ mTrackingFlag = flag; }
int GetTrackingFlag(){ return mTrackingFlag; }

void AddHitScoring( TString name, AgMLScoring* sc ){ mHitScoring[name] = sc; }
void AddHitScoring( TString name, AgMLScoring* sc );
std::map<TString,AgMLScoring*> GetHitScoring(){ return mHitScoring; }

private:
Expand Down
2 changes: 2 additions & 0 deletions StarVMC/StarAgmlLib/AgShape.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,8 @@ Bool_t AgShape::morphed()
return true; // No shapes match
}

std::vector< TString > &AgShape::parList(){ return mParList[mId]; }

// =============================================================================================================
Bool_t AgShape::parameterized()
{
Expand Down
2 changes: 1 addition & 1 deletion StarVMC/StarAgmlLib/AgShape.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class AgShape : public TNamed, public AgParameterList<double>
Bool_t morphed();

/// Return a list of the parameters which define this shape
std::vector< TString > &parList(){ return mParList[mId]; }
std::vector< TString > &parList();

/// Returns true if the shape's parameters are to be set
/// when positioned
Expand Down
6 changes: 6 additions & 0 deletions StarVMC/StarAgmlLib/StarAgmlStacker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ TString StarAgmlStacker::realname( TString nname )
return mRealnames[nname];
}


const std::vector<TString> &StarAgmlStacker::nicknames(const Char_t *name)
{
return mNicknames[ TString(name) ];
}

// ---------------------------------------------------------------------------------------------------
void StarAgmlStacker::Debug( const Char_t *name, const Char_t *flag )
{
Expand Down
5 changes: 1 addition & 4 deletions StarVMC/StarAgmlLib/StarAgmlStacker.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ class StarAgmlStacker : public TNamed

virtual Bool_t SearchVolume( const AgShape &shape, const AgAttribute &attr )=0;

const std::vector<TString> &nicknames(const Char_t *name)
{
return mNicknames[ TString(name) ];
}
const std::vector<TString> &nicknames(const Char_t *name);

void Debug( const Char_t *name, const Char_t *flag="position" );

Expand Down
1 change: 1 addition & 0 deletions StarVMC/StarAgmlUtil/AgParameterList.cxx
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#include "AgParameterList.h"

T& par ( const char* name ){ std::string key=name; return mParameters.at(name); }

0 comments on commit 1e22fb2

Please sign in to comment.