|
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;
89 return StatusCode::FAILURE;
93 return StatusCode::SUCCESS;
103 return StatusCode::FAILURE;
110 return StatusCode::SUCCESS;
116 for(
const std::string& stringItem :
m_itemList ) {
119 static const std::regex itemRegex(
"([^#]+)#([^\\.]+\\.?)(.*)" );
120 std::smatch itemMatch;
121 if( ! std::regex_match( stringItem, itemMatch, itemRegex ) ) {
123 <<
"\" is not of the form: \"Type#Name\"" );
124 return StatusCode::FAILURE;
127 << itemMatch[ 2 ] << itemMatch[ 3 ] );
132 for(
const auto&
sys : sysVector ) {
141 if( itemMatch[ 3 ] !=
"" ) {
143 <<
", \"" << itemMatch[ 3 ]
151 TClass*
cl = TClass::GetClass( itemMatch[ 1 ].
str().c_str() );
153 ATH_MSG_FATAL(
"Type \"" << itemMatch[ 1 ] <<
"\" not found" );
154 return StatusCode::FAILURE;
156 item.type =
cl->GetTypeInfo();
159 << itemMatch[ 1 ] <<
"\"" );
160 return StatusCode::FAILURE;
165 static const bool SILENT =
true;
166 static const bool METADATA =
false;
168 if(
event->getOutputObject(
item.name, *(
item.type ), METADATA ) ||
173 <<
key <<
"\" for writing" );
178 if(
key == itemMatch[ 2 ] ) {
185 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.
Gaudi::Property< int > m_basketSize
(Starter) Basket size for the created branches
@ 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.
Gaudi::Property< int > m_splitLevel
Split level for the created branches.
::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...
StatusCode record(T *obj, const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=0)
Add an output object to the event.
::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.
StatusCode writeTo(::TFile *file, Int_t autoFlush=200, const char *treeName=EVENT_TREE_NAME)
Connect the object to an output file.
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.