Skip to content
Snippets Groups Projects
Commit ce6cc39e authored by Olga Igonkina's avatar Olga Igonkina Committed by Atlas Nightlybuild
Browse files

Merge branch 'WriteSimOverflowBits' into '21.1'

Adding L1Topo simulated overflow bits to HLTResults

See merge request atlas/athena!14660

(cherry picked from commit db41d69970f65ab622852108337e9bda1ad1b1fe)

0c9895ff Adding sim overflow bits to HLTResults
parent 800e220c
No related merge requests found
...@@ -19,6 +19,9 @@ TrigL1TopoWriteValData::TrigL1TopoWriteValData(const std::string& name, ISvcLoca ...@@ -19,6 +19,9 @@ TrigL1TopoWriteValData::TrigL1TopoWriteValData(const std::string& name, ISvcLoca
declareProperty("SimTopoCTPLocation", declareProperty("SimTopoCTPLocation",
m_simTopoCTPLocation = LVL1::DEFAULT_L1TopoCTPLocation, m_simTopoCTPLocation = LVL1::DEFAULT_L1TopoCTPLocation,
"StoreGate key of simulated topo decision output for CTP, defaults to default output key of L1TopoSimulation"); "StoreGate key of simulated topo decision output for CTP, defaults to default output key of L1TopoSimulation");
declareProperty("SimTopoOverflowCTPLocation",
m_simTopoOverflowCTPLocation = LVL1::DEFAULT_L1TopoOverflowCTPLocation,
"StoreGate key of simulated topo overflow output for CTP" );
declareProperty("HLTResultName", declareProperty("HLTResultName",
m_HltResultName = "HLTResult_HLT", m_HltResultName = "HLTResult_HLT",
"StoreGate key of HLT result" ); "StoreGate key of HLT result" );
...@@ -28,6 +31,7 @@ StatusCode TrigL1TopoWriteValData::initialize(){ ...@@ -28,6 +31,7 @@ StatusCode TrigL1TopoWriteValData::initialize(){
ATH_MSG_INFO ("initialize"); ATH_MSG_INFO ("initialize");
ATH_MSG_DEBUG ("Properties:" ); ATH_MSG_DEBUG ("Properties:" );
ATH_MSG_DEBUG ("SimTopoCTPLocation : "<<m_simTopoCTPLocation ); ATH_MSG_DEBUG ("SimTopoCTPLocation : "<<m_simTopoCTPLocation );
ATH_MSG_DEBUG ("SimTopoOverflowCTPLocation : "<<m_simTopoOverflowCTPLocation );
ATH_MSG_DEBUG ("HLTResultName : "<<m_HltResultName ); ATH_MSG_DEBUG ("HLTResultName : "<<m_HltResultName );
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -54,7 +58,8 @@ StatusCode TrigL1TopoWriteValData::finalize() { ...@@ -54,7 +58,8 @@ StatusCode TrigL1TopoWriteValData::finalize() {
//---------------------------------------------------------- //----------------------------------------------------------
StatusCode TrigL1TopoWriteValData::doWriteValData(){ StatusCode TrigL1TopoWriteValData::doWriteValData(){
ATH_MSG_DEBUG( "doWriteValData" ); ATH_MSG_DEBUG( "doWriteValData" );
int num_words = 4;
// Retrieve HLTResult // Retrieve HLTResult
DataHandle<HLT::HLTResult> hltResult; ///! HLTResult object DataHandle<HLT::HLTResult> hltResult; ///! HLTResult object
if ( ! evtStore()->transientContains<HLT::HLTResult>(m_HltResultName.value()) ) { if ( ! evtStore()->transientContains<HLT::HLTResult>(m_HltResultName.value()) ) {
...@@ -79,13 +84,33 @@ StatusCode TrigL1TopoWriteValData::doWriteValData(){ ...@@ -79,13 +84,33 @@ StatusCode TrigL1TopoWriteValData::doWriteValData(){
} }
} }
// Retrieve L1Topo CTP simulated overflows if present
const DataHandle< LVL1::FrontPanelCTP > simTopoOverflowCTP; ///! simulated overflow output
if ( ! evtStore()->contains<LVL1::FrontPanelCTP>(m_simTopoOverflowCTPLocation.value()) ){
ATH_MSG_INFO("Could not find LVL1::FrontPanelCTP with key " << m_simTopoOverflowCTPLocation.value() << " in SG. No simulated overflow bits" );
} else {
CHECK_RECOVERABLE( evtStore()->retrieve(simTopoOverflowCTP,m_simTopoOverflowCTPLocation.value()) );
if (!simTopoOverflowCTP){
ATH_MSG_INFO( "Retrieve of LVL1::FrontPanelCTP sim overflows failed. No sim overflow data written to HLTResult" );
} else {
num_words = 8;
}
}
// Write the L1Topo simulation data into the HLTResult // Write the L1Topo simulation data into the HLTResult
hltResult->getExtraData().anonymous.push_back( 4 ); // number of words to be written hltResult->getExtraData().anonymous.push_back( num_words ); // number of words to be written
hltResult->getExtraData().anonymous.push_back( simTopoCTP->cableWord1(0) ); // L1Topo simulation words hltResult->getExtraData().anonymous.push_back( simTopoCTP->cableWord1(0) ); // L1Topo simulation words
hltResult->getExtraData().anonymous.push_back( simTopoCTP->cableWord1(1) ); hltResult->getExtraData().anonymous.push_back( simTopoCTP->cableWord1(1) );
hltResult->getExtraData().anonymous.push_back( simTopoCTP->cableWord2(0) ); hltResult->getExtraData().anonymous.push_back( simTopoCTP->cableWord2(0) );
hltResult->getExtraData().anonymous.push_back( simTopoCTP->cableWord2(1) ); hltResult->getExtraData().anonymous.push_back( simTopoCTP->cableWord2(1) );
if ( num_words == 8 ) {
hltResult->getExtraData().anonymous.push_back( simTopoOverflowCTP->cableWord1(0) );// L1Topo simulated overflow words
hltResult->getExtraData().anonymous.push_back( simTopoOverflowCTP->cableWord1(1) );
hltResult->getExtraData().anonymous.push_back( simTopoOverflowCTP->cableWord2(0) );
hltResult->getExtraData().anonymous.push_back( simTopoOverflowCTP->cableWord2(1) );
}
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -29,6 +29,7 @@ class TrigL1TopoWriteValData:public AthAlgorithm { ...@@ -29,6 +29,7 @@ class TrigL1TopoWriteValData:public AthAlgorithm {
private: private:
StatusCode doWriteValData(); StatusCode doWriteValData();
StringProperty m_simTopoCTPLocation; StringProperty m_simTopoCTPLocation;
StringProperty m_simTopoOverflowCTPLocation;
StringProperty m_HltResultName; StringProperty m_HltResultName;
}; };
......
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