Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
bf026816
Commit
bf026816
authored
2 years ago
by
Markus Frank
Committed by
MarkusFrankATcernch
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix compile error
parent
3381a37d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DDDigi/io/DigiDDG4Input.cpp
+3
-0
3 additions, 0 deletions
DDDigi/io/DigiDDG4Input.cpp
DDDigi/io/DigiIO.h
+17
-9
17 additions, 9 deletions
DDDigi/io/DigiIO.h
with
20 additions
and
9 deletions
DDDigi/io/DigiDDG4Input.cpp
+
3
−
0
View file @
bf026816
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include
"DigiIO.h"
#include
"DigiIO.h"
#include
<DDG4/Geant4Data.h>
#include
<DDG4/Geant4Data.h>
#include
<DDG4/Geant4Particle.h>
// ROOT include files
// ROOT include files
#include
<TBranch.h>
#include
<TBranch.h>
...
@@ -123,4 +124,6 @@ namespace dd4hep {
...
@@ -123,4 +124,6 @@ namespace dd4hep {
};
};
}
// End namespace digi
}
// End namespace digi
}
// End namespace dd4hep
}
// End namespace dd4hep
/// Factory instantiation
DECLARE_DIGIACTION_NS
(
dd4hep
::
digi
,
DigiDDG4ROOT
)
DECLARE_DIGIACTION_NS
(
dd4hep
::
digi
,
DigiDDG4ROOT
)
This diff is collapsed.
Click to expand it.
DDDigi/io/DigiIO.h
+
17
−
9
View file @
bf026816
...
@@ -35,19 +35,27 @@ namespace dd4hep {
...
@@ -35,19 +35,27 @@ namespace dd4hep {
/// Namespace for the Digitization part of the AIDA detector description toolkit
/// Namespace for the Digitization part of the AIDA detector description toolkit
namespace
digi
{
namespace
digi
{
/// Auto cast union to read objects from ROOT files
template
<
typename
T
>
union
input_data
{
template
<
typename
T
>
union
input_data
{
/// Void type
const
void
*
m_raw
;
const
void
*
m_raw
;
std
::
vector
<
T
*>*
m_items
;
/// Concrete type
std
::
vector
<
T
*>*
m_data
;
/// Constructor
input_data
(
const
void
*
p
)
{
this
->
m_raw
=
p
;
}
input_data
(
const
void
*
p
)
{
this
->
m_raw
=
p
;
}
void
clear
()
{
if
(
this
->
m_items
)
this
->
m_items
->
clear
();
}
/// Vector interface: get object
std
::
size_t
size
()
{
return
(
this
->
m_items
)
?
this
->
m_items
->
size
()
:
0UL
;
}
std
::
vector
<
T
*>&
get
()
{
std
::
vector
<
T
*>&
get
()
{
if
(
this
->
m_
items
)
return
*
(
this
->
m_
items
);
if
(
this
->
m_
data
)
return
*
(
this
->
m_
data
);
throw
std
::
runtime_error
(
"input_data: Invalid data!"
);
throw
std
::
runtime_error
(
"input_data: Invalid data!"
);
}
}
/// Vector interface: clear items
void
clear
()
{
if
(
this
->
m_data
)
this
->
m_data
->
clear
();
}
/// Vector interface: access array size
std
::
size_t
size
()
{
return
(
this
->
m_data
)
?
this
->
m_data
->
size
()
:
0UL
;
}
};
};
/// Gener
c
i I/O helper to input/output digi data
/// Generi
c
I/O helper to input/output digi data
/**
/**
*
*
* \author M.Frank
* \author M.Frank
...
@@ -135,18 +143,18 @@ namespace dd4hep {
...
@@ -135,18 +143,18 @@ namespace dd4hep {
* \ingroup DD4HEP_DIGITIZATION
* \ingroup DD4HEP_DIGITIZATION
*/
*/
struct
edm4hep_input
{
struct
edm4hep_input
{
typedef
edm4hep
::
MutableMCParticle
particle_type
;
typedef
edm4hep
::
MutableMCParticle
particle_type
;
struct
input_trackerhit_type
{};
struct
input_trackerhit_type
{};
struct
input_calorimeterhit_type
{};
struct
input_calorimeterhit_type
{};
};
};
struct
digi_input
{
struct
digi_input
{
typedef
Particle
particle_type
;
typedef
Particle
particle_type
;
struct
input_trackerhit_type
{};
struct
input_trackerhit_type
{};
struct
input_calorimeterhit_type
{};
struct
input_calorimeterhit_type
{};
};
};
/// Gener
c
i I/O helper to output digi data in edm4hep format
/// Generi
c
I/O helper to output digi data in edm4hep format
/**
/**
*
*
* \author M.Frank
* \author M.Frank
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment