13#include <TApplication.h>
26 const char* message );
31 StatusCode
Init(
const char* appname ) {
33 return Init( appname, 0, 0 );
36 StatusCode
Init(
const char* appname,
int* argc,
char** argv ) {
41 if( ! sInitialised.test_and_set() ) {
44 ::SetErrorHandler( ErrorHandler );
52 static ::TApplication sApplication( appname, argc, argv );
54 ::TApplication::CreateApplication();
61 for (
const char *
name : {
62 "xAOD::TruthParticle_v1",
64 "xAOD::CaloCluster_v1",
65 "xAOD::TrackParticle_v1",
71 "xAOD::TrigElectron_v1",
72 "xAOD::L2CombinedMuon_v1",
73 "xAOD::Particle_v1"}) {
76 static constexpr Bool_t LOAD = kTRUE;
77 static constexpr Bool_t SILENT = kTRUE;
78 TClass::GetClass(
name, LOAD, SILENT );
82 ::Info( appname,
"Environment initialised for data access" );
86 return StatusCode::SUCCESS;
106 const char* message ) {
109 if( level < gErrorIgnoreLevel ) {
114 static const char*
const DICT_WARNING_SOURCE =
"TClass::Init";
119 if( ( level == kWarning ) &&
120 ( ! strcmp( location, DICT_WARNING_SOURCE ) ) ) {
125 const char* msgLevel = 0;
126 if( level >= kFatal ) {
128 }
else if( level >= kError ) {
130 }
else if( level >= kWarning ) {
131 msgLevel =
"WARNING";
138 std::string source( location );
145 std::ostringstream output;
146 output << std::setiosflags( std::ios::left )
149 std::cout << output.str() << std::endl;
157 std::cout << std::endl <<
"Aborting..." << std::endl;
159 gSystem->StackTrace();
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
static std::atomic< size_t > sMessageSourceWidth
Width of the message source strings.
void SetMessageSourceWidth(size_t value)
Set the width of the source strings for the printed messages.
void ClearTransientTrees ATLAS_NOT_THREAD_SAFE()
Function cleaning up the managed memory.