ATLAS Offline Software
|
#include <AthAnalysisHelper.h>
Public Member Functions | |
AthAnalysisHelper () | |
Static Public Member Functions | |
static IAppMgrUI * | initGaudi (const char *options="") |
initGaudi method starts the gaudi ApplicationMgr ready for working with all the components More... | |
template<typename W > | |
static StatusCode | addPropertyToCatalogue (const std::string &name, const std::string &property, const W &value, bool override=true) |
helper method for adding a property to the JobOptionsSvc to list all the properties in the catalogue, do: AthAnalysisHelper::dumpJobOptionProperties() More... | |
template<typename W > | |
static StatusCode | setProperty (const std::string &name, const std::string &property, const W &value, bool override=true) |
static StatusCode | setProperty (const std::string &name, const std::string &property, const std::string &value, bool override=true) |
non-template method, for use in joboptions current usage would be: ... More... | |
template<class W , typename = typename std::enable_if<!std::is_base_of<GaudiHandleBase,W>::value && !std::is_base_of<GaudiHandleArrayBase,W>::value>::type> | |
static StatusCode | setProperty (const GaudiHandleBase &toolHandle, const std::string &property, const W &value, bool override=true) |
helper method for setting a property on a tool before retrieving it uses the toolhandle to work out what to register the joboptionsvc Usage examples: ToolHandle<IMyTool> tool("MyTool/toolName"); CHECK( AthAnalysisHelper::setProperty( tool, "IntegerProperty", 5) ); CHECK( AthAnalysisHelper::setProperty( tool, "StringProperty", "hello") ); CHECK( AthAnalysisHelper::setProperty( tool, "StringArrayProperty", std::vector<std::string>({"a","b","c"}) ) ); CHECK( AthAnalysisHelper::setProperty( tool, "PublicToolHandleProperty", anotherToolHandle) ); CHECK( AthAnalysisHelper::setProperty( tool, "PrivateToolHandleName.SubToolIntegerProperty", 4) ); The last example assumes the 'MyTool' class has declared a ToolHandle("SubTool/PrivateToolHandleName",this) and 'SubTool' class has an integer property called 'SubToolIntegerProperty' declared More... | |
static StatusCode | setProperty (const GaudiHandleBase &toolHandle, const std::string &property, const GaudiHandleBase &value, bool override=true) |
Partial template specialization for ToolHandles and ToolHandleArrays ... strips parent name from tool name, for setting private handles on. More... | |
static StatusCode | setProperty (const GaudiHandleBase &toolHandle, const std::string &property, const GaudiHandleArrayBase &value, bool override=true) |
template<typename W > | |
static StatusCode | setProperty (IAlgTool *tool, const std::string &property, const W &value) |
setProperty on any tool, even when initialized More... | |
template<typename W > | |
static StatusCode | setProperty (IAlgorithm *alg, const std::string &property, const W &value) |
setProperty on an alg, even when initialized More... | |
template<typename T > | |
static std::string | toString (const T &value) |
static std::string | toString (const std::string &value) |
static std::string | toString (const char *value) |
template<typename T , typename W > | |
static StatusCode | setProperty (const ServiceHandle< T > &serviceHandle, const std::string &property, const W &value) |
setProperty for services ... will allow setProperty on already-existing services More... | |
template<typename W > | |
static W * | createTool (const std::string &typeAndName, INamedInterface *parent=0) |
Create a tool using the gaudi factory methods. More... | |
static IAlgTool * | createTool (const std::string &typeAndName, INamedInterface *parent=0) |
static IAlgorithm * | createAlgorithm (const std::string &typeAndName) |
static bool | toolExists (const std::string &fullName) |
check if tool already exists. FullName = Parent.Name More... | |
static bool | toolExists (const GaudiHandleBase &toolHandle) |
static std::string | retrieveMetadata (const std::string &folder, const std::string &key, const ServiceHandle< StoreGateSvc > &inputMetaStore) |
method that always returns as a string you can use from, e.g, pyROOT with evt = ROOT.POOL.TEvent() ... More... | |
static std::string | retrieveMetadata (const std::string &folder, const std::string &key, ServiceHandle< StoreGateSvc > &inputMetaStore) |
template<typename T > | |
static StatusCode | retrieveMetadata (const std::string &folder, const std::string &key, T &out) |
retrieve metadata from the input metadata storegate. More... | |
template<typename T > | |
static StatusCode | retrieveMetadata (const std::string &folder, const std::string &key, T &out, const ServiceHandle< StoreGateSvc > &inputMetaStore) |
implemenation where you pass it a particular store instead More... | |
template<typename T > | |
static StatusCode | retrieveMetadata (const std::string &folder, const std::string &key, T &out, const ServiceHandle< StoreGateSvc > &inputMetaStore, const IOVTime &time, int channel=-1) |
retrieve metadata, for a specified IOVTime and a specific channel, unless the channel is -1, in which case we take the first available channel channels have to be unsigned int, so can use -1 to signal 'take whatever first channel is (it isn't always 0)' More... | |
template<typename T > | |
static StatusCode | retrieveMetadata (const std::string &folder, const std::string &key, T &out, const IOVTime &time, int channel=-1) |
static void | dumpJobOptionProperties (const std::string &client="") |
Dump the properties from joboptionsvc of clients with names beginning with given string. More... | |
static void | dumpProperties (const std::string &client="") |
static std::string | getProperty (const std::string &client, const std::string &property) |
Check catalogue for property of specified client returns AAH::UNDEFINED in case of no property value available (i.e. More... | |
static void | printAuxElement (const SG::AuxElement &ae) |
Print the aux variables of an xAOD object (aux element) An alternative to this method is the 'xAOD::dump' method. More... | |
static void | dumpProperties (const SG::AuxElement &ae) |
static void | dumpProperties (const IProperty &component) |
Dump the properties of an IProperty. More... | |
template<typename T > | |
static void | dumpProperties (const GaudiHandle< T > &handle) |
static TFile * | getOutputFile (const std::string &streamName) |
Static Public Attributes | |
static const std::string | UNDEFINED = "__UNDEFINED__" |
Definition at line 37 of file AthAnalysisHelper.h.
AthAnalysisHelper::AthAnalysisHelper | ( | ) |
Definition at line 18 of file AthAnalysisHelper.cxx.
|
inlinestatic |
helper method for adding a property to the JobOptionsSvc to list all the properties in the catalogue, do: AthAnalysisHelper::dumpJobOptionProperties()
Definition at line 50 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 231 of file AthAnalysisHelper.h.
|
inlinestatic |
Create a tool using the gaudi factory methods.
This creates tools that wont be known to the ToolSvc User is responsible for deleting the tool Parent is optional, allows your created tool to inherit OutputLevel properties from the parent If not parent specified, the ToolSvc will be used as the parent Please Note: The preferred method of creating tools is with a ToolHandle Usage: IMyTool* tool = AthAnalysisHelper::createTool<IMyTool>("ToolType/ToolName"); CHECK( AthAnalysisHelper::setProperty( tool, "Property", value ) ); CHECK( tool->initialize() ); Preferred: ToolHandle<IMyTool> tool("ToolType/ToolName"); CHECK( AthAnalysisHelper::setProperty( tool, "Property", value ) ); CHECK( tool.retrieve() );
Definition at line 204 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 225 of file AthAnalysisHelper.h.
|
static |
Dump the properties from joboptionsvc of clients with names beginning with given string.
If string is blank, will print all clients Example usage: athena -i myJobOptions.py athena> theApp.setup() athena> import ROOT athena> ROOT.AAH.dumpJobOptionProperties() This will display all the joboption properties declared at the start of your job
Definition at line 54 of file AthAnalysisHelper.cxx.
|
inlinestatic |
Definition at line 386 of file AthAnalysisHelper.h.
|
static |
Dump the properties of an IProperty.
Definition at line 98 of file AthAnalysisHelper.cxx.
|
inlinestatic |
Definition at line 378 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 367 of file AthAnalysisHelper.h.
|
static |
Definition at line 105 of file AthAnalysisHelper.cxx.
|
static |
Check catalogue for property of specified client returns AAH::UNDEFINED in case of no property value available (i.e.
component will take the default property value) otherwise returns the property value in its string representation
Definition at line 63 of file AthAnalysisHelper.cxx.
|
static |
initGaudi method starts the gaudi ApplicationMgr ready for working with all the components
Definition at line 21 of file AthAnalysisHelper.cxx.
|
static |
Print the aux variables of an xAOD object (aux element) An alternative to this method is the 'xAOD::dump' method.
Definition at line 69 of file AthAnalysisHelper.cxx.
|
inlinestatic |
method that always returns as a string you can use from, e.g, pyROOT with evt = ROOT.POOL.TEvent() ...
ROOT.AAH.retrieveMetadata("/Folder","key",evt.inputMetaStore())
Definition at line 254 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 260 of file AthAnalysisHelper.h.
|
inlinestatic |
retrieve metadata from the input metadata storegate.
Use 'meta-reader' to see the 'folder' and 'key' values available always takes the first CondAttrListCollection (aka IOV) and the first channel number present in that IOV
Definition at line 270 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 350 of file AthAnalysisHelper.h.
|
inlinestatic |
implemenation where you pass it a particular store instead
Definition at line 281 of file AthAnalysisHelper.h.
|
inlinestatic |
retrieve metadata, for a specified IOVTime and a specific channel, unless the channel is -1, in which case we take the first available channel channels have to be unsigned int, so can use -1 to signal 'take whatever first channel is (it isn't always 0)'
Definition at line 311 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 138 of file AthAnalysisHelper.h.
|
inlinestatic |
Partial template specialization for ToolHandles and ToolHandleArrays ... strips parent name from tool name, for setting private handles on.
Definition at line 131 of file AthAnalysisHelper.h.
|
inlinestatic |
helper method for setting a property on a tool before retrieving it uses the toolhandle to work out what to register the joboptionsvc Usage examples: ToolHandle<IMyTool> tool("MyTool/toolName"); CHECK( AthAnalysisHelper::setProperty( tool, "IntegerProperty", 5) ); CHECK( AthAnalysisHelper::setProperty( tool, "StringProperty", "hello") ); CHECK( AthAnalysisHelper::setProperty( tool, "StringArrayProperty", std::vector<std::string>({"a","b","c"}) ) ); CHECK( AthAnalysisHelper::setProperty( tool, "PublicToolHandleProperty", anotherToolHandle) ); CHECK( AthAnalysisHelper::setProperty( tool, "PrivateToolHandleName.SubToolIntegerProperty", 4) ); The last example assumes the 'MyTool' class has declared a ToolHandle("SubTool/PrivateToolHandleName",this) and 'SubTool' class has an integer property called 'SubToolIntegerProperty' declared
Definition at line 108 of file AthAnalysisHelper.h.
|
inlinestatic |
setProperty for services ... will allow setProperty on already-existing services
Definition at line 168 of file AthAnalysisHelper.h.
|
inlinestatic |
non-template method, for use in joboptions current usage would be: ...
usual joboptions ... theApp.setup() #triggers population of property catalogue import ROOT ROOT.AAH.setProperty( "ToolSvc.MyTool" , "Property" , str(value) )
Definition at line 89 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 79 of file AthAnalysisHelper.h.
|
inlinestatic |
setProperty on an alg, even when initialized
Definition at line 153 of file AthAnalysisHelper.h.
|
inlinestatic |
setProperty on any tool, even when initialized
Definition at line 143 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 246 of file AthAnalysisHelper.h.
|
static |
check if tool already exists. FullName = Parent.Name
Definition at line 43 of file AthAnalysisHelper.cxx.
|
inlinestatic |
Definition at line 164 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 163 of file AthAnalysisHelper.h.
|
inlinestatic |
Definition at line 162 of file AthAnalysisHelper.h.
|
static |
Definition at line 42 of file AthAnalysisHelper.h.