Skip to content
Snippets Groups Projects
Commit a73662df authored by Dave Casper's avatar Dave Casper
Browse files

Merge branch 'cosmic' into 'master'

Athena 22.0.18 compatibility and Cosmics-related development

See merge request !80
parents b2e8dacd 58bf4a5b
No related branches found
No related tags found
No related merge requests found
Showing
with 419 additions and 43 deletions
[submodule "faser-common"]
path = faser-common
url = https://gitlab.cern.ch/faser/faser-common.git
...@@ -5,10 +5,6 @@ ...@@ -5,10 +5,6 @@
# Declare the package name: # Declare the package name:
atlas_subdir( CalypsoCommon ) atlas_subdir( CalypsoCommon )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PRIVATE
TestPolicy )
# External dependencies: # External dependencies:
find_package( six ) find_package( six )
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
# Declare the package name: # Declare the package name:
atlas_subdir( CalypsoConfiguration ) atlas_subdir( CalypsoConfiguration )
atlas_depends_on_subdirs( Control/AthenaConfiguration )
# External dependencies: # External dependencies:
find_package( six ) find_package( six )
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
from __future__ import print_function from __future__ import print_function
from AthenaConfiguration.AllConfigFlags import ConfigFlags as athenaConfigFlags from AthenaConfiguration.AllConfigFlags import ConfigFlags as athenaConfigFlags
from AthenaConfiguration.AllConfigFlags import GetFileMD # from AthenaConfiguration.AllConfigFlags import GetFileMD
# from AthenaConfiguration.AthConfigFlags import AthConfigFlags # from AthenaConfiguration.AthConfigFlags import AthConfigFlags
# from AthenaCommon.SystemOfUnits import TeV # from AthenaCommon.SystemOfUnits import TeV
# from AthenaConfiguration.AutoConfigFlags import GetFileMD, GetDetDescrInfo # from AthenaConfiguration.AutoConfigFlags import GetFileMD, GetDetDescrInfo
...@@ -118,6 +118,12 @@ def _createCfgFlags(): ...@@ -118,6 +118,12 @@ def _createCfgFlags():
# _addFlagsCategory(acf, "Overlay", __overlay, 'OverlayConfiguration' ) # _addFlagsCategory(acf, "Overlay", __overlay, 'OverlayConfiguration' )
#Geo Model Flags: #Geo Model Flags:
def __geomodel():
from CalypsoConfiguration.GeoModelConfigFlags import createGeoModelConfigFlags
return createGeoModelConfigFlags()
# _addFlagsCategory( fcf, "GeoModel", __geomodel )
fcf.join( __geomodel() )
# acf.addFlag('GeoModel.Layout', 'atlas') # replaces global.GeoLayout # acf.addFlag('GeoModel.Layout', 'atlas') # replaces global.GeoLayout
# acf.addFlag("GeoModel.AtlasVersion", lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("GeoAtlas",None) or "ATLAS-R2-2016-01-00-01") # # acf.addFlag("GeoModel.AtlasVersion", lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("GeoAtlas",None) or "ATLAS-R2-2016-01-00-01") #
# acf.addFlag("GeoModel.Align.Dynamic", lambda prevFlags : (not prevFlags.Detector.Simulate)) # acf.addFlag("GeoModel.Align.Dynamic", lambda prevFlags : (not prevFlags.Detector.Simulate))
...@@ -125,9 +131,9 @@ def _createCfgFlags(): ...@@ -125,9 +131,9 @@ def _createCfgFlags():
# acf.addFlag("GeoModel.Run", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('Run',"RUN2")) # Based on CommonGeometryFlags.Run (InDetGeometryFlags.isSLHC replaced by GeoModel.Run=="RUN4") # acf.addFlag("GeoModel.Run", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('Run',"RUN2")) # Based on CommonGeometryFlags.Run (InDetGeometryFlags.isSLHC replaced by GeoModel.Run=="RUN4")
# acf.addFlag("GeoModel.Type", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('GeoType',"UNDEFINED")) # Geometry type in {ITKLoI, ITkLoI-VF, etc...} # acf.addFlag("GeoModel.Type", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('GeoType',"UNDEFINED")) # Geometry type in {ITKLoI, ITkLoI-VF, etc...}
# acf.addFlag("GeoModel.IBLLayout", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('IBLlayout',"UNDEFINED")) # IBL layer layout in {"planar", "3D", "noIBL", "UNDEFINED"} # acf.addFlag("GeoModel.IBLLayout", lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('IBLlayout',"UNDEFINED")) # IBL layer layout in {"planar", "3D", "noIBL", "UNDEFINED"}
fcf.addFlag("GeoModel.FaserVersion", lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("GeoFaser",None) or "FASER-01") # fcf.addFlag("GeoModel.FaserVersion", lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("GeoFaser",None) or "FASER-01")
# fcf.addFlag("GeoModel.FaserVersion", lambda prevFlags : "FASER-01") # fcf.addFlag("GeoModel.FaserVersion", lambda prevFlags : "FASER-01")
fcf.addFlag("GeoModel.GeoExportFile","") # fcf.addFlag("GeoModel.GeoExportFile","")
#IOVDbSvc Flags: #IOVDbSvc Flags:
# acf.addFlag("IOVDb.GlobalTag",lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("IOVDbGlobalTag",None) or "CONDBR2-BLKPA-2017-05") # acf.addFlag("IOVDb.GlobalTag",lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("IOVDbGlobalTag",None) or "CONDBR2-BLKPA-2017-05")
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.AthConfigFlags import AthConfigFlags
def createGeoModelConfigFlags():
gcf=AthConfigFlags()
gcf.addFlag("GeoModel.FaserVersion", "FASER-01") #
gcf.addFlag("GeoModel.GeoExportFile","")
return gcf
...@@ -5,21 +5,6 @@ ...@@ -5,21 +5,6 @@
# Declare the package name: # Declare the package name:
atlas_subdir( GeoModelTest ) atlas_subdir( GeoModelTest )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PRIVATE
Control/AthenaBaseComps
DetectorDescription/GeoModel/GeoModelSvc
DetectorDescription/GeoModel/GeoModelInterfaces
DetectorDescription/GeoModel/GeoModelUtilities
Scintillator/ScintDetDescr/ScintReadoutGeometry
Tracker/TrackerDetDescr/TrackerReadoutGeometry
MagneticField/MagFieldInterfaces
MagneticField/MagFieldConditions
MagneticField/MagFieldElements
MagneticField/MagFieldServices
Tracker/TrackerAlignTools/TrackerAlignGenTools
)
# External dependencies: # External dependencies:
find_package( GeoModelCore ) find_package( GeoModelCore )
...@@ -27,8 +12,8 @@ find_package( GeoModelCore ) ...@@ -27,8 +12,8 @@ find_package( GeoModelCore )
atlas_add_component( GeoModelTest atlas_add_component( GeoModelTest
src/GeoModelTestAlg.cxx src/GeoModelTestAlg.cxx
src/components/GeoModelTest_entries.cxx src/components/GeoModelTest_entries.cxx
INCLUDE_DIRS ${GEOMODEL_INCLUDE_DIRS} INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
LINK_LIBRARIES ${GEOMODEL_LIBRARIES} AthenaBaseComps GeoModelUtilities ScintReadoutGeometry TrackerReadoutGeometry MagFieldInterfaces MagFieldElements MagFieldConditions ) LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaBaseComps GeoModelUtilities ScintReadoutGeometry TrackerReadoutGeometry MagFieldInterfaces MagFieldElements MagFieldConditions )
atlas_add_test( GeoModelCheck atlas_add_test( GeoModelCheck
SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/python/GeoModelTestConfig.py SCRIPT python ${CMAKE_CURRENT_SOURCE_DIR}/python/GeoModelTestConfig.py
......
atlas_subdir( RDOReadExample ) atlas_subdir( RDOReadExample )
atlas_depends_on_subdirs( PRIVATE
Generators/GeneratorObjects
Control/AthenaBaseComps
Tracker/TrackerSimEvent
Tracker/TrackerRawEvent/TrackerRawData
Tracker/TrackerRawEvent/TrackerSimData
Tracker/TrackerDetDescr/TrackerIdentifier
)
atlas_add_component( RDOReadExample atlas_add_component( RDOReadExample
src/RDOReadAlg.cxx src/RDOReadAlg.cxx
src/components/RDOReadExample_entries.cxx src/components/RDOReadExample_entries.cxx
......
...@@ -73,18 +73,28 @@ StatusCode RDOReadAlg::execute() ...@@ -73,18 +73,28 @@ StatusCode RDOReadAlg::execute()
//loop through deposits to find one w/ highest energy & get barcode //loop through deposits to find one w/ highest energy & get barcode
float highestDep = 0; float highestDep = 0;
int barcode = 0; int barcode = 0;
HepMcParticleLink primary{};
for( const auto& depositPair : deposits) for( const auto& depositPair : deposits)
{ {
if( depositPair.second > highestDep) if( depositPair.second > highestDep)
{ {
highestDep = depositPair.second; highestDep = depositPair.second;
barcode = depositPair.first->barcode(); barcode = depositPair.first->barcode();
primary = depositPair.first;
depositPair.first->print(std::cout); depositPair.first->print(std::cout);
ATH_MSG_INFO("pdg id "<<depositPair.first->pdg_id()); ATH_MSG_INFO("pdg id "<<depositPair.first->pdg_id());
} }
} }
ATH_MSG_INFO("final barcode of: "<<barcode); ATH_MSG_INFO("final barcode of: " << barcode << " with energy " << primary->momentum().e());
if (primary->end_vertex() != nullptr)
{
for (auto daughter : primary->particles_out())
{
// TODO: Check that daughter->production_vertex() and daughter->end_vertex() exist, and bracket the point you're interested in
if(daughter->barcode() % 1000000 == primary->barcode())
ATH_MSG_INFO(" daughter barcode: " << daughter->barcode() << " with energy " << daughter->momentum().e());
}
}
//Helper function to get hit location information from RDO identifier //Helper function to get hit location information from RDO identifier
const FaserSCT_ID* pix; const FaserSCT_ID* pix;
......
atlas_subdir( SimHitExample ) atlas_subdir( SimHitExample )
atlas_depends_on_subdirs( PRIVATE
Generators/GeneratorObjects
Control/AthenaBaseComps
Tracker/TrackerSimEvent
)
atlas_add_component( SimHitExample atlas_add_component( SimHitExample
src/SimHitAlg.cxx src/SimHitAlg.cxx
src/components/SimHitExample_entries.cxx src/components/SimHitExample_entries.cxx
......
# Copyright (C) 2020 CERN for the benefit of the FASER collaboration
# Declare the package name:
atlas_subdir( TrackerDataAccessExample )
# Component(s) in the package:
atlas_add_component( TrackerDataAccessExample
src/*.cxx
src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps TrackerRawData )
atlas_install_python_modules( python/*.py )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#!/usr/bin/env python
import sys
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaCommon.Constants import VERBOSE, INFO
def TrackerDataAccessExampleCfg(flags, name="TrackerDataAccessExampleAlg", **kwargs):
from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg
a = FaserGeometryCfg(flags)
TrackerDataAccessExampleAlg = CompFactory.TrackerDataAccess
a.addEventAlgo(TrackerDataAccessExampleAlg(name, **kwargs))
from FaserByteStreamCnvSvc.FaserByteStreamCnvSvcConfig import FaserByteStreamCnvSvcCfg
a.merge(FaserByteStreamCnvSvcCfg(flags))
# thistSvc = CompFactory.THistSvc()
# thistSvc.Output += ["HIST DATAFILE='rdoReadHist.root' OPT='RECREATE'"]
# a.addService(thistSvc)
return a
if __name__ == "__main__":
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
Configurable.configurableRun3Behavior = True
# Flags for this job
ConfigFlags.Input.isMC = False # Needed to bypass autoconfig
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" # Needed to bypass autoconfig, only the "OFLCOND" matters at the moment
ConfigFlags.IOVDb.DatabaseInstance = "OFLP200" # Use MC conditions for now
ConfigFlags.GeoModel.FaserVersion = "FASER-CR" # FASER cosmic ray geometry (station 2 only)
ConfigFlags.Input.ProjectName = "data20" # Needed to bypass autoconfig
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.Input.Files = ["cosmics.raw"]
ConfigFlags.Output.RDOFileName = "tracker.RDO.pool.root"
ConfigFlags.lock()
# Configure components
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
acc = MainServicesCfg(ConfigFlags)
acc.merge(PoolWriteCfg(ConfigFlags))
# Configure output
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
itemList = [ "xAOD::EventInfo#*",
"xAOD::EventAuxInfo#*",
"FaserSCT_RDO_Container#*"
]
acc.merge(OutputStreamCfg(ConfigFlags, "RDO", itemList))
ostream = acc.getEventAlgo("OutputStreamRDO")
# Set up algorithm
acc.merge(TrackerDataAccessExampleCfg(ConfigFlags))
# Configure verbosity
# ConfigFlags.dump()
# logging.getLogger('forcomps').setLevel(VERBOSE)
acc.foreach_component("*").OutputLevel = VERBOSE
acc.foreach_component("*ClassID*").OutputLevel = INFO
# log.setLevel(VERBOSE)
acc.getService("FaserByteStreamInputSvc").DumpFlag = True
acc.getService("FaserEventSelector").OutputLevel = VERBOSE
acc.getService("FaserByteStreamInputSvc").OutputLevel = VERBOSE
acc.getService("FaserByteStreamCnvSvc").OutputLevel = VERBOSE
acc.getService("FaserByteStreamAddressProviderSvc").OutputLevel = VERBOSE
acc.getService("MessageSvc").Format = "% F%40W%S%7W%R%T %0W%M"
# Execute and finish
sys.exit(int(acc.run(maxEvents=-1).isFailure()))
#TrackerDataAccessExample
\ No newline at end of file
/*
Copyright (C) 2020 CERN for the benefit of the FASER collaboration
*/
/*
* TrackerDataAccess.cxx
*
* Simple algorithm to access Tracker RDO data from storegate.
* Try to write a proper thread-safe algorithm.
*
*/
#include "TrackerDataAccess.h"
TrackerDataAccess::TrackerDataAccess(const std::string& name, ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator)
{
}
TrackerDataAccess::~TrackerDataAccess()
{
}
StatusCode
TrackerDataAccess::initialize()
{
ATH_MSG_DEBUG("TrackerDataAccess::initialize() called");
// Must initialize SG handles
ATH_CHECK( m_TrackerContainer.initialize() );
return StatusCode::SUCCESS;
}
StatusCode
TrackerDataAccess::finalize()
{
ATH_MSG_DEBUG("TrackerDataAccess::finalize() called");
ATH_MSG_ALWAYS("Found " << m_goodEvents << " good events out of " << m_events << " total events.");
return StatusCode::SUCCESS;
}
StatusCode
TrackerDataAccess::execute(const EventContext& ctx) const
{
ATH_MSG_DEBUG("TrackerDataAccess::execute() called");
m_events++;
// Try reading the data in the container
SG::ReadHandle<FaserSCT_RDO_Container> containerHandle(m_TrackerContainer, ctx);
if (containerHandle.isValid())
{
ATH_MSG_INFO("Found ReadHandle for SCT_RDOs size=" << containerHandle->size());
m_goodEvents++;
// Try printing out each collection stored in the container
// Works if operator<< is defined for the collection (and it should be)
for(auto coll: *containerHandle)
ATH_MSG_INFO(*coll);
}
else
{
ATH_MSG_ERROR("Unable to retrieve SCT_RDOs");
return StatusCode::RECOVERABLE;
}
return StatusCode::SUCCESS;
}
/*
Copyright (C) 2020 CERN for the benefit of the FASER collaboration
*/
/*
* TrackerByteStreamAccess.h
*
* Simple algorithm to access TLB data from storegate.
* Try to write a proper thread-safe algorithm.
*
*/
#ifndef TRACKERBYTESTREAM_TRACKERDATAACCESS_H
#define TRACKERBYTESTREAM_TRACKERDATAACCESS_H
#include "AthenaBaseComps/AthReentrantAlgorithm.h"
#include "StoreGate/ReadHandleKey.h"
#include <atomic>
#include "TrackerRawData/FaserSCT_RDO_Container.h"
class TrackerDataAccess: public AthReentrantAlgorithm
{
public:
TrackerDataAccess(const std::string& name, ISvcLocator* pSvcLocator);
virtual ~TrackerDataAccess();
virtual StatusCode initialize() override;
virtual StatusCode execute(const EventContext& ctx) const override;
virtual StatusCode finalize() override;
private:
mutable std::atomic<size_t> m_events{0};
mutable std::atomic<size_t> m_goodEvents{0};
/// StoreGate key
SG::ReadHandleKey<FaserSCT_RDO_Container> m_TrackerContainer
{ this, "TrackerDataContainerKey", "SCT_RDOs", "ReadHandleKey for SCT_RDOs Container"};
};
#endif /* TRACKERBYTESTREAM_TRACKERDATAACCESS_H */
#include "../TrackerDataAccess.h"
DECLARE_COMPONENT( TrackerDataAccess )
# Copyright (C) 2020 CERN for the benefit of the FASER collaboration
# Declare the package name:
atlas_subdir( TriggerDataAccessExample )
# Component(s) in the package:
atlas_add_component( TriggerDataAccessExample
src/*.cxx
src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps xAODFaserTrigger )
atlas_install_python_modules( python/*.py )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
#!/usr/bin/env python
import sys
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaCommon.Constants import VERBOSE, INFO
def TriggerDataAccessExampleCfg(flags, name="TriggerDataAccessExampleAlg", **kwargs):
from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg
a = FaserGeometryCfg(flags)
TriggerDataAccessExampleAlg = CompFactory.FaserTriggerDataAccess
a.addEventAlgo(TriggerDataAccessExampleAlg(name, **kwargs))
from FaserByteStreamCnvSvc.FaserByteStreamCnvSvcConfig import FaserByteStreamCnvSvcCfg
a.merge(FaserByteStreamCnvSvcCfg(flags))
# thistSvc = CompFactory.THistSvc()
# thistSvc.Output += ["HIST DATAFILE='rdoReadHist.root' OPT='RECREATE'"]
# a.addService(thistSvc)
return a
if __name__ == "__main__":
from AthenaCommon.Configurable import Configurable
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
Configurable.configurableRun3Behavior = True
# Flags for this job
ConfigFlags.Input.isMC = False # Needed to bypass autoconfig
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-XXXX-XXX-XX" # Needed to bypass autoconfig, only the "OFLCOND" matters at the moment
ConfigFlags.IOVDb.DatabaseInstance = "OFLP200" # Use MC conditions for now
ConfigFlags.GeoModel.FaserVersion = "FASER-01" # Default FASER geometry
ConfigFlags.Input.ProjectName = "data20"
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.Input.Files = ["cosmics.raw"]
ConfigFlags.Output.RDOFileName = "trigger.RDO.pool.root"
ConfigFlags.lock()
# Configure components
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
acc = MainServicesCfg(ConfigFlags)
acc.merge(PoolWriteCfg(ConfigFlags))
# Configure output
from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
itemList = [ "xAOD::EventInfo#*",
"xAOD::EventAuxInfo#*",
"xAOD::FaserTriggerData#*",
"xAOD::FaserTriggerDataAuxInfo#*" ]
acc.merge(OutputStreamCfg(ConfigFlags, "RDO", itemList))
ostream = acc.getEventAlgo("OutputStreamRDO")
# Set up algorithm
acc.merge(TriggerDataAccessExampleCfg(ConfigFlags))
# Configure verbosity
# ConfigFlags.dump()
# logging.getLogger('forcomps').setLevel(VERBOSE)
acc.foreach_component("*").OutputLevel = VERBOSE
acc.foreach_component("*ClassID*").OutputLevel = INFO
# log.setLevel(VERBOSE)
# acc.getService("FaserByteStreamInputSvc").DumpFlag = True
acc.getService("FaserEventSelector").OutputLevel = VERBOSE
acc.getService("FaserByteStreamInputSvc").OutputLevel = VERBOSE
acc.getService("FaserByteStreamCnvSvc").OutputLevel = VERBOSE
acc.getService("FaserByteStreamAddressProviderSvc").OutputLevel = VERBOSE
acc.getService("MessageSvc").Format = "% F%40W%S%7W%R%T %0W%M"
# Execute and finish
sys.exit(int(acc.run(maxEvents=-1).isFailure()))
#TriggerDataAccessExample
\ No newline at end of file
/*
Copyright (C) 2020 CERN for the benefit of the FASER collaboration
*/
/*
* FaserTriggerDataAccess.cxx
*
* Simple algorithm to access TLB data from storegate.
* Try to write a proper thread-safe algorithm.
*
*/
#include "FaserTriggerDataAccess.h"
FaserTriggerDataAccess::FaserTriggerDataAccess(const std::string& name, ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator)
{
}
FaserTriggerDataAccess::~FaserTriggerDataAccess()
{
}
StatusCode
FaserTriggerDataAccess::initialize()
{
ATH_MSG_DEBUG("FaserTriggerDataAccess::initialize() called");
// Must initialize SG handles
ATH_CHECK( m_FaserTriggerData.initialize() );
return StatusCode::SUCCESS;
}
StatusCode
FaserTriggerDataAccess::finalize()
{
ATH_MSG_DEBUG("FaserTriggerDataAccess::finalize() called");
return StatusCode::SUCCESS;
}
StatusCode
FaserTriggerDataAccess::execute(const EventContext& ctx) const
{
ATH_MSG_DEBUG("FaserTriggerDataAccess::execute() called");
ATH_MSG_DEBUG("Looking for FaserTriggerData object at " + m_FaserTriggerData.key());
SG::ReadHandle<xAOD::FaserTriggerData> xaod(m_FaserTriggerData, ctx);
ATH_MSG_INFO("Found FaserTriggerData");
ATH_MSG_INFO(*xaod);
return StatusCode::SUCCESS;
}
/*
Copyright (C) 2020 CERN for the benefit of the FASER collaboration
*/
/*
* FaserTriggerDataAccess.h
*
* Simple algorithm to access TLB data from storegate.
* Try to write a proper thread-safe algorithm.
*
*/
#ifndef FASERTRIGGERDATAACCESS_H
#define FASERTRIGGERDATAACCESS_H
#include "AthenaBaseComps/AthReentrantAlgorithm.h"
#include "StoreGate/ReadHandleKey.h"
#include "xAODFaserTrigger/FaserTriggerData.h"
class FaserTriggerDataAccess: public AthReentrantAlgorithm
{
public:
FaserTriggerDataAccess(const std::string& name, ISvcLocator* pSvcLocator);
virtual ~FaserTriggerDataAccess();
virtual StatusCode initialize() override;
virtual StatusCode execute(const EventContext& ctx) const override;
virtual StatusCode finalize() override;
private:
/// StoreGate key
SG::ReadHandleKey<xAOD::FaserTriggerData> m_FaserTriggerData
{ this, "FaserTriggerDataKey", "FaserTriggerData", "ReadHandleKey for xAOD::FaserTriggerData"};
};
#endif /* FASERTRIGGERDATAACCESS_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment