|
ATLAS Offline Software
|
Go to the documentation of this file.
19 #define __STDC_FORMAT_MACROS
28 #include "Gaudi/Property.h"
43 ISvcLocator* pSvcLocator ) :
61 "Name of the ascii file where the content of the "
62 "ROOT n-tuple file will be dumped.");
66 "handle to the run-nbr in event (read)");
70 "handle to the evt-nbr in event (read)");
74 "handle to the nbr of electrons in event (read)");
78 "handle to the eta of electrons in event (read)");
82 "handle to the jetcone-dR of electrons in event (read)");
111 return StatusCode::FAILURE;
114 O_WRONLY | O_CREAT | O_TRUNC,
115 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
119 "write permissions.");
120 return StatusCode::FAILURE;
123 return StatusCode::SUCCESS;
132 if (close(
m_ofd) < 0) {
137 return StatusCode::SUCCESS;
150 return StatusCode::RECOVERABLE;
156 return StatusCode::RECOVERABLE;
162 return StatusCode::RECOVERABLE;
168 std::string collName = collectionName(*ei);
169 std::string::size_type
pos = collName.rfind (
"/");
170 if (
pos != std::string::npos) {
171 collName.erase (0,
pos+1);
176 int buf_sz = asprintf
178 "%03" PRId64
".%s = %s\n"
179 "%03" PRId64
".%s = %s\n"
180 "%03" PRId64
".%s = %u\n"
181 "%03" PRId64
".%s = %u\n"
182 "%03" PRId64
".%s = %i\n",
188 tupleName(*ei).c_str(),
206 return StatusCode::RECOVERABLE;
212 return StatusCode::RECOVERABLE;
216 std::stringstream bufv;
217 for (int32_t ii = 0; ii < *
m_el_n; ++ii) {
218 bufv << (*m_el_eta)[ii];
224 int buf_sz = asprintf
226 "%03" PRId64
".%s = [%s]\n",
236 std::stringstream bufv;
237 for (int32_t ii = 0; ii < *
m_el_n; ++ii) {
242 bufv << (*m_el_jetcone_dr)[ii][jj];
253 int buf_sz = asprintf
255 "%03" PRId64
".%s = [%s]\n",
264 return StatusCode::SUCCESS;
SG::ReadHandleKey< xAOD::EventInfo > m_eiKey
int m_ofd
file handle to the ASCII output file
Helper class to provide type-safe access to aux data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::RVar< uint32_t > m_evtnbr
event number
SG::RVar< std::vector< float > > m_el_eta
eta of electrons
std::string m_ofname
ASCII output file name.
virtual StatusCode finalize()
SG::RVar< int32_t > m_el_n
number of electrons
a smart pointer to an object of a given type in an IProxyDict (such as StoreGateSvc)....
SG::RVar< std::vector< std::vector< float > > > m_el_jetcone_dr
jetcone dR
Some weak symbol referencing magic...
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize()
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
RootAsciiDumperAlgHandle()
Default constructor:
uint64_t m_nentries
number of entries processed so-far
SG::RVar< uint32_t > m_runnbr
run number
virtual StatusCode execute()
virtual ~RootAsciiDumperAlgHandle()
Destructor:
#define ATH_MSG_WARNING(x)