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
Easy possibility to store condition payloads as std::any #927
Easy possibility to store condition payloads as std::any #927
Conversation
b58cefb
to
b351cb2
Compare
#ifndef DD4HEP_CONDITIONANY_H | ||
#define DD4HEP_CONDITIONANY_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using #pragma once
rather than playing with names that will unavoidably collide one day ?
/// Flag operations: Get condition flags | ||
mask_type flags() const; | ||
/// Flag operations: Set a conditons flag | ||
void setFlag(mask_type option); | ||
/// Flag operations: UN-Set a conditons flag | ||
void unFlag(mask_type option); | ||
/// Flag operations: Test for a given a conditons flag | ||
bool testFlag(mask_type option) const; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what I see in this MR, these functions are never used. Is this correct ? If yes, why to add them ?
@@ -0,0 +1,107 @@ | |||
//========================================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this file really supposed to be included in this MR ? I do not see the relationship
@@ -0,0 +1,197 @@ | |||
//========================================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this file really supposed to be included in this MR ? I do not see the relationship
@@ -2,7 +2,7 @@ | |||
#define DDG4_PLUGINS_GEANT4_10_PHYSICSCONSTRUCTORS_H | |||
|
|||
//========================================================================== | |||
// AIDA Detector description implementation | |||
// AIDA Detector description implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this file really supposed to be included in this MR ? I do not see the relationship
@@ -1,5 +1,5 @@ | |||
//========================================================================== | |||
// AIDA Detector description implementation | |||
// AIDA Detector description implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this file really supposed to be included in this MR ? I do not see the relationship
@@ -10,7 +10,6 @@ | |||
// Author : M.Frank | |||
// | |||
//========================================================================== | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this file really supposed to be included in this MR ? I do not see the relationship
@@ -116,8 +116,10 @@ namespace dd4hep { | |||
Geant4PhysicsList(Geant4Context* context, const std::string& nam); | |||
/// Default destructor | |||
virtual ~Geant4PhysicsList(); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this file really supposed to be included in this MR ? I do not see the relationship
BEGINRELEASENOTES
Easy possibility to store condition payloads as std::any.
Use of specialized handle class
dd4hep::ConditionAny
to support the functionality.The payload is automatically bound to an object of type std::any.
Example code of constructor and how to access data:
as a corollary to this approach these conditions can only be stored and retrieved from ROOT storage
if the requirement for ROOT are satisfied. Otherwise no other restrictions are imposed.
The corresponding grammar instance is part of the library.
Add example to illustrate the functionality in example/conditions:
o examples/Conditions/src/ConditionAnyExampleObjects.cpp
o examples/Conditions/src/ConditionAnyExampleObjects.h
o plugin: examples/Conditions/src/ConditionAnyExample_populate.cpp
Invocation:
o examples/Conditions/src/Conditions_any_basic.cpp
Invocation:
ENDRELEASENOTES