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