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
a2f60fd1
Commit
a2f60fd1
authored
7 years ago
by
Ete Remi
Committed by
Marko Petric
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added LCIOEventParameters class to handle LCIO input event parameters
parent
569312c7
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
DDG4/lcio/LCIOEventParameters.cpp
+83
-0
83 additions, 0 deletions
DDG4/lcio/LCIOEventParameters.cpp
DDG4/lcio/LCIOEventParameters.h
+59
-0
59 additions, 0 deletions
DDG4/lcio/LCIOEventParameters.h
with
142 additions
and
0 deletions
DDG4/lcio/LCIOEventParameters.cpp
0 → 100644
+
83
−
0
View file @
a2f60fd1
//==========================================================================
// 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.
//
// @author R.Ete (main author)
//
//====================================================================
// Framework include files
#include
"LCIOEventParameters.h"
using
namespace
std
;
using
namespace
dd4hep
;
using
namespace
dd4hep
::
sim
;
/// Initializing constructor
LCIOEventParameters
::
LCIOEventParameters
()
:
m_runNumber
(
0
),
m_eventNumber
(
0
)
{
}
/// Default destructor
LCIOEventParameters
::~
LCIOEventParameters
()
{
}
/// Set the event parameters
void
LCIOEventParameters
::
setParameters
(
int
rNumber
,
int
evtNumber
,
const
EVENT
::
LCParameters
&
parameters
)
{
m_runNumber
=
rNumber
;
m_eventNumber
=
evtNumber
;
copyLCParameters
(
parameters
,
m_eventParameters
);
}
/// Get the run number
int
LCIOEventParameters
::
runNumber
()
const
{
return
m_runNumber
;
}
/// Get the event number
int
LCIOEventParameters
::
eventNumber
()
const
{
return
m_eventNumber
;
}
/// Get the event parameters
const
IMPL
::
LCParametersImpl
&
LCIOEventParameters
::
eventParameters
()
const
{
return
m_eventParameters
;
}
/// Copy the paramaters from source to destination
void
LCIOEventParameters
::
copyLCParameters
(
const
EVENT
::
LCParameters
&
source
,
EVENT
::
LCParameters
&
destination
)
{
EVENT
::
StringVec
intKeys
;
source
.
getIntKeys
(
intKeys
);
EVENT
::
StringVec
floatKeys
;
source
.
getFloatKeys
(
floatKeys
);
EVENT
::
StringVec
stringKeys
;
source
.
getStringKeys
(
stringKeys
);
for
(
unsigned
int
i
=
0
;
i
<
intKeys
.
size
();
++
i
)
{
EVENT
::
IntVec
intVec
;
source
.
getIntVals
(
intKeys
.
at
(
i
),
intVec
);
destination
.
setValues
(
intKeys
.
at
(
i
),
intVec
);
}
for
(
unsigned
int
i
=
0
;
i
<
floatKeys
.
size
();
++
i
)
{
EVENT
::
FloatVec
floatVec
;
source
.
getFloatVals
(
floatKeys
.
at
(
i
),
floatVec
);
destination
.
setValues
(
floatKeys
.
at
(
i
),
floatVec
);
}
for
(
unsigned
int
i
=
0
;
i
<
stringKeys
.
size
();
++
i
)
{
EVENT
::
StringVec
stringVec
;
source
.
getStringVals
(
stringKeys
.
at
(
i
),
stringVec
);
destination
.
setValues
(
stringKeys
.
at
(
i
),
stringVec
);
}
}
This diff is collapsed.
Click to expand it.
DDG4/lcio/LCIOEventParameters.h
0 → 100644
+
59
−
0
View file @
a2f60fd1
//==========================================================================
// 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.
//
// Author : R.Ete
//
//==========================================================================
#ifndef DD4HEP_DDG4_LCIOEVENTPARAMETERS_H
#define DD4HEP_DDG4_LCIOEVENTPARAMETERS_H
// lcio include files
#include
"lcio.h"
#include
"IMPL/LCParametersImpl.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
{
/// Event extension to pass input LCIO event data to output LCIO event
/**
* \author R.Ete (main author)
* \version 1.0
* \ingroup DD4HEP_SIMULATION
*/
class
LCIOEventParameters
{
private:
int
m_runNumber
;
int
m_eventNumber
;
IMPL
::
LCParametersImpl
m_eventParameters
;
public:
/// Initializing constructor
LCIOEventParameters
();
/// Default destructor
~
LCIOEventParameters
();
/// Set the event parameters
void
setParameters
(
int
runNumber
,
int
eventNumber
,
const
EVENT
::
LCParameters
&
parameters
);
/// Get the run number
int
runNumber
()
const
;
/// Get the event number
int
eventNumber
()
const
;
/// Get the event parameters
const
IMPL
::
LCParametersImpl
&
eventParameters
()
const
;
/// Copy the paramaters from source to destination
static
void
copyLCParameters
(
const
EVENT
::
LCParameters
&
source
,
EVENT
::
LCParameters
&
destination
);
};
}
/* End namespace sim */
}
/* End namespace dd4hep */
#endif
/* DD4HEP_DDG4_LCIOEVENTPARAMETERS_H */
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