|
ATLAS Offline Software
|
Class implementing the GAUDI IEvtSelector
interface using ROOT TTree
as a backend.
More...
#include <xAODEventSelector.h>
|
| xAODEventSelector (const std::string &name, ISvcLocator *svcLoc) |
| Constructor with parameters: More...
|
|
virtual | ~xAODEventSelector () |
| Destructor: More...
|
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual void | handle (const Incident &incident) override |
|
virtual StatusCode | io_reinit () override |
| Callback method to reinitialize the internal state of the component for I/O purposes (e.g. More...
|
|
virtual int | size (Context &refCtxt) const override |
| ICollectionSize interface More...
|
|
|
virtual StatusCode | createContext (Context *&refpCtxt) const override |
|
virtual StatusCode | last (Context &refContext) const override |
|
virtual StatusCode | next (Context &refCtxt) const override |
|
virtual StatusCode | next (Context &refCtxt, int jump) const override |
|
virtual StatusCode | previous (Context &refCtxt) const override |
|
virtual StatusCode | previous (Context &refCtxt, int jump) const override |
|
virtual StatusCode | rewind (Context &refCtxt) const override |
|
virtual StatusCode | createAddress (const Context &refCtxt, IOpaqueAddress *&) const override |
|
virtual StatusCode | releaseContext (Context *&refCtxt) const override |
|
virtual StatusCode | resetCriteria (const std::string &cr, Context &ctx) const override |
|
|
virtual StatusCode | seek (Context &refCtxt, int evtnum) const override |
| Seek to a given event number. More...
|
|
virtual int | curEvent (const Context &refCtxt) const override |
| return the current event number. More...
|
|
|
virtual StatusCode | preLoadAddresses (StoreID::type storeID, tadList &list) override |
|
virtual StatusCode | loadAddresses (StoreID::type storeID, tadList &list) override |
| get all new addresses from Provider for this Event. More...
|
|
virtual StatusCode | updateAddress (StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override |
| update a transient Address More...
|
|
Class implementing the GAUDI IEvtSelector
interface using ROOT TTree
as a backend.
Definition at line 47 of file xAODEventSelector.h.
◆ xAODEventSelector()
Athena::xAODEventSelector::xAODEventSelector |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
Constructor with parameters:
Definition at line 109 of file xAODEventSelector.cxx.
111 base_class (
name, svcLoc ),
132 declareProperty(
"SkipEvents",
m_skipEvts = 0,
"Number of events to skip at the beginning" );
133 declareProperty(
"AccessMode",
m_accessMode = -1,
"-1 = use TEvent Default; 0 = BranchAccess; 1 = ClassAccess; 2 = AthenaAccess" );
135 declareProperty(
"FillEventInfo",
m_fillEventInfo=
false,
"If True, will fill old EDM EventInfo with xAOD::EventInfo content, necessary for database reading (IOVDbSvc)");
137 declareProperty(
"PrintPerfStats",
m_printPerfStats=
false,
"If True, at end of job will print the xAOD perf stats");
140 declareProperty(
"EvtStore",
m_dataStore,
"Store where to publish data");
141 declareProperty(
"ProxyProviderSvc" ,
m_ppSvc ,
"The ProxyProviderSvc that we should register ourself in and connect the EvtStore to");
142 declareProperty(
"InputMetaStore",
m_imetaStore,
"Store where to publish (input) metadata");
143 declareProperty(
"MetaStore",
m_ometaStore,
"Store where to publish (output) metadata");
144 declareProperty(
"TreeName",
m_tupleName =
"CollectionTree",
"Name of the TTree to load/read from input file(s)" );
145 declareProperty(
"MetaDataTreeName",
m_metadataName =
"MetaData",
"Name of the TTree to load/read metadata from input file(s)" );
147 declareProperty(
"ReadMetaDataWithPool",
m_readMetadataWithPool=
false,
"If true, using POOL to read metadata, will ensure input file is registered with catalog");
150 #ifndef XAOD_ANALYSIS
151 declareProperty(
"CollectionType",
m_collectionType=
"",
"Compability flag for RecExCommon");
◆ ~xAODEventSelector()
Athena::xAODEventSelector::~xAODEventSelector |
( |
| ) |
|
|
virtual |
◆ createAddress()
StatusCode Athena::xAODEventSelector::createAddress |
( |
const Context & |
refCtxt, |
|
|
IOpaqueAddress *& |
|
|
) |
| const |
|
overridevirtual |
◆ createContext()
StatusCode Athena::xAODEventSelector::createContext |
( |
Context *& |
refpCtxt | ) |
const |
|
overridevirtual |
IEvtSelector
interface
Definition at line 555 of file xAODEventSelector.cxx.
557 xAODEventContext *ctx =
new xAODEventContext(
this);
559 return StatusCode::SUCCESS;
◆ createMetaDataRootBranchAddresses()
StatusCode Athena::xAODEventSelector::createMetaDataRootBranchAddresses |
( |
| ) |
const |
|
private |
helper method to create proxies for the metadata store
Definition at line 882 of file xAODEventSelector.cxx.
885 ATH_MSG_DEBUG(
"In xAODEventSelector::createMetaDataRootBranchAddresses start ...");
889 throw "xAODEventSelector: Unable to get m_tfile";
897 if (!
tree) std::abort();
898 TObjArray *leaves =
tree->GetListOfLeaves();
901 return StatusCode::SUCCESS;
905 for (Int_t
i = 0;
i < leaves->GetEntries(); ++
i) {
906 TLeaf *leaf = (TLeaf *)leaves->At(
i);
907 TBranch *
branch = leaf->GetBranch();
912 const std::string type_name = leaf->GetTypeName();
913 const std::string br_name =
branch->GetName();
915 const std::string
toCheck =
"xAOD::";
916 if (type_name.find(
toCheck) == std::string::npos) {
917 ATH_MSG_DEBUG(
"** Skip type-name = " << type_name <<
", br_name = " << br_name );
920 const std::string sg_key = br_name;
921 TClass *
cls = TClass::GetClass(type_name.c_str());
922 const std::type_info *ti = 0;
926 if( br_name ==
"EventFormat" )
continue;
929 ti =
cls->GetTypeInfo();
945 << type_name <<
"]");
951 ATH_MSG_DEBUG(
"id = " <<
id <<
", m_metadataName.value() = " <<
m_metadataName.value() <<
", br_name = " << br_name <<
", value_ptr = " << value_ptr);
953 (POOL_ROOTTREE_StorageType,
id,
956 (
unsigned long)(value_ptr),
958 if (!
m_imetaStore->recordAddress(br_name, addr,
true).isSuccess()) {
959 ATH_MSG_ERROR(
"could not record address at [" << br_name <<
"] in store ["
961 delete addr; addr = 0;
972 ATH_MSG_DEBUG(
"In xAODEventSelector::createMetaDataRootBranchAddresses end ...");
974 return StatusCode::SUCCESS;
◆ createRootBranchAddresses()
StatusCode Athena::xAODEventSelector::createRootBranchAddresses |
( |
StoreID::type |
storeID, |
|
|
tadList & |
tads |
|
) |
| |
|
private |
helper method to create proxies
className.ReplaceAll("vector","std::vector");
Definition at line 758 of file xAODEventSelector.cxx.
763 return(StatusCode::SUCCESS);
768 return StatusCode::FAILURE;
782 std::set<std::string> missingAux;
785 if(
inputTree->GetBranch(itr->second.branchName().c_str())==0)
continue;
786 ATH_MSG_VERBOSE(
"EFE:" << itr->first <<
" branchName = " << itr->second.branchName() <<
" className=" << itr->second.className());
788 if(
m_clidsvc->getIDOfTypeInfoName(itr->second.className(),
id).isFailure() &&
789 m_clidsvc->getIDOfTypeName(itr->second.className(),
id).isFailure()) {
791 if(itr->second.branchName().compare(itr->second.branchName().length()-4,4,
"Aux.")==0) {
792 missingAux.insert( itr->second.className() );
continue;
795 TString
className = itr->second.className();
801 const std::type_info *ti =
cls->GetTypeInfo();
807 ATH_MSG_WARNING(
"No CLID for class " << itr->second.className() <<
" , cannot read " << itr->second.branchName());
813 const std::string br_name = itr->second.branchName();
816 (POOL_ROOTTREE_StorageType,
id,
819 (
unsigned long)(value_ptr),
832 if (
old->clID() ==
id &&
833 old->name() == br_name) {
836 old->setAddress(addr);
838 iaddr->second =
true;
848 tads.push_back(taddr);
858 if(missingAux.size()) {
859 std::string allAux;
for(
auto&
s : missingAux) allAux +=
s +
", ";
860 ATH_MSG_WARNING(
"The following AuxStore types are not directly accessible (missing CLID, possibly from schema evolution): " << allAux);
876 ATH_MSG_DEBUG(
"In xAODEventSelector::createRootBranchAddresses end ...");
878 return StatusCode::SUCCESS;
◆ curEvent()
int Athena::xAODEventSelector::curEvent |
( |
const Context & |
refCtxt | ) |
const |
|
overridevirtual |
◆ do_init_io()
StatusCode Athena::xAODEventSelector::do_init_io |
( |
| ) |
|
|
private |
helper method to init the i/o components
Definition at line 1059 of file xAODEventSelector.cxx.
1066 zero.min_entries = -1;
1067 zero.max_entries = -1;
1087 return StatusCode::SUCCESS;
◆ fetchNtupleFile()
TFile * Athena::xAODEventSelector::fetchNtupleFile |
( |
const std::string & |
fname | ) |
const |
|
private |
helper method to retrieve the correct tuple
Definition at line 979 of file xAODEventSelector.cxx.
983 RootGlobalsRestore rgr;
985 file = (TFile*)gROOT->GetListOfFiles()->FindObject(
fname.c_str());
988 file = TFile::Open(
fname.c_str(),
"READ");
993 ATH_MSG_ERROR(
"could not open next file in input collection ["
◆ finalize()
StatusCode Athena::xAODEventSelector::finalize |
( |
| ) |
|
|
overridevirtual |
◆ find_coll_idx()
int Athena::xAODEventSelector::find_coll_idx |
( |
int |
evtidx | ) |
const |
|
private |
helper method to get the collection index (into m_inputCollectionsName
) for a given event index evtidx
.
returns -1 if not found.
Definition at line 1094 of file xAODEventSelector.cxx.
1103 if (itr.min_entries == -1) {
1109 offset += jtr.max_entries;
1111 itr.min_entries =
offset;
1113 itr.max_entries =
offset + ( (
tree) ?
tree->GetEntriesFast() : 0);
1115 throw "xAODEventSelector: Unable to fetch ntuple";
1121 if (itr.min_entries <= evtidx && evtidx < itr.max_entries) {
◆ handle()
void Athena::xAODEventSelector::handle |
( |
const Incident & |
incident | ) |
|
|
overridevirtual |
◆ initialize()
StatusCode Athena::xAODEventSelector::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 161 of file xAODEventSelector.cxx.
169 ATH_MSG_ERROR(
"You have to give a TTree name to read from the ROOT files !");
170 return StatusCode::FAILURE;
174 if ( nbrInputFiles < 1 ) {
176 <<
"(Got [" << nbrInputFiles <<
"] file instead !)");
177 return StatusCode::FAILURE;
179 ATH_MSG_INFO(
"Selector configured to read [" << nbrInputFiles <<
"] file(s)...");
188 if(serviceLocator()->existsService(
"AthROOTErrorHandlerSvc")) {
190 CHECK( ehSvc.retrieve() );
191 CHECK( ehSvc->initialize() );
192 CHECK( ehSvc.release() );
195 case -1:
ATH_MSG_INFO(
"Using DEFAULT xAOD access mode (usually same as CLASS mode)");
break;
196 case 0:
ATH_MSG_INFO(
"Using BRANCH xAOD access mode");
break;
197 case 1:
ATH_MSG_INFO(
"Using CLASS xAOD access mode");
break;
198 case 2:
ATH_MSG_INFO(
"Using ATHENA xAOD access mode");
break;
212 return StatusCode::FAILURE;
214 if(!
f->Get(
"##Shapes")) {
215 ATH_MSG_INFO(
"First file is not POOL file (e.g. is CxAOD), so reading metadata with xAOD::TEvent instead");
225 if (!iomgr.retrieve().isSuccess()) {
227 return StatusCode::FAILURE;
229 if (!iomgr->io_register(
this).isSuccess()) {
230 ATH_MSG_FATAL(
"Could not register myself with the IoComponentMgr !");
231 return StatusCode::FAILURE;
237 if (!iomgr->io_register(
this,
239 incol[
icol]).isSuccess()) {
247 return StatusCode::FAILURE;
252 return StatusCode::FAILURE;
284 std::vector<std::string>
propVal;
286 bool foundSvc(
false);
bool foundPoolSvc(
false);
287 for(
const std::string&
s :
propVal) {
288 if(
s==
"Athena::xAODCnvSvc") { foundSvc=
true; }
289 if(
s==
"AthenaPoolCnvSvc") { foundPoolSvc=
true; }
291 if(!foundSvc)
propVal.push_back(
"Athena::xAODCnvSvc");
304 std::vector<std::string>
propVal;
305 IProperty* prop =
dynamic_cast<IProperty*
>(&*
m_ppSvc);
307 return StatusCode::FAILURE;
310 bool foundSvc(
false);
311 for(
const std::string&
s :
propVal) {
312 if(
s==
"MetaDataSvc") { foundSvc=
true;
break; }
315 propVal.push_back(
"MetaDataSvc");
316 IProperty* prop =
dynamic_cast<IProperty*
>(&*
m_ppSvc);
318 return StatusCode::FAILURE;
348 return StatusCode::SUCCESS;
◆ io_reinit()
StatusCode Athena::xAODEventSelector::io_reinit |
( |
| ) |
|
|
overridevirtual |
Callback method to reinitialize the internal state of the component for I/O purposes (e.g.
upon fork(2)
)
Definition at line 648 of file xAODEventSelector.cxx.
653 if (!iomgr.retrieve().isSuccess()) {
655 return StatusCode::FAILURE;
657 if (!iomgr->io_hasitem(
this)) {
658 ATH_MSG_FATAL(
"IoComponentMgr does not know about myself !");
659 return StatusCode::FAILURE;
670 if (!iomgr->io_contains(
this,
fname)) {
672 return StatusCode::FAILURE;
674 if (!iomgr->io_retrieve(
this,
fname).isSuccess()) {
676 return StatusCode::FAILURE;
696 return StatusCode::FAILURE;
700 return StatusCode::SUCCESS;
◆ last()
StatusCode Athena::xAODEventSelector::last |
( |
Context & |
refContext | ) |
const |
|
overridevirtual |
◆ loadAddresses()
StatusCode Athena::xAODEventSelector::loadAddresses |
( |
StoreID::type |
storeID, |
|
|
tadList & |
list |
|
) |
| |
|
overridevirtual |
◆ next() [1/2]
StatusCode Athena::xAODEventSelector::next |
( |
IEvtSelector::Context & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 372 of file xAODEventSelector.cxx.
379 xAODEventContext* rctx =
dynamic_cast<xAODEventContext*
>(&ctx);
382 throw GaudiException(
"xAODEventSelector::next() - Unable to get xAODEventContext",
"xAODEventSelector",StatusCode::FAILURE);
386 const TFile *
file = rctx->file();
389 m_incsvc->fireIncident(FileIncident(
name(),
"BeginInputFile",
file->GetName()));
393 auto& fnames = rctx->files();
395 if( rctx->setFile(
"").isFailure() ) {
396 throw GaudiException(
"xAODEventSelector::next() - Fatal error when trying to setFile('')",
"xAODEventSelector",StatusCode::FAILURE);
400 if (
m_collIdx <
int(rctx->files().size())) {
402 if( rctx->setFile(
fname ).isFailure() ) {
403 throw GaudiException(
"xAODEventSelector::next() - Fatal error when trying to setFile('" +
fname +
"')",
"xAODEventSelector",StatusCode::FAILURE);
407 m_incsvc->fireIncident(FileIncident(
name(),
"BeginInputFile", rctx->file()->GetName()));
410 return StatusCode::FAILURE;
424 int64_t global_entry = rctx->entry();
425 int64_t
entry = global_entry;
441 throw GaudiException(
"xAODEventSelector::next() - xAOD::TEvent::getEntry returned less than 0 bytes",
"xAODEventSelector",StatusCode::FAILURE);
455 throw GaudiException(
"xAODEventSelector::next() - Could not find xAOD::EventInfo",
"xAODEventSelector",StatusCode::FAILURE);
462 if ( !
m_dataStore->record( evtInfo,
"EventInfo" ).isSuccess() ) {
464 delete evtInfo; evtInfo = 0;
465 throw GaudiException(
"xAODEventSelector::next() - Could not record EventInfo",
"xAODEventSelector",StatusCode::FAILURE);
468 return StatusCode::SUCCESS;
472 auto& fnames = rctx->files();
473 std::size_t fidx = rctx->fileIndex();
474 m_incsvc->fireIncident(FileIncident(
name(),
"EndInputFile", fnames[fidx]));
498 for (
auto& iaddr :
self()->m_rootAddresses) {
499 iaddr.second =
false;
503 const bool forceRemove =
false;
508 CHECK( rctx->setFile(
"") );
◆ next() [2/2]
StatusCode Athena::xAODEventSelector::next |
( |
Context & |
refCtxt, |
|
|
int |
jump |
|
) |
| const |
|
overridevirtual |
◆ preLoadAddresses()
StatusCode Athena::xAODEventSelector::preLoadAddresses |
( |
StoreID::type |
storeID, |
|
|
tadList & |
list |
|
) |
| |
|
overridevirtual |
◆ previous() [1/2]
StatusCode Athena::xAODEventSelector::previous |
( |
IEvtSelector::Context & |
ctx | ) |
const |
|
overridevirtual |
◆ previous() [2/2]
StatusCode Athena::xAODEventSelector::previous |
( |
Context & |
refCtxt, |
|
|
int |
jump |
|
) |
| const |
|
overridevirtual |
◆ releaseContext()
StatusCode Athena::xAODEventSelector::releaseContext |
( |
Context *& |
refCtxt | ) |
const |
|
overridevirtual |
Definition at line 571 of file xAODEventSelector.cxx.
573 if(refCtxt==0)
return StatusCode::SUCCESS;
574 xAODEventContext *ctx =
dynamic_cast<xAODEventContext*
>(refCtxt);
577 return StatusCode::SUCCESS;
580 return StatusCode::FAILURE;
◆ resetCriteria()
StatusCode Athena::xAODEventSelector::resetCriteria |
( |
const std::string & |
cr, |
|
|
Context & |
ctx |
|
) |
| const |
|
overridevirtual |
◆ rewind()
StatusCode Athena::xAODEventSelector::rewind |
( |
Context & |
refCtxt | ) |
const |
|
overridevirtual |
◆ seek()
StatusCode Athena::xAODEventSelector::seek |
( |
Context & |
refCtxt, |
|
|
int |
evtnum |
|
) |
| const |
|
overridevirtual |
Seek to a given event number.
IEventSeek
interface
- Parameters
-
evtnum | The event number to which to seek. |
evtnum | The event number to which to seek. |
Definition at line 599 of file xAODEventSelector.cxx.
611 if (coll_idx == -1 && evtnum <
m_curEvt) {
615 if (coll_idx == -1) {
617 return StatusCode::RECOVERABLE;
622 xAODEventContext* rctx =
dynamic_cast<xAODEventContext*
>(&refCtxt);
624 return StatusCode::FAILURE;
632 return StatusCode::SUCCESS;
◆ self()
◆ setFile()
StatusCode Athena::xAODEventSelector::setFile |
( |
const std::string & |
fname | ) |
|
|
private |
switch to given file, loading metadata and triggering a beginInputFile incident
Definition at line 1004 of file xAODEventSelector.cxx.
1007 if(!newFile && !
fname.empty()) {
1009 return StatusCode::FAILURE;
1013 const std::string currFile =
m_tfile->GetName();
1015 m_poolSvc->disconnectDb(
"PFN:"+currFile).ignore();
1023 if(!
m_tfile)
return StatusCode::SUCCESS;
1027 return StatusCode::FAILURE;
1035 return StatusCode::FAILURE;
1053 return StatusCode::SUCCESS;
◆ size()
int Athena::xAODEventSelector::size |
( |
Context & |
refCtxt | ) |
const |
|
overridevirtual |
◆ updateAddress()
update a transient Address
Definition at line 731 of file xAODEventSelector.cxx.
738 return StatusCode::SUCCESS;
741 << tad->
name() <<
") NOT known to us.");
742 return StatusCode::FAILURE;
746 return StatusCode::SUCCESS;
◆ Athena::xAODEventContext
◆ m_accessMode
int Athena::xAODEventSelector::m_accessMode |
|
private |
◆ m_clidsvc
◆ m_collectionType
StringProperty Athena::xAODEventSelector::m_collectionType |
|
private |
◆ m_collEvts
std::vector<CollMetaData> Athena::xAODEventSelector::m_collEvts |
|
mutableprivate |
◆ m_collIdx
long Athena::xAODEventSelector::m_collIdx |
|
mutableprivate |
◆ m_curEvt
long Athena::xAODEventSelector::m_curEvt |
|
mutableprivate |
◆ m_dataStore
◆ m_dictsvc
◆ m_fillEventInfo
bool Athena::xAODEventSelector::m_fillEventInfo = false |
|
private |
◆ m_imetaStore
◆ m_incsvc
◆ m_inputCollectionsName
StringArrayProperty Athena::xAODEventSelector::m_inputCollectionsName |
|
private |
◆ m_metadataName
StringProperty Athena::xAODEventSelector::m_metadataName |
|
private |
◆ m_nbrEvts
long Athena::xAODEventSelector::m_nbrEvts |
|
mutableprivate |
◆ m_needReload
bool Athena::xAODEventSelector::m_needReload |
|
mutableprivate |
◆ m_ometaStore
◆ m_poolSvc
◆ m_ppSvc
◆ m_printEventProxyWarnings
bool Athena::xAODEventSelector::m_printEventProxyWarnings = true |
|
private |
◆ m_printPerfStats
bool Athena::xAODEventSelector::m_printPerfStats = false |
|
private |
◆ m_readMetadataWithPool
bool Athena::xAODEventSelector::m_readMetadataWithPool = false |
|
private |
◆ m_rootAddresses
◆ m_skipEvts
long Athena::xAODEventSelector::m_skipEvts |
|
private |
◆ m_tevent
◆ m_tevent_entries
long Athena::xAODEventSelector::m_tevent_entries |
|
mutableprivate |
◆ m_tfile
TFile* Athena::xAODEventSelector::m_tfile |
|
mutableprivate |
◆ m_tupleName
StringProperty Athena::xAODEventSelector::m_tupleName |
|
private |
The documentation for this class was generated from the following files:
long m_nbrEvts
Number of Events read so far.
ServiceHandle< IProxyProviderSvc > m_ppSvc
Handle to the proxy provider svc.
bool m_printEventProxyWarnings
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
std::unordered_map< SG::TransientAddress *, bool > m_rootAddresses
uint64_t eventNumber() const
The current event's event number.
static CLID typeinfoToCLID(const std::type_info &ti)
Return the CLID corresponding to a type_info.
ReadStats & stats()
Access the object belonging to the current thread.
void start(bool clear=true)
Start the statistics collection.
long m_skipEvts
Number of events to skip at the beginning.
This class represents the "type of event" where the type is given by one or more "characteristics".
void Print(::Option_t *option="") const
Print information about the collected statistics.
std::vector< CollMetaData > m_collEvts
cache of the number of entries for each collection
StringArrayProperty m_inputCollectionsName
List of input files containing TTree.
StringProperty m_tupleName
Name of TTree to load from collection of input files.
#define ATH_MSG_VERBOSE(x)
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
uint32_t runNumber() const
The current event's run number.
bool m_readMetadataWithPool
xAOD::xAODTEvent * m_tevent
current TEvent being read
const std::string & name() const
Get the primary (hashed) SG key.
long m_curEvt
current event index
StatusCode do_init_io()
helper method to init the i/o components
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
std::string typeinfoName(const std::type_info &ti)
Convert a type_info to a demangled string.
xAODEventSelector(const std::string &name, ISvcLocator *svcLoc)
Constructor with parameters:
::Long64_t getEntries() const
Get how many entries are available from the current input file(s)
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0)
Function loading a given entry of the input TTree.
CLID clID() const
Retrieve string key:
ServiceHandle< IPoolSvc > m_poolSvc
Handle to the PoolSvc (used in Hybrid mode when user is reading metadata with pool)
virtual StatusCode next(Context &refCtxt) const override
#define CHECK(...)
Evaluate an expression and check for errors.
static IOStats & instance()
Singleton object accessor.
uint32_t CLID
The Class ID type.
void setPrintEventProxyWarnings(bool)
Function to silence warnings associated with broken element links.
uint32_t lumiBlock() const
The current event's luminosity block number.
bool allGood
Loop over the SDOs & Digits.
void setProvider(IAddressProvider *provider, StoreID::type storeID)
StatusCode setFile(const std::string &fname)
switch to given file, loading metadata and triggering a beginInputFile incident
ServiceHandle< StoreGateSvc > m_ometaStore
Pointer to the StoreGateSvc output metadata store.
This class provides general information about an event. Event information is provided by the accessor...
ServiceHandle< IDictLoaderSvc > m_dictsvc
Pointer to the IDictLoaderSvc.
StatusCode createMetaDataRootBranchAddresses() const
helper method to create proxies for the metadata store
static PerfStats & instance()
Function accessing the singleton instance.
void setAddress(IOpaqueAddress *pAddress)
Retrieve primary clid.
Class describing the basic event information.
StatusCode createRootBranchAddresses(StoreID::type storeID, tadList &tads)
helper method to create proxies
EAuxMode
Auxiliary store "mode".
#define ATH_MSG_WARNING(x)
StringProperty m_metadataName
Name of TTree to load from metadata of input files.
StatusCode retrieve(const T *&obj, const std::string &key)
Retrieve either an input or an output object from the event.
ServiceHandle< StoreGateSvc > m_imetaStore
Pointer to the StoreGateSvc input metadata store.
const EventFormat * inputEventFormat() const
Get information about the input objects.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
StringProperty m_collectionType
TFile * fetchNtupleFile(const std::string &fname) const
helper method to retrieve the correct tuple
void clearAddress(const bool &flag)
Return the clearAddress flag.
void stop()
Stop the statistics collection.
StatusCode readFrom(::TFile *file, Bool_t useTreeCache=kTRUE, const char *treeName=EVENT_TREE_NAME)
Connect the object to a new input file.
long m_collIdx
current collection index (into m_inputCollectionsName)
TFile * m_tfile
current TFile being read
virtual StatusCode seek(Context &refCtxt, int evtnum) const override
Seek to a given event number.
uint32_t bcid() const
The bunch crossing ID of the event.
ServiceHandle< IIncidentSvc > m_incsvc
Handle to the incident service.
ServiceHandle< IClassIDSvc > m_clidsvc
Pointer to the IClassIDSvc.
int find_coll_idx(int evtidx) const
helper method to get the collection index (into m_inputCollectionsName) for a given event index evtid...
void zero(TH2 *h)
zero the contents of a 2d histogram
ServiceHandle< StoreGateSvc > m_dataStore
Pointer to the StoreGateSvc event store.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.