ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigRoiConversion
Root
RoiReader.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
//
5
// @file RoiReader.cxx
6
//
7
//
8
// @author M.Sutton
9
//
10
//
11
12
14
#include "
RoiReader.h
"
15
17
#include "
xAODTrigger/RoiDescriptorStore.h
"
18
#include "
xAODTrigger/RoiDescriptorStoreAuxInfo.h
"
19
21
#include "
TrigRoiConversion/RoiSerialise.h
"
22
23
24
RoiReader::RoiReader
(
const
std::string& name ) :
asg
::
AsgTool
( name ) { }
25
26
27
28
void
RoiReader::execute
( std::vector<std::string>& keys ) {
29
30
ATH_MSG_DEBUG
(
"RoiReader::execute() in"
);
31
33
34
// std::vector<std::string> keys;
35
// evtStore()->keys<xAOD::RoiDescriptorStore>( keys );
36
39
40
for
(
unsigned
ik=0 ; ik<keys.size() ; ik++ ) {
41
42
std::string collectionname =
"RoiDescriptorStore"
;
43
44
std::string keybase = keys[ik];
45
keybase.erase( 0, keybase.find(collectionname)+collectionname.size() );
46
47
std::string newkey =
"HLT_TrigRoiDescriptorCollection"
+ keybase;
48
49
TrigRoiDescriptorCollection
* roicollection =
new
TrigRoiDescriptorCollection
();
50
51
deserialiser
( *roicollection, keys[ik] );
52
53
if
(
evtStore
()->overwrite( roicollection, newkey,
false
).isFailure() ) {
54
ATH_MSG_INFO
(
"RoiReader::execute() could not write "
<< newkey );
55
}
56
57
}
58
59
ATH_MSG_DEBUG
(
"RoiReader::execute() out "
);
60
61
}
62
63
64
65
66
void
RoiReader::deserialiser
(
TrigRoiDescriptorCollection
& collection,
const
std::string& key )
const
{
67
xAOD::RoiDescriptorStore
* fetchedstore = 0;
68
if
(
evtStore
()->retrieve( fetchedstore, key ).isSuccess() && fetchedstore!=0 ) {
69
RoiUtil::deserialise
( fetchedstore->
serialised
(), collection );
70
}
71
}
72
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
RoiDescriptorStoreAuxInfo.h
RoiDescriptorStore.h
RoiReader.h
RoiSerialise.h
TrigRoiDescriptorCollection
Athena::TPCnvVers::Current Athena::TPCnvVers::Old TrigRoiDescriptorCollection
Definition
TrigSteeringEventTPCnv.cxx:78
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
RoiReader::execute
virtual void execute(std::vector< std::string > &keys) override
Definition
RoiReader.cxx:28
RoiReader::RoiReader
RoiReader(const std::string &name)
class header
Definition
RoiReader.cxx:24
RoiReader::deserialiser
void deserialiser(TrigRoiDescriptorCollection &collection, const std::string &key) const
Definition
RoiReader.cxx:66
TrigRoiDescriptorCollection
Definition
TrigRoiDescriptorCollection.h:14
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
xAOD::RoiDescriptorStore_v1::serialised
const std::vector< std::vector< uint32_t > > & serialised() const
expose the navigation information (in serialised form)
RoiUtil::deserialise
void deserialise(const roiserial_type &s, std::vector< const IRoiDescriptor * > &rois)
deserialise uint32_t vector into a full vector of IRoiDescriptors
Definition
RoiSerialise.cxx:62
asg
Definition
DataHandleTestTool.h:28
xAOD::RoiDescriptorStore
RoiDescriptorStore_v1 RoiDescriptorStore
Define the latest version of the serialised RoiDescriptor storage.
Definition
RoiDescriptorStore.h:18
Generated on
for ATLAS Offline Software by
1.17.0