ATLAS Offline Software
Loading...
Searching...
No Matches
AANTupleStream.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
7
9
11
12#include "Gaudi/Interfaces/IOptionsSvc.h"
13#include "GaudiKernel/IAlgManager.h"
14#include "GaudiKernel/ISvcLocator.h"
15#include "GaudiKernel/IAddressCreator.h"
16#include "GaudiKernel/IOpaqueAddress.h"
17#include "GaudiKernel/MsgStream.h"
18#include "GaudiKernel/ITHistSvc.h"
19#include "GaudiKernel/TypeNameString.h"
20#include "GaudiKernel/ServiceHandle.h"
21#include "GaudiKernel/IIoComponentMgr.h"
22
24#include "SGTools/DataProxy.h"
26
28#include "CoralBase/AttributeList.h"
29#include "CoralBase/AttributeListSpecification.h"
30
31#include "EventInfo/EventInfo.h"
32#include "EventInfo/EventID.h"
34
35#include "TFile.h"
36#include "TTree.h"
37#include "TText.h"
38#include "TBranch.h"
39#include "TInterpreter.h"
40
41#include <map>
42#include <string>
43#include <algorithm>
44
45using namespace AANTupleParams;
46
47// Standard Constructor
48AANTupleStream::AANTupleStream(const std::string& name, ISvcLocator* pSvcLocator)
49 : AthLegacySequence(name, pSvcLocator),
50 m_persSvc ("EventPersistencySvc", name),
51 m_attribSpec(0),
52 m_schemaDone(false),
53 m_tree(0),
55 m_tHistSvc ("THistSvc", name)
56{
57 declareProperty("OutputName", m_fileName="AANTuple.root");
58 declareProperty("ExtraRefNames", m_extraRefNames);
59 declareProperty("WriteInputDataHeader", m_writeInputDH=false);
60 declareProperty("ExistDataHeader", m_existDH=true);
62 declareProperty("LateSchemaWriting", m_lateSchema=false);
64 declareProperty("Macro", m_macro="");
66 declareProperty("FilterAlgs", m_acceptNames);
67
68 m_tokenCString[0] = '\0';
69}
70
71
72// Standard Destructor
76
77
78// initialize data writer
80{
81 ATH_MSG_DEBUG ("In initialize ");
82 // register with the I/O component manager
83 {
84 ServiceHandle<IIoComponentMgr> iomgr ("IoComponentMgr", this->name());
85 ATH_CHECK( iomgr.retrieve() );
86 ATH_CHECK( iomgr->io_register (this) );
87
88 if ( !iomgr->io_register (this,
89 IIoComponentMgr::IoMode::WRITE,
90 m_fileName).isSuccess() ) {
91 ATH_MSG_ERROR ("Could not register [" << this->name() << "]["
92 << m_fileName << "] with the I/O component manager !");
93 return StatusCode::FAILURE;
94 }
95 }
96
97 // StoreGateSvc
98 ATH_CHECK( evtStore().retrieve() );
99
100 // set up the persistency service:
101 ATH_CHECK( m_persSvc.retrieve() );
102
103 // instantiate AttrListSpec and add attributes for Run# and Event#
104 m_attribSpec = new coral::AttributeListSpecification;
105 m_attribSpec->extend( name_RunNumber, "unsigned int" );
106 m_attribSpec->extend( name_EventNumber, "unsigned int" );
107
108 // Add on specification for extra refs
109 for (const std::string& ref : m_extraRefNames.value())
110 {
111 // Append _ref to name of attribute
112 m_attribSpec->extend(ref + "_ref", "string");
113 }
114
115 if (!m_lateSchema) {
117 }
118
119 // initialize sub-algos
121
122 // get filters
124
125 ATH_MSG_DEBUG ("End initialize ");
126
127 return AthLegacySequence::initialize();
128}
129
130
131// initialize output collection
133{
134 // write schema
136
137 // setup TTree
138 setupTree();
139
140 // setup Token
141 m_tokenBranch = m_tree->GetBranch(c_tokenBranchName);
142 m_tokenBranch->SetAddress(m_tokenCString);
143
144 return StatusCode::SUCCESS;
145}
146
147
148// terminate data writer
150{
151 ATH_MSG_INFO ("finalize");
152
153 // exec macro
154 if (m_macro != "")
155 {
156 // save current dir
157 std::string curDir = gDirectory->GetPath();
158 // go to the root dir of output file
159 gDirectory->cd((m_fileName+":/").c_str());
160 // exec
161 // G__exec_tempfile(m_macro.c_str());
162 // MN: that should be the equivalent new call:
163 gInterpreter->ExecuteMacro(m_macro.c_str());
164 // back to the current dir
165 gDirectory->cd(curDir.c_str());
166 }
167
168 return AthLegacySequence::finalize();
169}
170
171
172// Work entry point
174{
175 StatusCode sc;
176
177 if (!m_schemaDone) {
178 sc = initSchema();
179 if (sc.isFailure())
180 return sc;
181 }
182
183 // execute sub-algos
185 if ( sc.isFailure() )
186 {
187 ATH_MSG_ERROR ("Could not execute sub-algos");
188 return sc;
189 }
190
191 std::map<std::string,std::string> inputRefs;
192 std::string ref;
193
194 // Get tokens specified by item list
195 if (m_existDH)
196 {
197 // get token
200 StatusCode status = evtStore()->retrieve(beg,ending);
201 if (status.isFailure() || beg==ending)
202 {
203 ATH_MSG_WARNING ("No DataHeaders present in StoreGate");
204 return StatusCode::FAILURE;
205 }
206
207 // look for header
208 for (; beg != ending; ++beg)
209 if (m_writeInputDH == beg->isInput()) break;
210
211 if (beg==ending)
212 {
213 ATH_MSG_WARNING ("No appropriate DataHeader present in StoreGate");
214 return StatusCode::FAILURE;
215 }
216
217 // get the ref
218 while (getRef(ClassID_traits<DataHeader>::ID(), beg.key(), ref) == StatusCode::FAILURE)
219 {
220 ++beg;
221 if (beg==ending)
222 {
223 ATH_MSG_ERROR ("No refs found");
224 return StatusCode::FAILURE;
225 }
226 }
227
228 ATH_MSG_DEBUG ("Found token: Key=" << beg.key() << ", Ref=" << ref);
229
230 // Get a single input header ref if requested
231 const DataHeader* hdr = &(*beg);
232 if (hdr->sizeProvenance())
233 {
234 std::vector<DataHeaderElement>::const_iterator it =
235 (const_cast<DataHeader*>(hdr)->beginProvenance());
236 std::vector<DataHeaderElement>::const_iterator itE =
237 (const_cast<DataHeader*>(hdr)->endProvenance());
238 // grab refs for those
239 for (; it!=itE; ++it)
240 {
241 std::string tmpRef = (*it).getToken() != NULL
242 ? (*it).getToken()->toString()
243 : "";
244 inputRefs.insert(std::make_pair(it->getKey(),tmpRef));
245 ATH_MSG_DEBUG ("Found ref for input header: Key=" << it->getKey()
246 << ", Ref=" << tmpRef);
247 }
248 }
249 }
250
251 // create Attrlist, add attributes and if extra ref is requested, append to the end
252
253 ATH_MSG_DEBUG ("create AttributeList");
254 // AthenaAttributeList newAttr(*m_attribSpec);
255 coral::AttributeList newAttr(*m_attribSpec);
256
257 unsigned int runNumber = 0;
258 unsigned int eventNumber = 0;
259
260 // retrieve event info
261 const EventInfo* eventInfo;
262 eventInfo = evtStore()->tryConstRetrieve<EventInfo>();
263 if ( !eventInfo )
264 {
265 // Try to get the xAOD::EventInfo
266 const xAOD::EventInfo* eventInfoX{nullptr};
267 ATH_CHECK( evtStore()->retrieve(eventInfoX) );
268 runNumber = eventInfoX->runNumber();
269 eventNumber = eventInfoX->eventNumber();
270 }
271 else
272 {
273 runNumber = eventInfo->event_ID()->run_number();
274 eventNumber = eventInfo->event_ID()->event_number();
275 }
276
277 // add global event tag data
278 newAttr[ name_RunNumber ].setValue( runNumber );
279 newAttr[ name_EventNumber ].setValue( eventNumber );
280
281 // add back nav ref's
282 ATH_MSG_DEBUG ("Append extra ref");
283 std::vector<std::string> extraRefs = m_extraRefNames.value();
284 std::map<std::string,std::string>::iterator itRef = inputRefs.begin();
285 std::map<std::string,std::string>::iterator itRefE = inputRefs.end();
286 for (; itRef != itRefE; ++itRef)
287 {
288 std::string name = itRef->first + "_ref";
289 if (extraRefs.end() != std::find(extraRefs.begin(),extraRefs.end(),itRef->first))
290 {
291 newAttr[name].setValue(std::string(itRef->second));
292 ATH_MSG_DEBUG (" Added extra ref to new attribute list - name: "
293 << name << " " << itRef->second);
294 }
295 }
296
297 // write if filters passed
298 if (isEventAccepted())
299 {
300 ATH_MSG_DEBUG ("write attributes to collection");
301
302 // write token plus attributes
303 try
304 {
305 writeTokenAttrList(ref, newAttr);
306 }
307 catch (std::exception &e)
308 {
310 ("Caught exception from collection add of Pool attributes. "
311 "Message: " << e.what());
312 return StatusCode::FAILURE;
313 }
314 }
315
316 ATH_MSG_DEBUG ("done successfully");
317
318 return StatusCode::SUCCESS;
319}
320
321
323{
324 // go to the root dir of output file
325 TDirectory::TContext save;
326 gDirectory->cd((m_fileName+":/").c_str());
327
329 // store schema in the schema object
330 for( coral::AttributeListSpecification::const_iterator iter = m_attribSpec->begin();
331 iter != m_attribSpec->end(); ++iter) {
332 all.m_layout.push_back( make_pair( iter->name(), iter->typeName() ) );
333 }
334 // write schema object
335 all.Write(c_attributeListLayoutName);
336}
337
338
340{
341 static const std::map<std::string,char> typeDict = {
342 {"double", 'D'},
343 {"long double", 'D'}, // only 64 bit doubles are supported
344 {"float", 'F'},
345 {"int", 'i'},
346 {"unsigned int", 'I'},
347 {"long", 'i'}, // support for 64 bit integers introduced with ROOT 4.00/08
348 {"unsigned long", 'I'}, // support for 64 bit integers introduced with ROOT 4.00/08
349 {"short", 's'},
350 {"unsigned short", 'S'},
351 {"char", 'b'}, // AttributeLists's "get_root_type_char(...)" returned 'C' ???
352 {"unsigned char", 'B'}, // AttributeLists's "get_root_type_char(...)" returned 's' ???
353 {"bool", 'B'}, // AttributeLists's "get_root_type_char(...)" returned 'i' ???
354 {"string", 'C'},
355 {"Token", 'C'}
356 };
357
358 // go to the root dir of output file
359 TDirectory::TContext save;
360 gDirectory->cd((m_fileName+":/").c_str());
361
362 // instantiate TTree
363 m_tree = new TTree(m_treeName.c_str(), m_treeName.c_str());
364
365 // add branches for attributes
366 for(coral::AttributeListSpecification::const_iterator iter=m_attribSpec->begin(); iter!=m_attribSpec->end(); ++iter)
367 {
368 std::string type = "/?";
369 type[1] = typeDict.at(iter->typeName());
370 std::string leaflist = iter->name() + type;
371 m_tree->Branch(iter->name().c_str(),0,leaflist.c_str());
372 }
373
374 // add Token branch
375 std::string leaflist = c_tokenBranchName;
376 leaflist += "/C";
377 m_tree->Branch(c_tokenBranchName,0,leaflist.c_str());
378
379 // set TTree
381}
382
383
384// Get the string form of a ref for a given clid and key
385StatusCode AANTupleStream::getRef(CLID id, const std::string& key, std::string& ref)
386{
387 // Must access the SG proxy to get the IOpaqueAddress
388 SG::DataProxy* itemProxy = 0;
389 ATH_MSG_DEBUG ("Retrieving proxy for " << id << " " << key);
390 itemProxy = evtStore()->proxy(id, key);
391 if (!itemProxy)
392 {
393 ATH_MSG_ERROR ("Could not get proxy ");
394 return(StatusCode::FAILURE);
395 }
396 else
397 {
398 ATH_MSG_DEBUG (" found proxy for ("<< id << ",\"" << key << "\") ");
399 }
400
401 if (!itemProxy)
402 {
403 ATH_MSG_ERROR ("Empty proxy ");
404 return(StatusCode::FAILURE);
405 }
406
407 // Get IOpaqueAddress from the proxy
408 IOpaqueAddress* addr = itemProxy->address();
409 if (!addr)
410 {
411 ATH_MSG_DEBUG ("Could not get address for clid "
412 << itemProxy->clID() << " " << itemProxy->name());
413 return( StatusCode::FAILURE);
414 }
415
416 // Convert IOpaqueAddress to string via the persistency
417 // service. And then remove header to extract the token.
418 std::string saddr;
419
420 StatusCode sc = m_persSvc->convertAddress(addr, saddr);
421 if (sc.isFailure())
422 {
424 ("Could not get string from IOpaqueAddress for clid " << id
425 << " " << key
426 << " is BAD_STORAGE_TYPE: "<< (sc == IConversionSvc::Status::BAD_STORAGE_TYPE));
427 return( StatusCode::FAILURE);
428 }
429
430
431 // We assume here some knowledge of the form of the AthenaPool
432 // string address
433 std::string hdr;
434 sc = splitAddress(saddr, " /> ", hdr, ref);
435 if (sc.isFailure())
436 {
437 ATH_MSG_ERROR ("Could not get split off token. string address " << saddr);
438 return( StatusCode::FAILURE);
439 }
440
441 ATH_MSG_DEBUG ("String address " << ref);
442
443 return StatusCode::SUCCESS;
444}
445
446
447// Extract the address header and data from an IOpaqueAddress in
448// string form
449StatusCode AANTupleStream::splitAddress( const std::string& address,
450 const std::string& match,
451 std::string& address_header,
452 std::string& address_data ) const
453{
454 ATH_MSG_DEBUG ("splitAddress " << endmsg
455 << " address : " << address
456 << " match : " << match);
457
458 std::string::size_type p1;
459
460 p1 = address.find( match );
461 if (p1 != std::string::npos)
462 {
463 address_header = address.substr( 0, p1+match.size());
464
465 address_data = address.substr( p1+match.size() );
466 }
467 else
468 {
469 return StatusCode::FAILURE;
470 }
471
472 ATH_MSG_DEBUG (" address_header : " << address_header
473 << endmsg
474 << " address_data : " << address_data);
475
476 return StatusCode::SUCCESS;
477}
478
479
480// write Token and Attributes to the output collection
481bool AANTupleStream::writeTokenAttrList( const std::string& token, const coral::AttributeList& attributeList )
482{
483 // set addresses for attributes
484 coral::AttributeList::const_iterator attIter = attributeList.begin();
485 const TObjArray* branches = m_tree->GetListOfBranches();
486 std::vector<std::string> tokenStringDump;
487 // loop over all attributes
488 for (unsigned int i=0; i<attributeList.size(); ++i)
489 {
490 TBranch* branch = (TBranch*)branches->UncheckedAt(i);
491 // string attributes
492 if (attIter->specification().type() == typeid(std::string))
493 {
494 const std::string& str = attIter->data<std::string>();
495 if( str.length()+1 >= s_maxLengthOfStrings )
496 {
497 throw std::runtime_error("String is too long : RootCollection::pool2Root<std::string>");
498 }
499 branch->SetAddress( (void*)str.c_str() );
500 }
501 // Token
502 else if(attIter->specification().typeName() == "Token")
503 {
504 tokenStringDump.push_back( attIter->data<std::string>() );
505 branch->SetAddress( (void*) tokenStringDump.back().c_str() );
506 }
507 // else
508 else
509 {
510 branch->SetAddress( (void*)attIter->addressOfData() );
511 }
512 ++attIter;
513 }
514
515 // set address for Token
516 m_tokenBranch->SetAddress((void*)token.c_str());
517
518 // fill TTree
519 m_tree->Fill();
520
521 // releases Token
522 m_tokenBranch->SetAddress(m_tokenCString);
523
524 return true;
525}
526
527
528// initialize sub-algos
530{
531 StatusCode sc = StatusCode::SUCCESS;
532
533 Algorithm* algo;
534 for (const std::string& name : m_membersNames)
535 {
536 // Parse the name for a syntax of the form:
537 //
538 // <type>/<name>
539 //
540 // Where <name> is the algorithm instance name, and <type> is the
541 // algorithm class type (being a subclass of Algorithm).
542 Gaudi::Utils::TypeNameString tn(name);
543
544 // create sub-algorithm
545 ATH_MSG_INFO (" -> creating sub-algorithm " << name);
546 sc = createSubAlgorithm( tn.type(), tn.name(), algo );
547 if (sc.isFailure())
548 {
549 ATH_MSG_FATAL (" ERROR creating sub-alg." << name);
550 return StatusCode::FAILURE;
551 }
552 }
553
554 return sc;
555}
556
557
558// execute sub-algos
560{
561 StatusCode sc = StatusCode::SUCCESS;
562
563 ATH_MSG_DEBUG ("in execute_subAlgos() ...");
564
565 const EventContext& ctx = Gaudi::Hive::currentContext();
566
567 // -- run subalgorithms
568 for ( unsigned int i=0; i < m_membersNames.size(); ++i )
569 {
570 ATH_MSG_DEBUG (" -> calling sub-algorithm " << m_membersNames[i]);
571 // skip disabled algo
572 if (! (*(this->subAlgorithms()))[i]->isEnabled()) continue ;
573
574 sc = (*(this->subAlgorithms()))[i]->execute(ctx);
575 if ( sc.isFailure())
576 {
578 (" ERROR executing sub-algorithm:" << m_membersNames[i]);
579 return StatusCode::FAILURE;
580 }
581 }
582 return sc;
583}
584
585
586// get filters
588{
589 ATH_MSG_DEBUG ("in getFilters()");
590
591 // no filter
592 if (m_acceptNames.empty())
593 return StatusCode::SUCCESS;
594
595 ServiceHandle<IAlgManager> theAlgMgr("ApplicationMgr", this->name());
596 ATH_CHECK( theAlgMgr.retrieve() );
597
598 // loop over all alg names
599 for (const std::string& name : m_acceptNames)
600 {
601 SmartIF<IAlgorithm> ialg{theAlgMgr->algorithm(name)};
602 if (!ialg )
603 {
604 ATH_MSG_ERROR ("Can't get Filter Alg : " << name);
605 return StatusCode::FAILURE;
606 }
607 ATH_MSG_DEBUG (" -> getting Filter Alg success " << name);
608 // push back
609 m_acceptAlgs.push_back(ialg);
610 }
611 return StatusCode::SUCCESS;
612}
613
614
615// Loop over all Algorithms in the accept list to see
616// whether any have been executed and have their filter
617// passed flag set. Any match causes the event to be
618// provisionally accepted.
620{
621 // no filter
622 if (m_acceptAlgs.empty())
623 return true;
624
625 const EventContext& ctx = Gaudi::Hive::currentContext();
626
627 // loop over all algs
628 for (const IAlgorithm* alg : m_acceptAlgs)
629 {
630 if ( alg->execState(ctx).state() == AlgExecState::State::Done &&
631 ( ! alg->execState(ctx).filterPassed() ) )
632 return false;
633 }
634
635 return true;
636}
637
638StatusCode
640{
641 m_schemaDone = true;
642
643 ATH_CHECK( m_tHistSvc.retrieve() );
644
645 // initialize output collection
647
648 // register TTree to THistSvc
649 ATH_CHECK( m_tHistSvc->regTree("/"+m_streamName+"/"+m_treeName, m_tree) );
650
652 m_tree->Print();
653
654 return StatusCode::SUCCESS;
655}
656
657StatusCode
659{
660 ServiceHandle<IIoComponentMgr> iomgr ("IoComponentMgr", this->name());
661 ATH_CHECK( iomgr.retrieve() );
662
663 ServiceHandle<Gaudi::Interfaces::IOptionsSvc> josvc ("JobOptionsSvc", this->name());
664 ATH_CHECK( josvc.retrieve() );
665
666 // check the I/O manager knows about me
667 if ( !iomgr->io_hasitem (this) ) {
668 ATH_MSG_ERROR ("I/O component mgr does not know about ourselves !");
669 return StatusCode::FAILURE;
670 }
671
672 // check there is actually something to do...
673 if ( !iomgr->io_contains (this, m_fileName) ) {
675 ("I/O component mgr does not have any entry about ["<< m_fileName<<"]");
676 return StatusCode::SUCCESS;
677 }
678
679 if ( !iomgr->io_retrieve (this, m_fileName).isSuccess() ) {
680 ATH_MSG_ERROR ("Could not retrieve new name for [" << m_fileName << "] !");
681 return StatusCode::FAILURE;
682 }
683
684 // recreate the proper property value...
685 std::vector<std::string> outvec = {"AANT DATAFILE='" + m_fileName + "' OPT='RECREATE'"};
686 josvc->set("THistSvc.Output", Gaudi::Utils::toString(outvec));
687
688 // handle schema...
689 if (!m_schemaDone) {
690 if ( !initSchema().isSuccess() ) {
691 ATH_MSG_ERROR ("Could not initialize schema !");
692 }
693 }
694
695 return StatusCode::SUCCESS;
696}
const boost::regex ref(r_ef)
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
This file contains the class definition for the DataHeader and DataHeaderElement classes.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
uint32_t CLID
The Class ID type.
static Double_t sc
static void setTree(const std::string &stream, TTree *tree)
Definition AANTTreeMap.h:18
void setupTree()
setup Tree
std::string m_treeName
Name of the output tree.
BooleanProperty m_lateSchema
write schema in execute()
virtual StatusCode execute()
Working entry point.
std::vector< std::string > m_membersNames
std::string m_macro
macro
AANTupleStream(const std::string &name, ISvcLocator *pSvcLocator)
Standard AANTupleStream Constructor.
virtual ~AANTupleStream()
Standard Destructor.
StatusCode io_reinit()
callback method to reinitialize the internal state of the component for I/O purposes (e....
StatusCode initCollection()
Initialize the output collection.
virtual StatusCode initialize()
Initialize AANTupleStream.
bool writeTokenAttrList(const std::string &token, const coral::AttributeList &attributeList)
write Token and AttributeList
bool m_schemaDone
first event
StatusCode getFilters()
get filter alogs
ServiceHandle< IAddressCreator > m_persSvc
Persistency service.
StatusCode splitAddress(const std::string &address, const std::string &match, std::string &address_header, std::string &address_data) const
Split the address to get pool token.
std::vector< IAlgorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
BooleanProperty m_writeInputDH
Flag to signal whether or not to write input data header.
StatusCode initialize_subAlgos()
initialize sub-algos
TBranch * m_tokenBranch
TBranch which contains Token info.
char m_tokenCString[s_maxLengthOfStrings]
StringArrayProperty m_extraRefNames
Vector of extra parent ref names to register in collection.
static const unsigned int s_maxLengthOfStrings
for string branches
std::vector< std::string > m_acceptNames
Vector of names of Algorithms that this stream accepts.
coral::AttributeListSpecification * m_attribSpec
Collection attribute specification.
BooleanProperty m_existDH
Flag to signal whether data header exists.
StatusCode execute_subAlgos()
execute sub-algos
std::string m_fileName
Name of the output collection.
virtual StatusCode finalize()
Terminate AANTupleStream.
StatusCode getRef(CLID id, const std::string &key, std::string &ref)
Get ref from a proxy.
ServiceHandle< ITHistSvc > m_tHistSvc
THistSvc.
std::string m_streamName
Name of Stream.
StatusCode initSchema()
TTree * m_tree
TTree.
bool isEventAccepted() const
check filters passed
void writeAttributeListSpecification()
write schema of AttributeList
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Alias for backward compatibility.
This class provides the layout for summary information stored for data written to POOL.
Definition DataHeader.h:123
int sizeProvenance() const
std::vector< DataHeaderElement >::const_iterator beginProvenance() const
std::vector< DataHeaderElement >::const_iterator endProvenance() const
EventID * event_ID()
the unique identification of the event.
a const_iterator facade to DataHandle.
Definition SGIterator.h:164
CLID clID() const
Retrieve clid.
virtual const name_type & name() const override final
Retrieve data object key == string.
virtual IOpaqueAddress * address() const override final
Retrieve IOpaqueAddress.
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:357
static const std::string c_streamName
static const std::string c_treeName
EventInfo_v1 EventInfo
Definition of the latest event info version.