ATLAS Offline Software
Namespaces | Classes | Typedefs | Functions
asg Namespace Reference

Namespaces

 detail
 
 details
 Namespace for "implementation types".
 

Classes

class  AcceptData
 
class  AcceptInfo
 
class  AnaToolHandle
 a modified tool handle that allows its owner to configure new tools from the C++ side More...
 
class  AsgComponentConfig
 an object that stores the configuration for an AsgComponent and is able to create one from it More...
 
class  AsgMessaging
 Class mimicking the AthMessaging class from the offline software. More...
 
class  AsgMessagingForward
 base class to forward messages to another class More...
 
class  AsgMetadataTool
 Base class for dual-use tools that provide file metadata access. More...
 
class  AsgService
 Base class for the dual-use service implementation classes. More...
 
class  AsgServiceConfig
 an object that can create a AsgService More...
 
class  AsgTool
 Base class for the dual-use tool implementation classes. More...
 
class  AsgToolConfig
 an object that can create a AsgTool More...
 
struct  CheckHelper
 this is an internal traits class for status codes used by the ANA_CHECK* macros More...
 
struct  CheckHelper< bool >
 
struct  CheckHelper< CP::CorrectionCode >
 
struct  CheckHelper< int >
 
struct  CheckHelper< StatusCode >
 
struct  CheckHelper< T * >
 
struct  DataHandleTestTool
 a tool used to unit test AnaToolHandle More...
 
class  EventStoreTestAlg
 Algorithm used to exercise asg::EventStoreTestTool in Athena. More...
 
class  EventStoreTestTool
 Tool testing some of the "event store functionality" of asg::AsgTool. More...
 
class  IAsgService
 Base class for the dual-use service interface classes. More...
 
class  IAsgTool
 Base class for the dual-use tool interface classes. More...
 
class  IDataHandleTestTool
 the interface for DataHandleTestTool More...
 
class  IEventStoreTestTool
 Interface for (a) tool(s) testing the event store. More...
 
class  IUnitTestService1
 the interface for UnitTestService1 More...
 
class  IUnitTestTool1
 the interface for UnitTestTool1 More...
 
class  IUnitTestTool2
 the interface for UnitTestTool2 More...
 
class  IUnitTestTool3
 the interface for UnitTestTool3 More...
 
class  MessagePrinterOverlay
 an object to change the IMessagePrinter temporarily More...
 
struct  MsgHelpers
 a helper class for functions dealing with messages More...
 
class  SgTEvent
 Wrapper for TEvent to make it look like StoreGate. More...
 
class  SgTEventMeta
 Wrapper class providing StoreGate-like access to metadata in ROOT. More...
 
class  StandaloneToolHandle
 an "initializing" ToolHandle for stand-alone applications More...
 
class  ToolStore
 A light-weight replacement for ToolSvc for ROOT analysis. More...
 
struct  UnitTestService1
 a service used to unit test AnaToolHandle More...
 
struct  UnitTestTool1
 a tool used to unit test AnaToolHandle More...
 
struct  UnitTestTool1A
 a tool used to unit test AnaToolHandle More...
 
struct  UnitTestTool2
 a tool used to unit test AnaToolHandle More...
 
struct  UnitTestTool3
 a tool used to unit test AnaToolHandle More...
 

Typedefs

typedef ::AthService AsgServiceBase
 
typedef INamedInterface parentType_t
 
typedef IAlgTool interfaceType_t
 
typedef ::AthAlgTool AsgToolBase
 
typedef StoreGateSvc EventStoreType
 the type returned by AsgTool::evtStore More...
 

Functions

void DataHandleTestTool ::runTest ATLAS_NOT_THREAD_SAFE ()
 
template<typename T >
std::ostream & operator<< (std::ostream &str, const AnaToolHandle< T > &obj)
 standard output operator More...
 
std::string ptrToString (const void *p)
 
template<typename T >
std::ostream & operator<< (std::ostream &str, const StandaloneToolHandle< T > &obj)
 
 ANA_MSG_HEADER (msgSTT) ANA_MSG_SOURCE(msgSTT
 

Detailed Description

Author
Nils Krumnack
Nils Krumnack
David Adams dlada.nosp@m.ms@b.nosp@m.nl.go.nosp@m.v (for original implementation for tools)
Nils Krumnack

Typedef Documentation

◆ AsgServiceBase

Definition at line 29 of file AsgService.h.

◆ AsgToolBase

Definition at line 33 of file AsgTool.h.

◆ EventStoreType

the type returned by AsgTool::evtStore

This is provided in case you need to pass the event store into a stand-alone helper function.

Definition at line 27 of file EventStoreType.h.

◆ interfaceType_t

typedef IAlgTool asg::interfaceType_t

Definition at line 31 of file AnaToolHandle.h.

◆ parentType_t

typedef INamedInterface asg::parentType_t

Definition at line 30 of file AnaToolHandle.h.

Function Documentation

◆ ANA_MSG_HEADER()

asg::ANA_MSG_HEADER ( msgSTT  )

◆ ATLAS_NOT_THREAD_SAFE()

void DataHandleTestTool :: runTest asg::ATLAS_NOT_THREAD_SAFE ( )

Definition at line 76 of file DataHandleTestTool.cxx.

77  {
78 #ifndef SIMULATIONBASE
79  const xAOD::MuonContainer *muonsStore {nullptr};
80  ASSERT_SUCCESS (evtStore()->retrieve (muonsStore, "Muons"));
81  ASSERT_NE (0u, muonsStore->size());
82  const xAOD::Muon *testMuon = (*muonsStore)[0];
83 
84  auto readHandle = makeHandle (m_readKey);
85  if (m_readFailure == true)
86  {
87  EXPECT_FALSE (readHandle.isPresent());
88  EXPECT_EQ (nullptr, readHandle.get());
89  EXPECT_FALSE (readHandle.isValid());
90  } else
91  {
92  EXPECT_TRUE (readHandle.isPresent());
93  EXPECT_EQ (muonsStore, readHandle.get());
94  EXPECT_TRUE (readHandle.isValid());
95  }
96 
97  SG::ReadDecorHandle<xAOD::MuonContainer,float> readDecorHandle (m_readDecorKey);
98  if (m_readDecorFailure == true)
99  {
100  EXPECT_TRUE(readDecorHandle.isPresent());
101  EXPECT_FALSE(readDecorHandle.isAvailable());
102  EXPECT_ANY_THROW (readDecorHandle (*testMuon));
103  } else
104  {
105  EXPECT_TRUE(readDecorHandle.isPresent());
106  EXPECT_TRUE(readDecorHandle.isAvailable());
108  EXPECT_EQ (acc (*testMuon), readDecorHandle (*testMuon));
109  }
110 
111  if (m_readArray)
112  {
113  EXPECT_EQ (1u, m_readKeyArray.size());
114  auto handles = m_readKeyArray.makeHandles();
115  EXPECT_EQ (muonsStore, handles[0].get());
116  } else
117  {
118  EXPECT_EQ (0u, m_readKeyArray.size());
119  }
120 
121  if (!m_doWriteName.empty())
122  {
123  auto writeHandle = makeHandle (m_writeKey);
124  auto newMuons = std::make_unique<xAOD::MuonContainer>();
125  auto newAux = std::make_unique<xAOD::MuonAuxContainer>();
126  xAOD::MuonContainer *recordMuons {newMuons.get()};
127  xAOD::MuonAuxContainer *recordAux {newAux.get()};
128  EXPECT_SUCCESS (writeHandle.record (std::move (newMuons), std::move (newAux)));
129  const xAOD::MuonContainer *retrieveMuons {nullptr};
130  EXPECT_SUCCESS (evtStore()->retrieve (retrieveMuons, m_doWriteName));
131  EXPECT_EQ (recordMuons, retrieveMuons);
132  xAOD::MuonAuxContainer *retrieveAux {nullptr};
133  EXPECT_SUCCESS (evtStore()->retrieve (retrieveAux, m_doWriteName + "Aux."));
134  EXPECT_EQ (recordAux, retrieveAux);
135  }
136 
137  if (!m_doWriteDecorName.empty())
138  {
139  auto writeDecorHandle = SG::makeHandle<unsigned> (m_writeDecorKey);
140  EXPECT_TRUE(writeDecorHandle.isPresent());
141  EXPECT_FALSE(writeDecorHandle.isAvailable());
142  writeDecorHandle (*(*muonsStore)[0]) = 42u;
143  SG::AuxElement::ConstAccessor<unsigned> acc (m_doWriteDecorName);
144  EXPECT_EQ (42u, acc (*(*muonsStore)[0]));
145  }
146 
147  if (!m_doWriteDecorNameExisting.empty())
148  {
149  auto writeDecorHandleExisting = SG::makeHandle<float> (m_writeDecorKeyExisting);
150  EXPECT_TRUE(writeDecorHandleExisting.isPresent());
151  EXPECT_TRUE(writeDecorHandleExisting.isAvailable());
152  }
153 #endif
154  }

◆ operator<<() [1/2]

template<typename T >
std::ostream& asg::operator<< ( std::ostream &  str,
const AnaToolHandle< T > &  obj 
)

standard output operator

Guarantee
basic
Failures
streaming errors

◆ operator<<() [2/2]

template<typename T >
std::ostream& asg::operator<< ( std::ostream &  str,
const StandaloneToolHandle< T > &  obj 
)

Definition at line 197 of file StandaloneToolHandle.h.

198  {
199  return str << "StandaloneToolHandle:" << obj.typeAndName();
200  }

◆ ptrToString()

std::string asg::ptrToString ( const void *  p)

Definition at line 14 of file AsgToolMacros.cxx.

15 {
16  char buf[80];
17  snprintf (buf, 80, "%p", p);
18  return std::string(buf);
19 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
EXPECT_SUCCESS
#define EXPECT_SUCCESS(x)
Definition: Control/AthToolSupport/AsgTesting/AsgTesting/UnitTest.h:38
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ViewHelper::makeHandle
SG::ReadHandle< T > makeHandle(const SG::View *view, const SG::ReadHandleKey< T > &rhKey, const EventContext &context)
navigate from the TrigComposite to nearest view and fetch object from it
Definition: ViewHelper.h:258
DataVector::get
const T * get(size_type n) const
Access an element, as an rvalue.
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
xAOD::MuonAuxContainer_v5
Temporary container used until we have I/O for AuxStoreInternal.
Definition: MuonAuxContainer_v5.h:31
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ASSERT_SUCCESS
#define ASSERT_SUCCESS(x)
Definition: Control/AthToolSupport/AsgTesting/AsgTesting/UnitTest.h:35
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
str
Definition: BTagTrackIpAccessor.cxx:11
python.PyAthena.obj
obj
Definition: PyAthena.py:135