// private methods
//_____________________________________________________________________________
-AliLVStructure* AliLVStructure::FindSubDirectory(G4String subDir)
+AliLVStructure* AliLVStructure::FindSubDirectory(const G4String& subDir) const
{
// Finds the subdirectory.
// ---
}
//_____________________________________________________________________________
-G4String AliLVStructure::ExtractDirName(G4String name)
+G4String AliLVStructure::ExtractDirName(const G4String& name) const
{
// Extracts the directory name from the path.
// ---
//_____________________________________________________________________________
void AliLVStructure::AddNewVolume(G4LogicalVolume* lv,
- G4String treeStructure)
+ const G4String& treeStructure)
{
// Adds new logical volume to the structure.
// ---
}
//_____________________________________________________________________________
-G4LogicalVolume* AliLVStructure::GetVolume(G4String lvName)
+G4LogicalVolume* AliLVStructure::GetVolume(const G4String& lvName) const
{
// Returns logical volume of lvName if present in the structure,
// returns 0 otherwise.
}
//_____________________________________________________________________________
-G4LogicalVolume* AliLVStructure::FindVolume(G4String name)
+G4LogicalVolume* AliLVStructure::FindVolume(const G4String& name) const
{
// Finds logical volume of given name in all structure tree.
// ---
}
//_____________________________________________________________________________
-void AliLVStructure::SetTreeColour(G4String colName)
+void AliLVStructure::SetTreeColour(const G4String& colName)
{
// Sets colour specified by name to all logical volumes
// in the structure tree.
G4int operator==(const AliLVStructure &right) const;
// methods
- void AddNewVolume(G4LogicalVolume* lv, G4String treeStructure);
+ void AddNewVolume(G4LogicalVolume* lv, const G4String& treeStructure);
void ListTree() const;
void ListTreeLong() const;
void SetVerboseLevel(G4int verbose);
#ifdef ALICE_VISUALIZE
void SetTreeVisibility(G4bool visibility);
- void SetTreeColour(G4String colName);
+ void SetTreeColour(const G4String& colName);
#endif
// get methods
- G4LogicalVolume* GetVolume(G4String name);
- G4LogicalVolume* FindVolume(G4String name);
+ G4LogicalVolume* GetVolume(const G4String& name) const;
+ G4LogicalVolume* FindVolume(const G4String& name) const;
protected:
AliLVStructure();
private:
// methods
- AliLVStructure* FindSubDirectory(G4String subDir);
- G4String ExtractDirName(G4String path);
+ AliLVStructure* FindSubDirectory(const G4String& subDir) const;
+ G4String ExtractDirName(const G4String& path) const;
// data members
G4RWTPtrOrderedVector<AliLVStructure> fStructures; //.
}
//_____________________________________________________________________________
-G4FieldManager* AliMagneticField::GetGlobalFieldManager()
+G4FieldManager* AliMagneticField::GetGlobalFieldManager() const
{
// Utility method
// ---
void SetFieldValue(G4double fieldValue);
// Set the field to (0, 0, fieldValue)
- // get methods
- G4ThreeVector GetConstantFieldValue();
-
protected:
// Find the global Field Manager
- G4FieldManager* GetGlobalFieldManager();
+ G4FieldManager* GetGlobalFieldManager() const;
};
#endif //ALI_MAGNETIC_FIELD_H
// protected methods
//_____________________________________________________________________________
-void AliModuleConstruction::RegisterLogicalVolume(G4LogicalVolume* lv,
- G4String path, AliLVStructure& lvStructure)
+void AliModuleConstruction::RegisterLogicalVolume(
+ G4LogicalVolume* lv, const G4String& path,
+ AliLVStructure& lvStructure) const
{
// Registers logical volume lv in the structure.
// ---
}
//_____________________________________________________________________________
-void AliModuleConstruction::SetDetFrame(G4String frameName, G4bool warn)
+void AliModuleConstruction::SetDetFrame(const G4String& frameName, G4bool warn)
{
// The logical volume with frameName
// is retrieved from G4LogicalVolumeStore.
}
//_____________________________________________________________________________
-void AliModuleConstruction::ListAllLVTree()
+void AliModuleConstruction::ListAllLVTree() const
{
// Lists all logical volumes tree if the frame logical volume
// is defined.
}
//_____________________________________________________________________________
-void AliModuleConstruction::ListAllLVTreeLong()
+void AliModuleConstruction::ListAllLVTreeLong() const
{
// Lists all logical volume tree if the frame logical volume
// is defined with numbers of daughters (physical volumes).
}
//_____________________________________________________________________________
-void AliModuleConstruction::ListLVTree(G4String lvName)
+void AliModuleConstruction::ListLVTree(const G4String& lvName) const
{
// Lists logical volumes tree (daughters) of the logical volume
// with specified lvName.
}
//_____________________________________________________________________________
-void AliModuleConstruction::ListLVTreeLong(G4String lvName)
+void AliModuleConstruction::ListLVTreeLong(const G4String& lvName) const
{
// Lists logical volumes tree (daughters) of the logical volume
// with specified lvName with numbers of daughters (physical volumes).
#ifdef ALICE_VISUALIZE
//_____________________________________________________________________________
-void AliModuleConstruction::SetDetVisibility(G4bool visibility)
+void AliModuleConstruction::SetDetVisibility(G4bool visibility) const
{
// Sets visibility to all detector logical volumes if
// frame logical volume is defined.
//_____________________________________________________________________________
void AliModuleConstruction::SetLVTreeVisibility(G4LogicalVolume* lv,
- G4bool visibility)
+ G4bool visibility) const
{
// Sets visibility to the logical volumes tree (daughters) of
// the logical volume lv.
//_____________________________________________________________________________
void AliModuleConstruction::SetVolumeVisibility(G4LogicalVolume* lv,
- G4bool visibility)
+ G4bool visibility) const
{
// Sets visibility to the specified logical volume.
// ---
}
//_____________________________________________________________________________
-void AliModuleConstruction::SetDetColour(G4String colName)
+void AliModuleConstruction::SetDetColour(G4String colName) const
{
// Sets colour to all detector logical volumes if
// frame logical volume is defined.
//_____________________________________________________________________________
void AliModuleConstruction::SetLVTreeColour(G4LogicalVolume* lv,
- G4String colName)
+ const G4String& colName) const
{
// Sets colour to the logical volumes tree (daughters) of
// the logical volume lv.
//_____________________________________________________________________________
void AliModuleConstruction::SetVolumeColour(G4LogicalVolume* lv,
- G4String colName)
+ const G4String& colName) const
{
// Sets colour to the specified logical volume.
// ---
// methods
virtual void Construct() = 0;
- void ListAllLVTree();
- void ListAllLVTreeLong();
- void ListLVTree(G4String lvName);
- void ListLVTreeLong(G4String lvName);
+ void ListAllLVTree() const;
+ void ListAllLVTreeLong() const;
+ void ListLVTree(const G4String& lvName) const;
+ void ListLVTreeLong(const G4String& lvName) const;
// set methods
void SetDetFrame(G4bool warn = true);
- void SetDetFrame(G4String frameName, G4bool warn = true);
+ void SetDetFrame(const G4String& frameName, G4bool warn = true);
void SetReadGeometry(G4bool readGeometry);
void SetWriteGeometry(G4bool writeGeometry);
#ifdef ALICE_VISUALIZE
- void SetDetVisibility(G4bool visibility);
- void SetLVTreeVisibility(G4LogicalVolume* lv, G4bool visibility);
- void SetVolumeVisibility(G4LogicalVolume* lv, G4bool visibility);
- void SetDetColour(G4String colName);
- void SetLVTreeColour(G4LogicalVolume* lv, G4String colName);
- void SetVolumeColour(G4LogicalVolume* lv, G4String colName);
+ void SetDetVisibility(G4bool visibility) const;
+ void SetLVTreeVisibility(G4LogicalVolume* lv, G4bool visibility) const;
+ void SetVolumeVisibility(G4LogicalVolume* lv, G4bool visibility) const;
+ void SetDetColour(G4String colName) const;
+ void SetLVTreeColour(G4LogicalVolume* lv, const G4String& colName) const;
+ void SetVolumeColour(G4LogicalVolume* lv, const G4String& colName) const;
#endif
// get methods
private:
// methods
- void RegisterLogicalVolume(G4LogicalVolume* lv, G4String path,
- AliLVStructure& lvStructure);
+ void RegisterLogicalVolume(G4LogicalVolume* lv, const G4String& path,
+ AliLVStructure& lvStructure) const;
// data members
AliModuleConstructionMessenger fMessenger; //messenger
}
//_____________________________________________________________________________
-AliDetSwitch* AliModulesComposition::GetDetSwitch(const G4String& moduleName)
+AliDetSwitch* AliModulesComposition::GetDetSwitch(
+ const G4String& moduleName) const
{
// Returns the detector switch with given detector name.
// ---
- DetSwitchIterator it;
+ DetSwitchConstIterator it;
for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++)
if ((*it)->GetDetName() == moduleName) return *it;
void ConstructModules();
// get methods
- AliDetSwitch* GetDetSwitch(const G4String& moduleName);
+ AliDetSwitch* GetDetSwitch(const G4String& moduleName) const;
// data members
DetSwitchVector fDetSwitchVector; //vector of AliDetSwitch