ATLAS Offline Software
Loading...
Searching...
No Matches
xAODTrigDecisionRetriever.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include <string>
8
9#include "CLHEP/Units/SystemOfUnits.h"
10
11// references:
12// Event/xAOD/xAODTrigger/trunk/Root/TrigDecision_v1.cxx
13// Event/xAOD/xAODTrigger/trunk/Root/TrigDecisionAuxInfo_v1.cxx
15
16namespace JiveXML {
17
18 //--------------------------------------------------------------------------
19
20 xAODTrigDecisionRetriever::xAODTrigDecisionRetriever(const std::string& type, const std::string& name, const IInterface* parent):
21 AthAlgTool(type, name, parent), m_typeName("TrigDecision_xAOD")
22 {
23
24 declareInterface<IDataRetriever>(this);
25 }
26
27 //--------------------------------------------------------------------------
28
29 StatusCode xAODTrigDecisionRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
30
31 DataVect test;
32
33 const xAOD::TrigDecision* trigDec = 0;
34
35 m_sgKey = "xTrigDecision"; //sgKey from 20.0.0.2 AOD
36 if ( evtStore()->retrieve(trigDec,m_sgKey).isFailure() ) {
37 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "No xAOD::xTrigDecision found in SG " << endmsg;
38 return StatusCode::SUCCESS;
39 }
40 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Found xAOD::xTrigDecision in SG ! " << endmsg;
41
42 DataVect smk;
43 DataVect bgCode;
44 DataVect tav;
45 DataVect tap;
46 DataVect tbp;
47
48 smk.push_back(DataType( trigDec->smk() ));
52/*
53 bgCode.push_back(DataType( trigDec->bgCode() ));
54 tav.push_back(DataType( trigDec->tav() ));
55 tap.push_back(DataType( trigDec->tap() ));
56 tbp.push_back(DataType( trigDec->tbp() ));
57*/
58 DataMap myDataMap;
59/*
60 myDataMap["smk"] = smk;
61 myDataMap["bgCode"] = bgCode;
62 myDataMap["tav"] = tav;
63 myDataMap["tap"] = tap;
64 myDataMap["tbp"] = tbp;
65*/
66 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << ": "
67 << " SMK: " << trigDec->smk()
68 << " BGCODE: " << trigDec->bgCode()
69 << " TAV: " << trigDec->tav()
70 << " TAP: " << trigDec->tap()
71 << " TBP: " << trigDec->tbp()
72 << " from: " << m_sgKey << endmsg;
73
75 //return 0;
77 return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
78 }
79}
#define endmsg
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
ServiceHandle< StoreGateSvc > & evtStore()
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() const
xAODTrigDecisionRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
const std::string m_typeName
The data type that is generated by this retriever.
virtual std::string dataTypeName() const
Return the name of the data type.
const std::vector< uint32_t > & tav() const
Get the Trigger After Veto bits.
uint32_t smk() const
Get the Super Master Key describing this object.
const std::vector< uint32_t > & tap() const
Get the Trigger After Prescale bits.
char bgCode() const
Get the bunch group code of the current event.
const std::vector< uint32_t > & tbp() const
Get the Trigger Before Prescale bits.
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
std::map< std::string, DataVect > DataMap
Definition DataType.h:59
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
Definition DataType.h:58
TrigDecision_v1 TrigDecision
Define the latest version of the trigger decision class.