 |
ATLAS Offline Software
|
Go to the documentation of this file.
35 return StatusCode::FAILURE;
45 return StatusCode::SUCCESS;
63 static const bool SILENT =
true;
64 static const bool METADATA =
false;
65 const void*
obj =
event->getOutputObject(
item.name, *(
item.type ),
78 return StatusCode::FAILURE;
82 static constexpr
bool OVERWRITE =
false;
83 static constexpr
bool IS_OWNER =
true;
85 item.name, OVERWRITE, METADATA, IS_OWNER ) );
91 return StatusCode::FAILURE;
95 return StatusCode::SUCCESS;
105 return StatusCode::FAILURE;
112 return StatusCode::SUCCESS;
118 for(
const std::string& stringItem :
m_itemList ) {
121 static const std::regex itemRegex(
"([^#]+)#([^\\.]+\\.?)(.*)" );
122 std::smatch itemMatch;
123 if( ! std::regex_match( stringItem, itemMatch, itemRegex ) ) {
125 <<
"\" is not of the form: \"Type#Name\"" );
126 return StatusCode::FAILURE;
129 << itemMatch[ 2 ] << itemMatch[ 3 ] );
134 for(
const auto&
sys : sysVector ) {
143 if( itemMatch[ 3 ] !=
"" ) {
145 <<
", \"" << itemMatch[ 3 ]
153 TClass*
cl = TClass::GetClass( itemMatch[ 1 ].
str().c_str() );
155 ATH_MSG_FATAL(
"Type \"" << itemMatch[ 1 ] <<
"\" not found" );
156 return StatusCode::FAILURE;
158 item.type =
cl->GetTypeInfo();
161 << itemMatch[ 1 ] <<
"\"" );
162 return StatusCode::FAILURE;
167 static const bool SILENT =
true;
168 static const bool METADATA =
false;
170 if(
event->getOutputObject(
item.name, *(
item.type ), METADATA ) ||
175 <<
key <<
"\" for writing" );
180 if(
key == itemMatch[ 2 ] ) {
187 return StatusCode::SUCCESS;
StatusCode finishWritingTo(::TFile *file)
Finish writing to an output file.
StatusCode setup()
Function setting up the algorithm while processing the first event.
StatusCode initialize() override
Function initialising the algorithm.
std::vector< Item > m_writtenItemList
Item list being written after the first event.
StatusCode record(void *obj, const std::string &typeName, const std::string &key, bool overwrite, bool metadata, bool isOwner) override
Record an object into a connected output file.
@ SILENT
don't print anything and return success
std::string normalizedTypeinfoName(const std::type_info &info)
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
bool m_itemListInitialized
Internal flag.
xAOD::TEvent m_event
Object to write the output file with.
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
#define ATH_MSG_VERBOSE(x)
Select isolated Photons, Electrons and Muons.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
::StatusCode initialize()
intialize this property
POOL::TEvent event(POOL::TEvent::kClassAccess)
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::string > m_outputStreamName
Name of the output stream to write to.
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
::Int_t fill()
Function filling one event into the output tree.
virtual StatusCode makeSystematicsName(std::string &result, const std::string &name, const CP::SystematicSet &sys) const =0
make the name for the given systematics
SysListHandle m_systematicsList
The systematic list to consider during execution.
StatusCode execute() override
Function executing the algorithm.
void setAuxItemList(const std::string &containerKey, const std::string &itemList)
Configure which dynamic variables to write out for a given store.
Gaudi::Property< std::vector< std::string > > m_itemList
Item list to write to the output file.
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
StatusCode finalize() override
Function finalising the algorithm.
const ISystematicsSvc & service() const
the service we use
Tool for accessing xAOD files outside of Athena.
StatusCode writeTo(::TFile *file, int autoFlush=200, std::string_view treeName=EVENT_TREE_NAME)
Connect the object to an output file.