Commit fe548294 authored by Tim Martin's avatar Tim Martin Committed by Graeme Stewart
Browse files

'add new var to tell if monitoring was run on event' (TrigCostD3PDMaker-01-05-00)

  * Make ROB SUM its own option (currently not used)
  * Add bool for if event was a monitored event
  * Tagging TrigCostD3PDMaker-01-05-00

2014-11-07  scott snyder  <snyder@bnl.gov>

	* Tagging TrigCostD3PDMaker-01-04-01.
	* Fix coverity warnings.

2014-09-24 Tim Martin <Tim.Martin@cern.ch>
  * Add bunch group to enhanced bias ntuple.
  * Tag TrigCostD3PDMaker-01-04-00

2014-09-24 Tim Martin <Tim.Martin@cern.ch>
  * Add process time to rates out ntuple.
  * Tag TrigCostD3PDMaker-01-03-00

2014-09-24 Tim Martin <Tim.Martin@cern.ch>
  * Major restructure
  * Manually write output tree rather than using D3PD tools
...
(Long ChangeLog diff - truncated)
parent 355ebd13
......@@ -7,10 +7,14 @@ private
# Generic Gaudi/Athena packages:
use AthenaKernel AthenaKernel-* Control
use AthenaBaseComps AthenaBaseComps-* Control
use GaudiInterface GaudiInterface-* External
use StoreGate StoreGate-* Control
use SGTools SGTools-* Control
# D3PDMaker packages:
use D3PDMakerUtils D3PDMakerUtils-* PhysicsAnalysis/D3PDMaker
use D3PDMakerInterfaces D3PDMakerInterfaces-* PhysicsAnalysis/D3PDMaker
# EDM packages:
use TrigMonitoringEvent TrigMonitoringEvent-* Trigger/TrigEvent
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# $Id: TrigCostD3PDObject.py 2013-03-04 tamartin $
#
# D3PD Object saving information from the TrigEvent/TrigMonEvent object
# accessed during trigger reprocessing. Saves all details of ROS access
# and chain execuition times for use in rate plotting, rate prediction
# and cost monitoring
#
# This file should be included as in TrigCostD3PDMaker_prodJobOFragment.py
from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerCoreComps.D3PDObject import make_SG_D3PDObject
import TrigCostD3PDMaker
# We allow missing for when running on AthenaMT / PT where we only have one of the two collections.
TrigCostD3PDObject = make_SG_D3PDObject( "TrigMonEventCollection", #Data type
"HLT_OPI_L2_monitoring_event", #Default SG key
"TrigMonL2_", #Default prefix
"TrigCostD3PDObject", #Objact name
True ) #AllowMissing
# TrigMonEvent data is stored in a DataVector. The D3PD maker needs to be told which entry to save.
# By default this will be the first entry (0)
# FailGracefully determins the behaviour of the algorithm if there is no data present at the specified
# entry in the vector.
TrigCostD3PDObject.defineBlock( 2, "event", TrigCostD3PDMaker.TrigCostBaseFillerTool, DataVectorEntryToSave=0, FailGracefully=False )
TrigCostD3PDObject.defineBlock( 0, "chain", TrigCostD3PDMaker.TrigCostChainFillerTool, DataVectorEntryToSave=0, FailGracefully=False )
TrigCostD3PDObject.defineBlock( 0, "l1", TrigCostD3PDMaker.TrigCostL1FillerTool, DataVectorEntryToSave=0, FailGracefully=False )
TrigCostD3PDObject.defineBlock( 1, "rob", TrigCostD3PDMaker.TrigCostROBFillerTool, DataVectorEntryToSave=0, FailGracefully=False )
TrigCostD3PDObject.defineBlock( 1, "roi", TrigCostD3PDMaker.TrigCostRoIFillerTool, DataVectorEntryToSave=0, FailGracefully=False )
TrigCostD3PDObject.defineBlock( 1, "sequence", TrigCostD3PDMaker.TrigCostSequenceFillerTool, DataVectorEntryToSave=0, FailGracefully=False )
TrigCostD3PDObject.defineBlock( 1, "trigElement", TrigCostD3PDMaker.TrigCostTrigElementFillerTool, DataVectorEntryToSave=0, FailGracefully=False )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# $Id: addTrigCostD3PD.py tamartin
#
# Add a trig cost D3PD output stream
def addTrigCostData(mode = "COST", fileName = "trig_cost.root", costConfigL2 = False, costConfigEF = False, costConfigHLT = True):
# Set up a logger:
from AthenaCommon.Logging import logging
addTrigCostData_msg = logging.getLogger( 'addTrigCostData' )
# Construct the stream and file names for the Trigger D3PD:
streamName = "StreamNTUP_TRIG" + mode
addTrigCostData_msg.info( "Configuring Trigger Cost D3PD from bytestream with streamName '%s' and fileName '%s'" % ( streamName, fileName ) )
# Create the D3PD stream(s):
# We dont actually use the default stream!
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
d3pdalg = MSMgr.NewRootStream( streamName, fileName, "dummy" )
# As we are running from bytestream, need to disable data headers.
from AthenaCommon.AlgSequence import AlgSequence
theJob = AlgSequence()
fullStreamName = "StreamNTUP_TRIG" + mode + "AANTStream"
if hasattr(theJob, fullStreamName):
streamRef = getattr( theJob, fullStreamName )
streamRef.ExistDataHeader = False
streamRef.WriteInputDataHeader = False
# The tool needs a special D3PDSvc in which the indexing is turned off for the TTree-s:
_costD3PDSvcName = "TrigCostD3PDSvc_" + mode
from AthenaCommon.AppMgr import ServiceMgr
if not hasattr( ServiceMgr, _costD3PDSvcName ):
from D3PDMakerRoot.D3PDMakerRootConf import D3PD__RootD3PDSvc
ServiceMgr += D3PD__RootD3PDSvc( _costD3PDSvcName )
else:
addTrigCostData_msg.info( "The private D3PDSvc for the cost monitoring TTree already exists" )
_costD3PDSvc = getattr( ServiceMgr, _costD3PDSvcName )
_costD3PDSvc.MasterTree = ""
_costD3PDSvc.IndexMajor = ""
# Add the tool:
_costD3PDToolName = "TrigCostD3PDMakerTool_" + mode
_tuplePath = "/StreamNTUP_TRIG" + mode + "/trig_cost"
if not _costD3PDToolName in [ t.name() for t in d3pdalg.MetadataTools ]:
import TrigCostD3PDMaker
_trigCostTool = TrigCostD3PDMaker.TrigCostD3PDMakerTool( _costD3PDToolName, D3PDSvc = _costD3PDSvc, dir = _tuplePath )
_trigCostTool.mode = mode
if (costConfigL2 == True):
_trigCostTool.keyEvent = "HLT_TrigMonEventCollection_OPI_L2_monitoring_event"
_trigCostTool.prefix = "TrigCostL2_"
elif (costConfigEF == True):
_trigCostTool.keyEvent = "HLT_TrigMonEventCollection_OPI_EF_monitoring_event"
_trigCostTool.prefix = "TrigCostEF_"
elif (costConfigHLT == True):
_trigCostTool.keyEvent = "HLT_TrigMonEventCollection_OPI_HLT_monitoring_event"
_trigCostTool.prefix = "TrigCostHLT_"
d3pdalg.MetadataTools += [ _trigCostTool ]
if (mode != "EBWEIGHT"):
from TriggerD3PDMaker.TrigConfMetadata import addTrigConfMetadata
addTrigConfMetadata( d3pdalg, True, costConfigL2, costConfigEF, costConfigHLT, False, _tuplePath )
......@@ -5,107 +5,23 @@
# This jobO should not be included more than once:
include.block( "TrigCost3PDMaker/TrigCostD3PDMaker_prodJobOFragment.py" )
# Set up a logger:
from AthenaCommon.Logging import logging
TrigCostD3PDStream_msg = logging.getLogger( 'TrigCostD3PDMaker_prodJobOFragment' )
# Construct the stream and file names for the Trigger D3PD:
streamName = "StreamNTUP_TRIGCOST"
fileName = "trig_cost.root"
TrigCostD3PDStream_msg.info( "Configuring Trigger Cost D3PD with streamName '%s' and fileName '%s'" % ( streamName, fileName ) )
# Create the D3PD stream(s):
from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
d3pdalg = MSMgr.NewRootStream( streamName, fileName, "trig_cost" )
# As we may be running from bytestream, need to disable data headers.
from AthenaCommon.AlgSequence import AlgSequence
theJob = AlgSequence()
theJob.StreamNTUP_TRIGCOSTAANTStream.ExistDataHeader = False
theJob.StreamNTUP_TRIGCOSTAANTStream.WriteInputDataHeader = False
##
## Add the trigger cost data:
## By default, these are allowed to be missing without terminating the job.
##
from TrigCostD3PDMaker.TrigCostD3PDObject import TrigCostD3PDObject
# Old naming format: HLT_OPI_HLT_monitoring_event
d3pdEntries = 0
costConfigL2 = False
costConfigEF = False
costConfigHLT = False
# Configure with magic variables
if ('costD3PD_doL2' in dir() or 'costD3PD_doEF' in dir() or 'costD3PD_doHLT' in dir()):
if ('costD3PD_doL2' in dir() and bool(costD3PD_doL2) == True):
d3pdalg += TrigCostD3PDObject( 2, sgkey='HLT_TrigMonEventCollection_OPI_L2_monitoring_event', prefix='TrigCostL2_' )
TrigCostD3PDStream_msg.info( "Trigger Cost D3PD is set by costD3PD_doL2 flag to monitor Level L2" )
d3pdEntries += 1
costConfigL2 = True
if ('costD3PD_doEF' in dir() and bool(costD3PD_doEF) == True):
d3pdalg += TrigCostD3PDObject( 2, sgkey='HLT_TrigMonEventCollection_OPI_EF_monitoring_event', prefix='TrigCostEF_' )
TrigCostD3PDStream_msg.info( "Trigger Cost D3PD is set by costD3PD_doEF flag to monitor Level EF" )
d3pdEntries += 1
costConfigEF = True
if ('costD3PD_doHLT' in dir() and bool(costD3PD_doHLT) == True):
d3pdalg += TrigCostD3PDObject( 2, sgkey='HLT_TrigMonEventCollection_OPI_HLT_monitoring_event', prefix='TrigCostHLT_' )
TrigCostD3PDStream_msg.info( "Trigger Cost D3PD is set by costD3PD_doHLT flag to monitor Level HLT" )
d3pdEntries += 1
costConfigHLT = True
#Otherwise configure with the TriggerFlags
TrigCostD3PDStream_msg.info( "Configuring via cosD3PD flags" );
if ('costD3PD_doL2' in dir() and bool(costD3PD_doL2) == True): costConfigL2 = True
if ('costD3PD_doEF' in dir() and bool(costD3PD_doEF) == True): costConfigEF = True
if ('costD3PD_doHLT' in dir() and bool(costD3PD_doHLT) == True): costConfigHLT = True
else:
TrigCostD3PDStream_msg.info( "Configuring via TriggerFlags" );
from TriggerJobOpts.TriggerFlags import TriggerFlags
if TriggerFlags.doLVL2():
d3pdalg += TrigCostD3PDObject( 2, sgkey='HLT_TrigMonEventCollection_OPI_L2_monitoring_event', prefix='TrigCostL2_' )
TrigCostD3PDStream_msg.info( "Trigger Cost D3PD is set by TriggerFlags to monitor Level L2" )
d3pdEntries += 1
costConfigL2 = True
if TriggerFlags.doEF():
d3pdalg += TrigCostD3PDObject( 2, sgkey='HLT_TrigMonEventCollection_OPI_EF_monitoring_event', prefix='TrigCostEF_' )
TrigCostD3PDStream_msg.info( "Trigger Cost D3PD is set by TriggerFlags to monitor Level EF" )
d3pdEntries += 1
costConfigEF = True
if TriggerFlags.doHLT():
d3pdalg += TrigCostD3PDObject( 2, sgkey='HLT_TrigMonEventCollection_OPI_HLT_monitoring_event', prefix='TrigCostHLT_' )
TrigCostD3PDStream_msg.info( "Trigger Cost D3PD is set by TriggerFlags to monitor Level HLT" )
d3pdEntries += 1
costConfigHLT = True
if d3pdEntries == 0:
TrigCostD3PDStream_msg.info( "Trigger Cost D3PD is NOT set up to run over any trigger levels, did you setup the trigger?" )
##
## Add the trigger configuration meta data:
## Second argument specifies to use the metadata from the trigger cost infrastructure.
##
from TriggerD3PDMaker.TrigConfMetadata import addTrigConfMetadata
addTrigConfMetadata( d3pdalg, True, costConfigL2, costConfigEF, costConfigHLT )
## The following can only be used in a more offline environment (AtlasProduction).
## Disabled by default. No guarantees.
##
## Add the trigger descision bits (L1) and shorts (HLT):
##
#from TriggerD3PDMaker.TrigDecisionD3PDObject import TrigDecisionD3PDObject
#d3pdalg += TrigDecisionD3PDObject( 10 )
##
## Add the bunch structure meta data:
##
#from TriggerD3PDMaker.BunchStructureMetadata import addBunchStructureMetadata
#addBunchStructureMetadata( d3pdalg )
##
## Add the lumi meta data:
##
#from EventCommonD3PDMaker.LBMetadataConfig import LBMetadataConfig
#d3pdalg.MetadataTools += [ LBMetadataConfig() ]
if TriggerFlags.doLVL2(): costConfigL2 = True
if TriggerFlags.doEF(): costConfigEF = True
if TriggerFlags.doHLT(): costConfigHLT = True
##
## Add lumi block length data:
##
#from EventCommonD3PDMaker.LBLengthD3PDObject import LBLengthD3PDObject
#d3pdalg += LBLengthD3PDObject( 0 )
from TrigCostD3PDMaker.addTrigCostData import addTrigCostData
addTrigCostData("COST", "trig_cost.root", costConfigL2, costConfigEF, costConfigHLT);
\ No newline at end of file
# $Id: TrigCostD3PD_prodJobOFragment.py tamartin
#
# Top jobO fragment setting up the common Trig Cost (NTUP_TRIG_COST).
# This jobO should not be included more than once:
include.block( "TrigCost3PDMaker/TrigEBWeightD3PDMaker_prodJobOFragment.py" )
from AthenaCommon.Logging import logging
TrigEBWeightD3PDStream_msg = logging.getLogger( 'TrigEBWeightD3PDMaker_prodJobOFragment' )
costConfigL2 = False
costConfigEF = False
costConfigHLT = False
if ('costD3PD_doL2' in dir() or 'costD3PD_doEF' in dir() or 'costD3PD_doHLT' in dir()):
TrigEBWeightD3PDStream_msg.info( "Configuring via cosD3PD flags" );
if ('costD3PD_doL2' in dir() and bool(costD3PD_doL2) == True): costConfigL2 = True
if ('costD3PD_doEF' in dir() and bool(costD3PD_doEF) == True): costConfigEF = True
if ('costD3PD_doHLT' in dir() and bool(costD3PD_doHLT) == True): costConfigHLT = True
else:
TrigEBWeightD3PDStream_msg.info( "Configuring via TriggerFlags" );
from TriggerJobOpts.TriggerFlags import TriggerFlags
if TriggerFlags.doLVL2(): costConfigL2 = True
if TriggerFlags.doEF(): costConfigEF = True
if TriggerFlags.doHLT(): costConfigHLT = True
from TrigCostD3PDMaker.addTrigCostData import addTrigCostData
addTrigCostData("EBWEIGHT", "trig_ebweight.root", costConfigL2, costConfigEF, costConfigHLT);
\ No newline at end of file
# $Id: TrigCostD3PD_prodJobOFragment.py tamartin
#
# Top jobO fragment setting up the common Trig Cost (NTUP_TRIG_COST).
# This jobO should not be included more than once:
include.block( "TrigCost3PDMaker/TrigRateD3PDMaker_prodJobOFragment.py" )
from AthenaCommon.Logging import logging
TrigRateD3PDStream_msg = logging.getLogger( 'TrigRateD3PDMaker_prodJobOFragment' )
costConfigL2 = False
costConfigEF = False
costConfigHLT = False
if ('costD3PD_doL2' in dir() or 'costD3PD_doEF' in dir() or 'costD3PD_doHLT' in dir()):
TrigRateD3PDStream_msg.info( "Configuring via cosD3PD flags" );
if ('costD3PD_doL2' in dir() and bool(costD3PD_doL2) == True): costConfigL2 = True
if ('costD3PD_doEF' in dir() and bool(costD3PD_doEF) == True): costConfigEF = True
if ('costD3PD_doHLT' in dir() and bool(costD3PD_doHLT) == True): costConfigHLT = True
else:
TrigRateD3PDStream_msg.info( "Configuring via TriggerFlags" );
from TriggerJobOpts.TriggerFlags import TriggerFlags
if TriggerFlags.doLVL2(): costConfigL2 = True
if TriggerFlags.doEF(): costConfigEF = True
if TriggerFlags.doHLT(): costConfigHLT = True
from TrigCostD3PDMaker.addTrigCostData import addTrigCostData
addTrigCostData("RATE", "trig_rate.root", costConfigL2, costConfigEF, costConfigHLT);
\ No newline at end of file
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigCostBaseFillerTool.cxx tamartin $
// Gaudi/Athena include(s):
#include "AthenaKernel/errorcheck.h"
// Local include(s):
#include "TrigCostBaseFillerTool.h"
#include "TrigCostD3PDUtils.h"
// EDM include(s):
#include "TrigMonitoringEvent/TrigMonEvent.h"
namespace D3PD {
TrigCostBaseFillerTool::TrigCostBaseFillerTool( const std::string& type,
const std::string& name,
const IInterface* parent )
: BlockFillerTool< TrigMonEventCollection >( type, name, parent )
{
// Avoid coverity warnings
book().ignore();
declareProperty( "DataVectorEntryToSave", m_dataVectorEntryToSave = 0 );
declareProperty( "FailGracefully", m_failGracefully = true );
}
StatusCode TrigCostBaseFillerTool::book() {
//Base info
CHECK( addVariable( "eventNumber", m_event, "Event number" ) );
CHECK( addVariable( "lumi", m_lumi, "Lumi block number for this event" ) );
CHECK( addVariable( "lumiLength", m_lumiLength, "Length in s of this lumi block" ) );
CHECK( addVariable( "bunchCrossingId", m_bunch_id, "BCID for this event" ) );
CHECK( addVariable( "runNumber", m_run, "Run number for this event" ) );
CHECK( addVariable( "seconds", m_sec, "Start of the event in seconds" ) );
CHECK( addVariable( "nanoSeconds", m_nsec, "Start of the event nanoseconds" ) );
CHECK( addVariable( "timer", m_timer, "Nominal time for this event" ) );
CHECK( addVariable( "timerTrigCost", m_timerTrigCost, "Detailed: Time to run the OPI trig cost tools" ) );
CHECK( addVariable( "timerEndSteer", m_timerEndSteer, "Detailed: Time to end of steering" ) );
CHECK( addVariable( "timerChainProcess", m_timerChainProcess, "Detailed: Time of chain execution" ) );
CHECK( addVariable( "timerResultBuilder", m_timerResultBuilder, "Detailed: Time of ResultBuilder tool execution" ) );
CHECK( addVariable( "timerMon", m_timerMon, "Detailed: Total time of monitoring tool(s) execution" ) );
CHECK( addVariable( "costRunSec", m_costRunSec, "Second the data were saved by CostMon" ) );
CHECK( addVariable( "costRunNsec", m_costRunNsec, "Nanosecond the data were saved by CostMon" ) );
CHECK( addVariable( "costEvent", m_costEvent, "Sequential number of cost events processed" ) );
CHECK( addVariable( "appId", m_appId, "Hash of AppId of the XPU node processing this event." ) );
return StatusCode::SUCCESS;
}
StatusCode TrigCostBaseFillerTool::fill( const TrigMonEventCollection& eventCollection ) {
//Get requested event from vector
const TrigMonEvent* event = getObjectFromVector(eventCollection, m_dataVectorEntryToSave);
if ( event == 0 && m_failGracefully == true ) {
REPORT_MESSAGE( MSG::DEBUG ) << "Requesting entry not contained in DataVector! Continuing run...";
return StatusCode::SUCCESS;
} else if ( event == 0 && m_failGracefully == false ) {
REPORT_MESSAGE( MSG::FATAL ) << "Requesting entry not contained in DataVector! Could not run TrigCostD3PDMaker.";
return StatusCode::FAILURE;
}
//Base info (as this package may be run in future without other standard D3PD framework, keep these options alive)
*m_event = event->getEvent();
*m_lumi = event->getLumi();
*m_bunch_id = event->getBunchId();
*m_run = event->getRun();
*m_sec = event->getSec();
*m_nsec = event->getNanoSec();
*m_timer = event->getTimer();
for (unsigned i=0; i < event->getWord().size(); ++i) {
switch (i) {
case 0:
*m_costRunSec = event->getWord().at(i);
break;
case 1:
*m_costRunNsec = event->getWord().at(i);
break;
case 2:
*m_appId = event->getWord().at(i);
break;
default:
break;
}
}
// Check and save additonal payload relating to the event
if ( event->getVarKey().size() != event->getVarVal().size() ) {
REPORT_MESSAGE( MSG::WARNING ) << "Trigger event-mon-base additional integer payload size different to key size, skipping.";
} else {
for (unsigned i=0; i < event->getVarKey().size(); ++i) {
switch (event->getVarKey().at(i)) {
case 100:
*m_timerTrigCost = event->getVarVal().at(i);
break;
case 101:
*m_timerEndSteer = event->getVarVal().at(i);
break;
case 102:
*m_timerChainProcess = event->getVarVal().at(i);
break;
case 103:
*m_timerResultBuilder = event->getVarVal().at(i);
break;
case 104:
*m_timerMon = event->getVarVal().at(i);
break;
case 9999:
*m_costEvent = event->getVarVal().at(i);
break;
case 43:
*m_lumiLength = event->getVarVal().at(i);
break;
default:
REPORT_MESSAGE( MSG::DEBUG ) << "Ignored unknown int=>float ("
<<event->getVarKey().at(i)<<" => "<<event->getVarVal().at(i)
<<") mapped data in TrigMonEvent D3PD Making.";
break;
}
}
}
return StatusCode::SUCCESS;
}
} // namespace D3PD
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRIGCOSTD3PDMAKER_TRIGCOSTBASEFILLERTOOL_H
#define TRIGCOSTD3PDMAKER_TRIGCOSTBASEFILLERTOOL_H
// STL include(s):
#include <vector>
#include <string>
// EDM include(s):
#include "TrigMonitoringEvent/TrigMonEventCollection.h"
// D3PD include(s):
#include "D3PDMakerUtils/BlockFillerTool.h"
namespace D3PD {
/**
* @short Filler tool for TrigMonEvent objects
*
* This base filler tool outputs global properties of the event mon
* object, some of these are availbe elsewhere if running with full framework.
*
* @author Tim Martin
*
* $Date: April 2013
*/
class TrigCostBaseFillerTool : public BlockFillerTool< TrigMonEventCollection > {
public:
/// Regular AlgTool constructor
TrigCostBaseFillerTool( const std::string& type, const std::string& name,
const IInterface* parent );
/// Function booking the variables in the output
virtual StatusCode book();
/// Function filling the variables for the output
virtual StatusCode fill( const TrigMonEventCollection& eventCollection );
private:
uint32_t m_dataVectorEntryToSave;
bool m_failGracefully;
//TrigMonEvent Variables
uint32_t* m_event; // Event number
uint32_t* m_lumi; // Lumi block (low 16 bits of TrigMonEvent.m_lumi)
float* m_lumiLength; // Lumi block length in seconds
uint32_t* m_bunch_id; // bunch crossing id (high 16 bits of TrigMonEvent.m_lumi)
uint32_t* m_run; // Run number
uint32_t* m_sec; // Event second
uint32_t* m_nsec; // Event ns
float* m_timer; // Event timer
float* m_timerTrigCost; // Detailed time - Time to process TrigCost OPI tools
float* m_timerEndSteer; // Detailed time - End of OPI steering
float* m_timerChainProcess; // Detailed time - chain processing
float* m_timerResultBuilder; // Detailed time - result building
float* m_timerMon; // Detailed time - monitoring
float* m_costEvent; // Sequential cost event number
uint32_t* m_costRunSec; // Cost processing time second
uint32_t* m_costRunNsec; // Cost processing time ns
uint32_t* m_appId; // Application ID - hash of trigger XPU node
}; // class TrigCostBaseFillerTool
} // namespace D3PD
#endif // TRIGCOSTD3PDMAKER_TRIGCOSTBASEFILLERTOOL_H
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigCostChainFillerTool.cxx tamartin $
// Gaudi/Athena include(s):
#include "AthenaKernel/errorcheck.h"
// Local include(s):
#include "TrigCostChainFillerTool.h"
#include "TrigCostD3PDUtils.h"
// EDM include(s):
#include "TrigMonitoringEvent/TrigMonEvent.h"
#include "TrigMonitoringEvent/TrigMonChain.h"
namespace D3PD {
TrigCostChainFillerTool::TrigCostChainFillerTool( const std::string& type,
const std::string& name,
const IInterface* parent )
: BlockFillerTool< TrigMonEventCollection >( type, name, parent )
{
// Avoid coverity warnings
book().ignore();
declareProperty( "DataVectorEntryToSave", m_dataVectorEntryToSave = 0 );
declareProperty( "FailGracefully", m_failGracefully = true );
}
StatusCode TrigCostChainFillerTool::book() {
//Chains
CHECK( addVariable( "chain_n", m_chainN, "" ) );
CHECK( addVariable( "chain_counter", m_chainCounter, "" ) );
CHECK( addVariable( "chain_level", m_chainLevel, "" ) );
CHECK( addVariable( "chain_timer", m_chainTimer, "" ) );
CHECK( addVariable( "chain_isPassed", m_chainIsPassed, "" ) );
CHECK( addVariable( "chain_isPassedRaw", m_chainIsPassedRaw, "" ) );
CHECK( addVariable( "chain_isPassthrough", m_chainIsPassthrough, "" ) );
CHECK( addVariable( "chain_isResurrected", m_chainIsResurrected, "" ) );
CHECK( addVariable( "chain_isPrescaled", m_chainIsPrescaled, "" ) );
CHECK( addVariable( "chain_wasL1AfterVeto", m_chainWasL1AfterVeto, "" ) );
CHECK( addVariable( "chain_wasL1BeforePrescale", m_chainWasL1BeforePrescale, "" ) );
CHECK( addVariable( "chain_wasL1AfterPrescale", m_chainWasL1AfterPrescale, "" ) );
CHECK( addVariable( "chain_isExpressStream", m_chainIsExpressStream, "" ) );
return StatusCode::SUCCESS;
}
StatusCode TrigCostChainFillerTool::fill( const TrigMonEventCollection& eventCollection ) {
//Get requested event from vector
const TrigMonEvent* event = getObjectFromVector(eventCollection, m_dataVectorEntryToSave);
if ( event == 0 && m_failGracefully == true ) {
REPORT_MESSAGE( MSG::DEBUG ) << "Requesting entry not contained in DataVector! Continuing run...";
return StatusCode::SUCCESS;