-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ReadEDM4hep: add fileParameter, refactor parameters
- Loading branch information
1 parent
e77b06f
commit 5906930
Showing
6 changed files
with
155 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
//========================================================================== | ||
// AIDA Detector description implementation | ||
//-------------------------------------------------------------------------- | ||
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) | ||
// All rights reserved. | ||
// | ||
// For the licensing terms see $DD4hepINSTALL/LICENSE. | ||
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS. | ||
// | ||
// | ||
//========================================================================== | ||
#ifndef DDG4_EXTENSIONPARAMETERS_H | ||
#define DDG4_EXTENSIONPARAMETERS_H | ||
|
||
#include <map> | ||
#include <string> | ||
#include <vector> | ||
|
||
|
||
/// Namespace for the AIDA detector description toolkit | ||
namespace dd4hep { | ||
|
||
/// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit | ||
namespace sim { | ||
|
||
/// Extension to pass input data to output data | ||
/** | ||
* \version 1.0 | ||
* \ingroup DD4HEP_SIMULATION | ||
*/ | ||
class ExtensionParameters { | ||
protected: | ||
std::map<std::string, std::vector<int>> m_intValues {}; | ||
std::map<std::string, std::vector<float>> m_fltValues {}; | ||
std::map<std::string, std::vector<std::string>> m_strValues {}; | ||
std::map<std::string, std::vector<double>> m_dblValues {}; | ||
|
||
public: | ||
/// Get the int parameters | ||
auto const& intParameters() const { return m_intValues; } | ||
/// Get the float parameters | ||
auto const& fltParameters() const { return m_fltValues; } | ||
/// Get the string parameters | ||
auto const& strParameters() const { return m_strValues; } | ||
/// Get the double parameters | ||
auto const& dblParameters() const { return m_dblValues; } | ||
|
||
}; | ||
|
||
} /* End namespace sim */ | ||
} /* End namespace dd4hep */ | ||
#endif // DDG4_EXTENSIONPARAMETERS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//========================================================================== | ||
// AIDA Detector description implementation | ||
//-------------------------------------------------------------------------- | ||
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) | ||
// All rights reserved. | ||
// | ||
// For the licensing terms see $DD4hepINSTALL/LICENSE. | ||
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS. | ||
// | ||
// | ||
//========================================================================== | ||
#ifndef DDG4_FILEPARAMETERS_H | ||
#define DDG4_FILEPARAMETERS_H | ||
|
||
#include <DDG4/ExtensionParameters.h> | ||
|
||
/// Namespace for the AIDA detector description toolkit | ||
namespace dd4hep { | ||
|
||
/// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit | ||
namespace sim { | ||
|
||
/// Extension to pass input run data to output run data | ||
/** | ||
* \version 1.0 | ||
* \ingroup DD4HEP_SIMULATION | ||
*/ | ||
class FileParameters: public ExtensionParameters { | ||
public: | ||
/// Copy the parameters from source | ||
template <class T> void ingestParameters(T const& source); | ||
/// Put parameters into destination | ||
template <class T> void extractParameters(T& destination); | ||
}; | ||
|
||
} /* End namespace sim */ | ||
} /* End namespace dd4hep */ | ||
#endif // DDG4_FILEPARAMETERS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters