ATLAS Offline Software
Loading...
Searching...
No Matches
Athena::xAODEventSelector Class Reference

Class implementing the GAUDI IEvtSelector interface using ROOT TTree as a backend. More...

#include <xAODEventSelector.h>

Inheritance diagram for Athena::xAODEventSelector:

Classes

Public Member Functions

 xAODEventSelector (const std::string &name, ISvcLocator *svcLoc)
 Constructor with parameters:
virtual ~xAODEventSelector ()
 Destructor:
virtual StatusCode initialize () override
virtual StatusCode stop () 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.
virtual int size (Context &refCtxt) const override
 ICollectionSize interface
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.
virtual int curEvent (const Context &refCtxt) const override
 return the current event number.
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.
virtual StatusCode updateAddress (StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
 update a transient Address

Private Member Functions

StatusCode createRootBranchAddresses (StoreID::type storeID, tadList &tads)
 helper method to create proxies
TFile * fetchNtupleFile (const std::string &fname) const
 helper method to retrieve the correct tuple
StatusCode createMetaDataRootBranchAddresses () const
 helper method to create proxies for the metadata store
StatusCode do_init_io ()
 helper method to init the i/o components
StatusCode setFile (const std::string &fname)
 switch to given file, loading metadata and triggering a beginInputFile incident
int find_coll_idx (int evtidx) const
 helper method to get the collection index (into m_inputCollectionsName) for a given event index evtidx.
xAODEventSelectorself () const
 non-const access to self (b/c ::next() is const)

Private Attributes

ServiceHandle< StoreGateSvcm_dataStore
 Pointer to the StoreGateSvc event store.
ServiceHandle< StoreGateSvcm_imetaStore
 Pointer to the StoreGateSvc input metadata store.
ServiceHandle< StoreGateSvcm_ometaStore
 Pointer to the StoreGateSvc output metadata store.
ServiceHandle< IClassIDSvc > m_clidsvc
 Pointer to the IClassIDSvc.
ServiceHandle< IDictLoaderSvcm_dictsvc
 Pointer to the IDictLoaderSvc.
ServiceHandle< IIncidentSvc > m_incsvc
 Handle to the incident service.
ServiceHandle< IPoolSvcm_poolSvc
 Handle to the PoolSvc (used in Hybrid mode when user is reading metadata with pool).
ServiceHandle< IProxyProviderSvcm_ppSvc
 Handle to the proxy provider svc.
StringArrayProperty m_inputCollectionsName
 List of input files containing TTree.
StringProperty m_tupleName
 Name of TTree to load from collection of input files.
StringProperty m_metadataName
 Name of TTree to load from metadata of input files.
long m_skipEvts
 Number of events to skip at the beginning.
long m_nbrEvts
 Number of Events read so far.
long m_curEvt
 current event index
long m_collIdx
 current collection index (into m_inputCollectionsName)
std::vector< CollMetaDatam_collEvts
 cache of the number of entries for each collection
bool m_needReload
std::unordered_map< SG::TransientAddress *, bool > m_rootAddresses
xAOD::xAODTEventm_tevent
 current TEvent being read
TFile * m_tfile
 current TFile being read
long m_tevent_entries
int m_accessMode
bool m_fillEventInfo = false
bool m_readMetadataWithPool = false
bool m_printPerfStats = false
bool m_printEventProxyWarnings = true
std::optional< InputFileIncidentGuardm_inputFileGuard
 RAII guard: guarantees a matching EndInputFile for every BeginInputFile.
StringProperty m_collectionType

Friends

class Athena::xAODEventContext

Detailed Description

Class implementing the GAUDI IEvtSelector interface using ROOT TTree as a backend.

Definition at line 49 of file xAODEventSelector.h.

Constructor & Destructor Documentation

◆ xAODEventSelector()

Athena::xAODEventSelector::xAODEventSelector ( const std::string & name,
ISvcLocator * svcLoc )

Constructor with parameters:

Definition at line 112 of file xAODEventSelector.cxx.

113 :
114 base_class ( name, svcLoc ),
115 m_dataStore( "StoreGateSvc/StoreGateSvc", name ),
116 m_imetaStore( "StoreGateSvc/InputMetaDataStore", name ),
117 m_ometaStore( "StoreGateSvc/MetaDataStore", name ),
118 m_clidsvc ( "ClassIDSvc", name ),
119 m_dictsvc ( "AthDictLoaderSvc", name ),
120 m_incsvc ( "IncidentSvc", name ),
121 m_poolSvc ( "PoolSvc" , name ),
122 m_ppSvc ( "ProxyProviderSvc" , name ),
123 m_nbrEvts ( 0 ),
124 m_curEvt ( 0 ),
125 m_collIdx ( 0 ),
126 m_collEvts ( ),
127 m_needReload (true),
129 m_tevent(NULL),
130 m_tfile(NULL),
132{
133//Properties important to end user:
134 declareProperty( "InputCollections", m_inputCollectionsName,"List of input (ROOT) file names" );
135 declareProperty( "SkipEvents",m_skipEvts = 0,"Number of events to skip at the beginning" );
136 declareProperty( "AccessMode", m_accessMode = -1, "-1 = use TEvent Default; 0 = BranchAccess; 1 = ClassAccess; 2 = AthenaAccess" );
137
138 declareProperty( "FillEventInfo", m_fillEventInfo=false,"If True, will fill old EDM EventInfo with xAOD::EventInfo content, necessary for database reading (IOVDbSvc)");
139
140 declareProperty( "PrintPerfStats", m_printPerfStats=false,"If True, at end of job will print the xAOD perf stats");
141
142//Expert Properties:
143 declareProperty( "EvtStore", m_dataStore, "Store where to publish data");
144 declareProperty( "ProxyProviderSvc" , m_ppSvc , "The ProxyProviderSvc that we should register ourself in and connect the EvtStore to");
145 declareProperty( "InputMetaStore",m_imetaStore, "Store where to publish (input) metadata");
146 declareProperty( "MetaStore",m_ometaStore, "Store where to publish (output) metadata");
147 declareProperty( "TreeName",m_tupleName = "CollectionTree","Name of the TTree to load/read from input file(s)" );
148 declareProperty( "MetaDataTreeName", m_metadataName = "MetaData","Name of the TTree to load/read metadata from input file(s)" );
149
150 declareProperty( "ReadMetaDataWithPool", m_readMetadataWithPool=false, "If true, using POOL to read metadata, will ensure input file is registered with catalog");
151 declareProperty( "printEventProxyWarnings", m_printEventProxyWarnings);
152
153#ifndef XAOD_ANALYSIS
154 declareProperty( "CollectionType", m_collectionType="", "Compability flag for RecExCommon");
155#endif
156
157}
ServiceHandle< StoreGateSvc > m_ometaStore
Pointer to the StoreGateSvc output metadata store.
StringProperty m_tupleName
Name of TTree to load from collection of input files.
long m_nbrEvts
Number of Events read so far.
ServiceHandle< IDictLoaderSvc > m_dictsvc
Pointer to the IDictLoaderSvc.
TFile * m_tfile
current TFile being read
StringArrayProperty m_inputCollectionsName
List of input files containing TTree.
StringProperty m_metadataName
Name of TTree to load from metadata of input files.
xAOD::xAODTEvent * m_tevent
current TEvent being read
std::vector< CollMetaData > m_collEvts
cache of the number of entries for each collection
ServiceHandle< IProxyProviderSvc > m_ppSvc
Handle to the proxy provider svc.
ServiceHandle< StoreGateSvc > m_dataStore
Pointer to the StoreGateSvc event store.
std::unordered_map< SG::TransientAddress *, bool > m_rootAddresses
ServiceHandle< IIncidentSvc > m_incsvc
Handle to the incident service.
ServiceHandle< IClassIDSvc > m_clidsvc
Pointer to the IClassIDSvc.
long m_curEvt
current event index
ServiceHandle< IPoolSvc > m_poolSvc
Handle to the PoolSvc (used in Hybrid mode when user is reading metadata with pool).
long m_skipEvts
Number of events to skip at the beginning.
long m_collIdx
current collection index (into m_inputCollectionsName)
ServiceHandle< StoreGateSvc > m_imetaStore
Pointer to the StoreGateSvc input metadata store.

◆ ~xAODEventSelector()

Athena::xAODEventSelector::~xAODEventSelector ( )
virtual

Destructor:

Definition at line 161 of file xAODEventSelector.cxx.

162{}

Member Function Documentation

◆ createAddress()

StatusCode Athena::xAODEventSelector::createAddress ( const Context & refCtxt,
IOpaqueAddress *&  ) const
overridevirtual

Definition at line 576 of file xAODEventSelector.cxx.

578{
579 //std::cerr << "::TTES::createAddress()...\n";
580 return StatusCode::SUCCESS;
581}

◆ createContext()

StatusCode Athena::xAODEventSelector::createContext ( Context *& refpCtxt) const
overridevirtual

IEvtSelector interface

Definition at line 568 of file xAODEventSelector.cxx.

569{
570 xAODEventContext *ctx = new xAODEventContext(this);
571 refCtx = ctx;
572 return StatusCode::SUCCESS;
573}
friend class Athena::xAODEventContext

◆ createMetaDataRootBranchAddresses()

StatusCode Athena::xAODEventSelector::createMetaDataRootBranchAddresses ( ) const
private

helper method to create proxies for the metadata store

Definition at line 888 of file xAODEventSelector.cxx.

889{
890
891 ATH_MSG_DEBUG("In xAODEventSelector::createMetaDataRootBranchAddresses start ...");
892
893 if ( 0 == m_tfile ) {
894 ATH_MSG_ERROR ("Could not get m_tfile !!");
895 throw "xAODEventSelector: Unable to get m_tfile";
896 }
897
898 //FIXME JE
899 ATH_MSG_DEBUG("m_metadataName.value().c_str() = " << m_metadataName.value().c_str() );
900 TTree* tree = dynamic_cast<TTree*>(m_tfile->Get(m_metadataName.value().c_str()));
901 ATH_MSG_DEBUG("m_tfile = " << m_tfile );
902 ATH_MSG_DEBUG("tree = " << tree );
903 if (!tree) std::abort();
904 TObjArray *leaves = tree->GetListOfLeaves();
905 if (!leaves) {
906 ATH_MSG_INFO("no leaves!!");
907 return StatusCode::SUCCESS;
908 }
909
910 // loop over leaves
911 for (Int_t i = 0; i < leaves->GetEntries(); ++i) {
912 TLeaf *leaf = (TLeaf *)leaves->At(i);
913 TBranch *branch = leaf->GetBranch();
914 if (branch) {
915
916 CLID id = 0;
917 const void* value_ptr = m_tevent;
918 const std::string type_name = leaf->GetTypeName();
919 const std::string br_name = branch->GetName();
920 // Skip if type_name does contain xAOD, ie. is not an xAOD container
921 const std::string toCheck = "xAOD::";
922 if (type_name.find(toCheck) == std::string::npos) {
923 ATH_MSG_DEBUG("** Skip type-name = " << type_name << ", br_name = " << br_name );
924 continue;
925 }
926 const std::string sg_key = br_name;//m_tupleName.value()+"/"+br_name;
927 TClass *cls = TClass::GetClass(type_name.c_str());
928 const std::type_info *ti = 0;
929
930 // Skip the EventFormat branch. That must not be disturbed by the
931 // generic metadata handling.
932 if( br_name == "EventFormat" ) continue;
933
934 if (cls) {
935 ti = cls->GetTypeInfo();
936 // first, try to load a dict for that class...
937 if (ti) {
938 m_dictsvc->load_type(*ti);
939 }
940 if (!ti) {
941 ATH_MSG_DEBUG("could not find a type-info for [" <<
942 type_name << "]");
943 continue;
944 }
945
946 // Find the clid for the typeInfo
948
949 if (id == 0) {
950 ATH_MSG_DEBUG("** could not find a CLID for type-name ["
951 << type_name << "]");
952 continue;
953 }
954
955
956
957 ATH_MSG_DEBUG("id = " << id << ", m_metadataName.value() = " << m_metadataName.value() << ", br_name = " << br_name << ", value_ptr = " << value_ptr);
958 CxxUtils::RefCountedPtr<Athena::xAODBranchAddress> addr
959 (new Athena::xAODBranchAddress
961 m_metadataName.value(),
962 br_name,
963 (unsigned long)(value_ptr),
964 (unsigned long)(1))); //IMPORTANT THIS IS 1: signals to BranchAddress to read metadata
965 if (!m_imetaStore->recordAddress(br_name, std::move(addr), true).isSuccess()) {
966 ATH_MSG_ERROR("could not record address at [" << br_name << "] in store ["
967 << m_imetaStore->name() << "]");
968 }
969 // SG::TransientAddress* taddr = new SG::TransientAddress
970 // (id, sg_key, addr);
971 // taddr->setProvider(this);
972 // taddr->clearAddress(true);
973 // tads.push_back(taddr);
974 }
975 }
976 }
977
978 ATH_MSG_DEBUG("In xAODEventSelector::createMetaDataRootBranchAddresses end ...");
979
980 return StatusCode::SUCCESS;
981}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(x,...)
uint32_t CLID
The Class ID type.
static CLID typeinfoToCLID(const std::type_info &ti)
Return the CLID corresponding to a type_info.
static const DbType ROOT_StorageType
Definition DbType.h:85
TChain * tree

◆ createRootBranchAddresses()

StatusCode Athena::xAODEventSelector::createRootBranchAddresses ( StoreID::type storeID,
tadList & tads )
private

helper method to create proxies

className.ReplaceAll("vector","std::vector");

Definition at line 771 of file xAODEventSelector.cxx.

773{
774 if (storeID != StoreID::EVENT_STORE) {
775 ATH_MSG_INFO("-- not the event-store --");
776 return(StatusCode::SUCCESS);
777 }
778
779 if (0 == m_tfile) {
780 ATH_MSG_ERROR("null pointer to n-tuple !");
781 return StatusCode::FAILURE;
782 }
783
784 TTree* inputTree = dynamic_cast<TTree*>(m_tfile->Get(m_tupleName.value().c_str()));
785
786 if(inputTree!=0) {
787
788
789 ATH_MSG_DEBUG("Reading xAOD::EventFormat");
790
791 // m_tevent->dump();
792
793 const void* value_ptr = m_tevent; //passed as 'parameter' to the address object
794
795 std::set<std::string> missingAux;
796
797 for( auto itr = m_tevent->inputEventFormat()->begin(); itr!=m_tevent->inputEventFormat()->end();++itr) {
798 if(inputTree->GetBranch(itr->second.branchName().c_str())==0) continue; //skip branches that are not available in the input collection
799 ATH_MSG_VERBOSE("EFE:" << itr->first << " branchName = " << itr->second.branchName() << " className=" << itr->second.className());
800 CLID id = 0;
801 if( m_clidsvc->getIDOfTypeInfoName(itr->second.className(), id).isFailure() &&
802 m_clidsvc->getIDOfTypeName(itr->second.className(), id).isFailure()) {
803 //if this is an AuxStore (infer if key ends in Aux.), its possible we schema-evolved away from the version in the input file, but that this evolution is actually 'ok' in some cases. So don't print an error if the CLID is missing for an Aux, but we will print a warning at the end for these aux stores
804 if(itr->second.branchName().compare(itr->second.branchName().length()-4,4,"Aux.")==0) {
805 missingAux.insert( itr->second.className() );continue;
806 } else {
807 //vectors can be missing their std:: prefix, so add that and retry before failing
808 TString className = itr->second.className();
810 //ALT solution to this is do what RootNtupleEventSelector does: uses TClass:GetClass
811 //and GetTypeInfo() method to get the proper type info
812 TClass *cls = TClass::GetClass(className);
813 if(cls) {
814 const std::type_info *ti = cls->GetTypeInfo();
815 if(ti) className = System::typeinfoName(*ti);
816 }
817
818 if( m_clidsvc->getIDOfTypeInfoName(className.Data(), id).isFailure() &&
819 m_clidsvc->getIDOfTypeName(className.Data(), id).isFailure()) {
820 ATH_MSG_WARNING("No CLID for class " << itr->second.className() << " , cannot read " << itr->second.branchName());
821 continue;
822 }
823 }
824 }
825
826 const std::string br_name = itr->second.branchName();
827
828 Athena::xAODBranchAddress* addr = new Athena::xAODBranchAddress
830 m_tupleName.value(),
831 br_name,
832 (unsigned long)(value_ptr),
833 (unsigned long)(0)); //IMPORTANT THIS IS 0: signals to xAODBranchAddress to read event-level info (see setTEventAddress)
834 // recycle old rootaddress, if any.
835 SG::TransientAddress* taddr = NULL;
836 // FIXME: should we only iterate over m_rootAddresses which have been marked
837 // as invalid ? (ie: iaddr->second == false)
838 // probably not worth it... (but depends on the "occupancy")
839 for (auto
840 iaddr = m_rootAddresses.begin(),
841 iaddre= m_rootAddresses.end();
842 iaddr != iaddre;
843 ++iaddr) {
844 SG::TransientAddress *old = iaddr->first;
845 if (old->clID() == id &&
846 old->name() == br_name) {
847 // found a "cached" transient address which corresponds to this clid+key
848 // bind it to our new RootBranchAddress...
849 old->setAddress(addr);
850 taddr = old;
851 iaddr->second = true; // mark as valid
852 break;
853 }
854 }
855 if (taddr == NULL) {
856 taddr = new SG::TransientAddress(id, br_name, addr);
857 taddr->setProvider(this, storeID);
858 taddr->clearAddress(false);
859 // only add the *new* TransientAddress to the input list as the *old* ones
860 // are already tracked by the datastore (via the sticky proxies)
861 tads.push_back(taddr);
862 // note: we can store this taddr *b/c* we don't clearAddress it
863 // ie: b/c we just called clearAddress(false) so it will be recycled
864 // over the events.
865 m_rootAddresses.insert(std::make_pair(taddr, true));
866 }
867 // }
868 }
869
870
871 if(missingAux.size()) {
872 std::string allAux; for(auto& s : missingAux) allAux += s + ", ";
873 ATH_MSG_WARNING("The following AuxStore types are not directly accessible (missing CLID, possibly from schema evolution): " << allAux);
874 }
875 } //end if block of requiring input tree to exist
876 else {
877 ATH_MSG_DEBUG("No input collection " << m_tupleName.value() << " found in input file " << m_tfile->GetTitle() );
878 }
879
880 m_needReload = false;
881
882 ATH_MSG_DEBUG("In xAODEventSelector::createRootBranchAddresses end ...");
883
884 return StatusCode::SUCCESS;
885}
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
void clearAddress(const bool &flag)
Return the clearAddress flag.
void setProvider(IAddressProvider *provider, StoreID::type storeID)
@ EVENT_STORE
Definition StoreID.h:26

◆ curEvent()

int Athena::xAODEventSelector::curEvent ( const Context & refCtxt) const
overridevirtual

return the current event number.

Returns
The current event number.

Definition at line 653 of file xAODEventSelector.cxx.

654{
655 return m_curEvt;
656}

◆ do_init_io()

StatusCode Athena::xAODEventSelector::do_init_io ( )
private

helper method to init the i/o components

Definition at line 1075 of file xAODEventSelector.cxx.

1076{
1077 // std::cout << "::fetchNtuple..." << std::endl;
1078
1079 // initialize some helper structures and data
1080 {
1082 zero.min_entries = -1;
1083 zero.max_entries = -1;
1084 m_collEvts.resize(m_inputCollectionsName.value().size(), zero);
1085 m_collIdx = 0;
1086 }
1087
1088
1089
1090 //CHECK( setFile( m_inputCollectionsName.value()[m_collIdx] ) );
1091
1092
1093 // std::cout << "::clear-root-addresses..." << std::endl;
1094 // reset the list of branches
1095 //m_rootAddresses.clear();
1096 m_needReload = true;
1097
1098 // skip events we are asked to skip
1100 m_nbrEvts = 0;
1101
1102 // std::cout << "::fetchNtuple...[done]" << std::endl;
1103 return StatusCode::SUCCESS;
1104}
void zero(TH2 *h)
zero the contents of a 2d histogram
long min_entries
number of entries up to this collection

◆ fetchNtupleFile()

TFile * Athena::xAODEventSelector::fetchNtupleFile ( const std::string & fname) const
private

helper method to retrieve the correct tuple

Definition at line 985 of file xAODEventSelector.cxx.

986{
987 TFile* file = NULL;
988 if(fname.empty()) return file; //if blank, return 0
989 RootGlobalsRestore rgr;
990 //see if file already open
991 file = (TFile*)gROOT->GetListOfFiles()->FindObject(fname.c_str());
992 if (!file) {
993 //open the file
994 file = TFile::Open(fname.c_str(), "READ");
995 if (file) file->SetName(fname.c_str());
996 }
997 //check file is ok before returning
998 if (!file || file->IsZombie()) {
999 ATH_MSG_ERROR("could not open next file in input collection ["
1000 << fname << "]");
1001 if (file) {
1002 file->Close();
1003 }
1004 return 0;
1005 }
1006 return file;
1007}
TFile * file

◆ finalize()

StatusCode Athena::xAODEventSelector::finalize ( )
overridevirtual

Definition at line 362 of file xAODEventSelector.cxx.

363{
364 ATH_MSG_VERBOSE ("Finalize...");
365 // FIXME: this should be tweaked/updated if/when a selection function
366 // or filtering predicate is applied (one day?)
367 ATH_MSG_INFO ("Total events read: " << (m_nbrEvts - m_skipEvts));
368
369 if(m_printPerfStats) {
372 }
373
374
375 return StatusCode::SUCCESS;
376}
ReadStats & stats()
Access the object belonging to the current thread.
Definition IOStats.cxx:17
static IOStats & instance()
Singleton object accessor.
Definition IOStats.cxx:11
void stop()
Stop the statistics collection.
static PerfStats & instance()
Function accessing the singleton instance.
void Print(::Option_t *option="") const
Print information about the collected statistics.

◆ 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 1110 of file xAODEventSelector.cxx.

1111{
1112 // std::cout << "--find_coll_idx(" << evtidx << ")..." << std::endl
1113 // << "--collsize: " << m_collEvts.size() << std::endl;
1114 for (std::size_t i = 0, imax = m_collEvts.size();
1115 i < imax;
1116 ++i) {
1117 // std::cout << "--[" << i << "]...\n";
1118 CollMetaData &itr = m_collEvts[i];
1119 if (itr.min_entries == -1) {
1120 TFile *file = fetchNtupleFile(m_inputCollectionsName.value()[i]);
1121 if (file) {
1122 long offset = 0;
1123 if (i > 0) {
1124 CollMetaData &jtr = m_collEvts[i-1];
1125 offset += jtr.max_entries;
1126 }
1127 itr.min_entries = offset;
1128 TTree* tree = dynamic_cast<TTree*>(file->Get(m_tupleName.value().c_str()));
1129 itr.max_entries = offset + ( (tree) ? tree->GetEntriesFast() : 0);
1130 } else {
1131 throw "xAODEventSelector: Unable to fetch ntuple";
1132 }
1133 }
1134 // std::cout << "--[" << i << "] => [" << itr.min_entries << ", "
1135 // << itr.max_entries << ") evtidx=[" << evtidx << "]"
1136 // << std::endl;
1137 if (itr.min_entries <= evtidx && evtidx < itr.max_entries) {
1138 return i;
1139 }
1140 }
1141 return -1;
1142}
int imax(int i, int j)
TFile * fetchNtupleFile(const std::string &fname) const
helper method to retrieve the correct tuple

◆ handle()

void Athena::xAODEventSelector::handle ( const Incident & incident)
overridevirtual

Definition at line 1152 of file xAODEventSelector.cxx.

1152 {
1153
1154}

◆ initialize()

StatusCode Athena::xAODEventSelector::initialize ( )
overridevirtual

Definition at line 164 of file xAODEventSelector.cxx.

165{
166 ATH_MSG_VERBOSE ("Enter xAODEventSelector initialization...");
167
168 CHECK( m_clidsvc.retrieve() );
169 CHECK( m_dictsvc.retrieve() );
170
171 if ( m_tupleName.value().empty() ) {
172 ATH_MSG_ERROR("You have to give a TTree name to read from the ROOT files !");
173 return StatusCode::FAILURE;
174 }
175
176 const std::size_t nbrInputFiles = m_inputCollectionsName.value().size();
177 if ( nbrInputFiles < 1 ) {
178 ATH_MSG_ERROR("You need to give at least 1 input file !!" << endmsg
179 << "(Got [" << nbrInputFiles << "] file instead !)");
180 return StatusCode::FAILURE;
181 } else {
182 ATH_MSG_INFO("Selector configured to read [" << nbrInputFiles << "] file(s)...");
183 }
184
185 ATH_MSG_DEBUG("Calling xAOD::Init...");
186 int old_level = gErrorIgnoreLevel;
187 gErrorIgnoreLevel = kWarning;
188 xAOD::Init().ignore();
189 gErrorIgnoreLevel = old_level;
190 //if using the AthROOTErrorHandlerSvc, need to initialize it once again to give back error handling control to svc
191 if(serviceLocator()->existsService("AthROOTErrorHandlerSvc")) {
192 ServiceHandle<IService> ehSvc("AthROOTErrorHandlerSvc",name());
193 CHECK( ehSvc.retrieve() );
194 CHECK( ehSvc->initialize() ); //gives back control to svc
195 CHECK( ehSvc.release() );
196 }
197 switch(m_accessMode) {
198 case -1: ATH_MSG_INFO("Using DEFAULT xAOD access mode (usually same as CLASS mode)"); break;
199 case 0: ATH_MSG_INFO("Using BRANCH xAOD access mode"); break;
200 case 1: ATH_MSG_INFO("Using CLASS xAOD access mode"); break;
201 case 2: ATH_MSG_INFO("Using ATHENA xAOD access mode"); break;
202 }
203 if(m_accessMode != -1) {
204 m_tevent = new xAOD::xAODTEvent(xAOD::TEvent::EAuxMode(m_accessMode)); //our special class inheriting from xAOD::TEvent
205 } else {
206 m_tevent = new xAOD::xAODTEvent(); //our special class inheriting from xAOD::TEvent
207 }
208 m_tevent->printProxyWarnings(m_printEventProxyWarnings);
209
210 //use the first file to decide if reading metadata with POOL is ok
212 std::unique_ptr<TFile> f( TFile::Open( m_inputCollectionsName.value()[0].c_str() ) );
213 if(!f) {
214 ATH_MSG_ERROR("Failed to open first input file: " << m_inputCollectionsName.value()[0]);
215 return StatusCode::FAILURE;
216 }
217 if(!f->Get("##Shapes")) {
218 ATH_MSG_INFO("First file is not POOL file (e.g. is CxAOD), so reading metadata with xAOD::TEvent instead");
220 }
221 f->Close();
222 }
223
224
225 {
226 // register this service for 'I/O' events
227 ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
228 if (!iomgr.retrieve().isSuccess()) {
229 ATH_MSG_FATAL("Could not retrieve IoComponentMgr !");
230 return StatusCode::FAILURE;
231 }
232 if (!iomgr->io_register(this).isSuccess()) {
233 ATH_MSG_FATAL("Could not register myself with the IoComponentMgr !");
234 return StatusCode::FAILURE;
235 }
236 // register input file's names with the I/O manager
237 const std::vector<std::string>& incol = m_inputCollectionsName.value();
238 bool allGood = true;
239 for (std::size_t icol = 0, imax = incol.size(); icol < imax; icol++) {
240 if (!iomgr->io_register(this,
241 IIoComponentMgr::IoMode::READ,
242 incol[icol]).isSuccess()) {
243 ATH_MSG_FATAL("could not register [" << incol[icol] << "] for output !");
244 allGood = false;
245 } else {
246 ATH_MSG_VERBOSE("io_register[" << this->name() << "](" << incol[icol] << ") [ok]");
247 }
248 }
249 if (!allGood) {
250 return StatusCode::FAILURE;
251 }
252 }
253
254 if (!do_init_io().isSuccess()) {
255 return StatusCode::FAILURE;
256 }
257
258 // retrieve event stores
259 // this needs to happen *after* having initialized the i/o
260 // as our branches (which need a valid m_ntuple pointer)
261 // may be asked to be registered as we are a ProxyProvider.
262 // retrieving the event store will poke the ProxyProviderSvc...
263/*
264 if ( !m_dataStore.retrieve().isSuccess() ) {
265 ATH_MSG_ERROR("Could not retrieve [" << m_dataStore.typeAndName() << "] !!");
266 return StatusCode::FAILURE;
267 }
268
269 // ditto for (input) meta data store
270 if (!m_imetaStore.retrieve().isSuccess()) {
271 ATH_MSG_ERROR("Could not retrieve [" << m_imetaStore.typeAndName() << "] !!");
272 return StatusCode::FAILURE;
273 }
274
275 // ditto for (output) meta data store
276 if (!m_ometaStore.retrieve().isSuccess()) {
277 ATH_MSG_ERROR
278 ("Could not retrieve [" << m_ometaStore.typeAndName() << "] !!");
279 return StatusCode::FAILURE;
280 }
281*/
282
283 //ensure the xAODCnvSvc is listed in the EventPersistencySvc
284 ServiceHandle<IProperty> epSvc("EventPersistencySvc",name());
285
286
287 std::vector<std::string> propVal;
288 CHECK( Gaudi::Parsers::parse( propVal , epSvc->getProperty("CnvServices").toString() ) );
289 bool foundSvc(false); bool foundPoolSvc(false);
290 for(const std::string& s : propVal) {
291 if(s=="Athena::xAODCnvSvc") { foundSvc=true; }
292 if(s=="AthenaPoolCnvSvc") { foundPoolSvc=true; } //only need this if in hybrid mode
293 }
294 if(!foundSvc) propVal.push_back("Athena::xAODCnvSvc");
295 if(!foundPoolSvc && m_readMetadataWithPool) propVal.push_back("AthenaPoolCnvSvc");
296
297 if(!foundSvc || (!foundPoolSvc && m_readMetadataWithPool)) {
298 CHECK( epSvc->setProperty("CnvServices", Gaudi::Utils::toString( propVal ) ));
299 }
300
301
302 //we should also add ourself as a proxy provider
303 CHECK( m_ppSvc.retrieve() );
304
305 //ensure the MetaDataSvc is added as a provider first, if we are in hybrid mode
307 std::vector<std::string> propVal;
308 IProperty* prop = dynamic_cast<IProperty*>(&*m_ppSvc);
309 if (!prop) {
310 return StatusCode::FAILURE;
311 }
312 CHECK( Gaudi::Parsers::parse( propVal , prop->getProperty("ProviderNames").toString() ) );
313 bool foundSvc(false);
314 for(const std::string& s : propVal) {
315 if(s=="MetaDataSvc") { foundSvc=true; break; }
316 }
317 if(!foundSvc) {
318 propVal.push_back("MetaDataSvc");
319 IProperty* prop = dynamic_cast<IProperty*>(&*m_ppSvc);
320 if (!prop) {
321 return StatusCode::FAILURE;
322 }
323 CHECK( prop->setProperty("ProviderNames", Gaudi::Utils::toString( propVal ) ));
324 }
325 }
326
327 //now we add ourself as a provider
328 m_ppSvc->addProvider( this );
329 //trigger a reload of proxies in the storegate, which will poke the proxyprovidersvc
330 //not actually needed
331 //CHECK( m_dataStore->loadEventProxies() );
332
333
334 //finally ensure the storegate has our proxy set in it
335 //FIXME: this doesnt seem to allow multi storegates on the fly ???
336 //m_dataStore->setProxyProviderSvc( &*m_ppSvc );
337
338 CHECK( m_ppSvc.release() );
339
340
341 //load the first file .. this is so metadata can be read even if no events present
342 //checked above that there's at least one file
343 CHECK( setFile(m_inputCollectionsName.value()[0]) );
344
345 //first FirstInputFile incident so that input metadata store is populated by MetaDataSvc
346 m_incsvc->fireIncident(FileIncident(name(), "FirstInputFile", m_inputCollectionsName.value()[0]));
347
349
350
351 return StatusCode::SUCCESS;
352}
#define endmsg
#define ATH_MSG_FATAL(x,...)
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode do_init_io()
helper method to init the i/o components
StatusCode setFile(const std::string &fname)
switch to given file, loading metadata and triggering a beginInputFile incident
void start(bool clear=true)
Start the statistics collection.
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
bool allGood
Loop over the SDOs & Digits.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
Definition Init.cxx:31

◆ 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 661 of file xAODEventSelector.cxx.

662{
663 ATH_MSG_VERBOSE("I/O reinitialization...");
664
665 ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
666 if (!iomgr.retrieve().isSuccess()) {
667 ATH_MSG_FATAL("Could not retrieve IoComponentMgr !");
668 return StatusCode::FAILURE;
669 }
670 if (!iomgr->io_hasitem(this)) {
671 ATH_MSG_FATAL("IoComponentMgr does not know about myself !");
672 return StatusCode::FAILURE;
673 }
674 std::vector<std::string> inputCollections = m_inputCollectionsName.value();
675
676 for (std::size_t
677 i = 0,
678 imax = m_inputCollectionsName.value().size();
679 i < imax;
680 ++i) {
681 std::string &fname = inputCollections[i];
682 // std::cout << "--retrieve new name for [" << fname << "]...\n";
683 if (!iomgr->io_contains(this, fname)) {
684 ATH_MSG_ERROR("IoComponentMgr does not know about [" << fname << "] !");
685 return StatusCode::FAILURE;
686 }
687 if (!iomgr->io_retrieve(this, fname).isSuccess()) {
688 ATH_MSG_FATAL("Could not retrieve new value for [" << fname << "] !");
689 return StatusCode::FAILURE;
690 }
691 // std::cout << "--> [" << fname << "]\n" << std::flush;
692 }
693 // all good... copy over.
695
696 // remove our EventInfo if any...
697 // {
698 // const bool force_remove = true;
699 // if (!m_dataStore->clearStore(force_remove).isSuccess()) {
700 // ATH_MSG_ERROR("could not clear event store!");
701 // return StatusCode::FAILURE;
702 // } else {
703 // ATH_MSG_INFO("sgdump: \n" << m_dataStore->dump());
704 // }
705 // }
706
707 // std::cout << "--> do_init_io...\n" << std::flush;
708 if (!do_init_io().isSuccess()) {
709 return StatusCode::FAILURE;
710 }
711
712 ATH_MSG_INFO("I/O reinitialization... [done]");
713 return StatusCode::SUCCESS;
714}

◆ last()

StatusCode Athena::xAODEventSelector::last ( Context & refContext) const
overridevirtual

Definition at line 554 of file xAODEventSelector.cxx.

555{
556 ATH_MSG_ERROR ("............. Last Event Not Implemented .............");
557 return StatusCode::FAILURE;
558}

◆ loadAddresses()

StatusCode Athena::xAODEventSelector::loadAddresses ( StoreID::type storeID,
tadList & list )
overridevirtual

get all new addresses from Provider for this Event.

Definition at line 732 of file xAODEventSelector.cxx.

733{
734 if (m_needReload || m_rootAddresses.empty()) {
735 //CHECK(createMetaDataRootBranchAddresses());
736 return createRootBranchAddresses(storeID, tads);
737 }
738
739 return StatusCode::SUCCESS;
740}
StatusCode createRootBranchAddresses(StoreID::type storeID, tadList &tads)
helper method to create proxies

◆ next() [1/2]

virtual StatusCode Athena::xAODEventSelector::next ( Context & refCtxt) const
overridevirtual

◆ next() [2/2]

StatusCode Athena::xAODEventSelector::next ( Context & refCtxt,
int jump ) const
overridevirtual

Definition at line 531 of file xAODEventSelector.cxx.

532{
533 ATH_MSG_DEBUG ("next(" << jump << ") : iEvt " << m_curEvt);
534
535 if (self()->seek(ctx, m_curEvt + jump).isSuccess()) {
536 return StatusCode::FAILURE;
537 }
538 return next(ctx);
539}
virtual StatusCode next(Context &refCtxt) const override
xAODEventSelector * self() const
non-const access to self (b/c next() is const)
virtual StatusCode seek(Context &refCtxt, int evtnum) const override
Seek to a given event number.

◆ preLoadAddresses()

StatusCode Athena::xAODEventSelector::preLoadAddresses ( StoreID::type storeID,
tadList & list )
overridevirtual

IAddressProvider interface get all addresses from Provider : Called before Begin Event

Definition at line 721 of file xAODEventSelector.cxx.

723{
724 // std::cerr << "TTES::preLoadAddresses(" << int(storeID)
725 // << "," << tads.size()
726 // << ")...\n";
727 return StatusCode::SUCCESS;
728}

◆ previous() [1/2]

virtual StatusCode Athena::xAODEventSelector::previous ( Context & refCtxt) const
overridevirtual

◆ previous() [2/2]

StatusCode Athena::xAODEventSelector::previous ( Context & refCtxt,
int jump ) const
overridevirtual

Definition at line 548 of file xAODEventSelector.cxx.

549{
550 return next( ctx, -jump );
551}

◆ releaseContext()

StatusCode Athena::xAODEventSelector::releaseContext ( Context *& refCtxt) const
overridevirtual

Definition at line 584 of file xAODEventSelector.cxx.

585{
586 if(refCtxt==0) return StatusCode::SUCCESS; //added to avoid warning from MetaDataSvc, which passes an empty context
587 xAODEventContext *ctx = dynamic_cast<xAODEventContext*>(refCtxt);
588 if ( ctx ) {
589 delete ctx; ctx = 0;
590 return StatusCode::SUCCESS;
591 }
592
593 return StatusCode::FAILURE;
594}

◆ resetCriteria()

StatusCode Athena::xAODEventSelector::resetCriteria ( const std::string & cr,
Context & ctx ) const
overridevirtual

Definition at line 597 of file xAODEventSelector.cxx.

598{
599 ATH_MSG_ERROR ("............. resetCriteria Not Implemented .............");
600 return StatusCode::FAILURE;
601}

◆ rewind()

StatusCode Athena::xAODEventSelector::rewind ( Context & refCtxt) const
overridevirtual

Definition at line 562 of file xAODEventSelector.cxx.

563{
564 return self()->seek(ctxt, 0);
565}

◆ seek()

StatusCode Athena::xAODEventSelector::seek ( Context & refCtxt,
int evtnum ) const
overridevirtual

Seek to a given event number.

IEventSeek interface

Parameters
evtnumThe event number to which to seek.
evtnumThe event number to which to seek.

Definition at line 612 of file xAODEventSelector.cxx.

613{
614 // std::cout << "::seek - evtnum=" << evtnum
615 // << " curevt=" << m_curEvt
616 // << " curcol=" << m_collIdx
617 // << std::endl;
618 long coll_idx = find_coll_idx(evtnum);
619 // std::cout << "::seek - evtnum=" << evtnum
620 // << " curevt=" << m_curEvt
621 // << " curcol=" << m_collIdx
622 // << " colidx=" << coll_idx
623 // << std::endl;
624 if (coll_idx == -1 && evtnum < m_curEvt) {
625 coll_idx = m_collIdx;
626 }
627
628 if (coll_idx == -1) {
629 ATH_MSG_INFO("seek: reached end of input.");
630 return StatusCode::RECOVERABLE;
631 }
632
633 if (coll_idx != m_collIdx) {
634 // tell everyone we switched files...
635 xAODEventContext* rctx = dynamic_cast<xAODEventContext*>(&refCtxt);
636 if (!rctx) {
637 return StatusCode::FAILURE;
638 }
639 ATH_CHECK(rctx->setFile(""));
640 }
641
642 m_collIdx = coll_idx;
643 m_curEvt = evtnum;
644
645 return StatusCode::SUCCESS;
646}
#define ATH_CHECK
Evaluate an expression and check for errors.
int find_coll_idx(int evtidx) const
helper method to get the collection index (into m_inputCollectionsName) for a given event index evtid...

◆ self()

xAODEventSelector * Athena::xAODEventSelector::self ( ) const
inlineprivate

non-const access to self (b/c ::next() is const)

Definition at line 161 of file xAODEventSelector.h.

162 { return const_cast<xAODEventSelector*>(this); }
xAODEventSelector(const std::string &name, ISvcLocator *svcLoc)
Constructor with parameters:

◆ setFile()

StatusCode Athena::xAODEventSelector::setFile ( const std::string & fname)
private

switch to given file, loading metadata and triggering a beginInputFile incident

Definition at line 1010 of file xAODEventSelector.cxx.

1010 {
1011
1012 TFile* newFile = fetchNtupleFile(fname);
1013 if(!newFile && !fname.empty()) {
1014 ATH_MSG_FATAL( "xAODEventSelector: Unable to fetch Ntuple: " << fname);
1015 return StatusCode::FAILURE; //failed to load file
1016 }
1017
1018 if(m_tfile && m_tfile != newFile) {
1019 const std::string currFile = m_tfile->GetName();
1020 //disconnect pool if necessary ... always fire this, hopefully it is safe even if not needed
1021 m_poolSvc->disconnectDb("PFN:"+currFile).ignore();
1022 //close existing file
1023 m_tfile->Close();
1024 //we should also cleanup after pool, in case it has left open files dangling
1025 }
1026 m_tfile = newFile;
1027 m_tevent_entries = 0; //will set in a moment
1028
1029 if(!m_tfile) return StatusCode::SUCCESS; //must have been setting to blank file
1030
1031 if(m_tevent->readFrom( m_tfile ).isFailure()) {
1032 ATH_MSG_FATAL( "xAODEventSelector: TEvent cannot read " << fname);
1033 return StatusCode::FAILURE;
1034 }
1035
1036 m_tevent_entries = m_tevent->getEntries();
1037
1038 //need to load metadata for file
1039 if (!m_imetaStore->clearStore().isSuccess()) {
1040 ATH_MSG_INFO("could not clear store [" << m_imetaStore.typeAndName() << "]");
1041 return StatusCode::FAILURE;
1042 }
1043
1044
1046 //ensure input file collection created
1047 ATH_MSG_DEBUG("Creating poolsvc collection for " << fname);
1048 StatusCode sc = m_poolSvc->connectCollection( "PFN:"+fname , fname , pool::POOL_StorageType.type() );
1049 pool::CollectionService collSvc ATLAS_THREAD_SAFE = pool::CollectionService();
1050 pool::ICollection* collPtr ATLAS_THREAD_SAFE = nullptr;
1051 // Try to open EventTags Collection in the input file
1052 try {
1053 collPtr = collSvc.open(fname, pool::POOL_StorageType.type(), "PFN:"+fname, m_poolSvc->getInputContextSession(IPoolSvc::kInputStream));
1054 } catch (std::exception &e) {
1055 collPtr = nullptr;
1056 }
1057 if (sc.isRecoverable() || collPtr == nullptr) {
1058 m_poolSvc->checkCollection("PFN:"+fname, IPoolSvc::kInputStream, collPtr == nullptr).ignore();
1059 }
1060 //metadata will be read by MetaDataSvc, triggered by the BeginInputFile call
1061 } else {
1062 if (!createMetaDataRootBranchAddresses().isSuccess()) {
1063 ATH_MSG_ERROR("Could not load metadata");
1064 }
1065 }
1066
1067
1068
1069 return StatusCode::SUCCESS;
1070
1071}
static Double_t sc
#define ATLAS_THREAD_SAFE
StatusCode createMetaDataRootBranchAddresses() const
helper method to create proxies for the metadata store
@ kInputStream
Definition IPoolSvc.h:39
::StatusCode StatusCode
StatusCode definition for legacy code.
static const DbType POOL_StorageType
Definition DbType.h:84

◆ size()

int Athena::xAODEventSelector::size ( Context & refCtxt) const
overridevirtual

ICollectionSize interface

Definition at line 1145 of file xAODEventSelector.cxx.

1145 {
1146 //use find_coll_idx to trigger a population of the m_collEvts ... dummy call with -1 to trigger all colls loaded
1147 find_coll_idx(-1);
1148 return m_collEvts.back().max_entries;
1149}

◆ stop()

StatusCode Athena::xAODEventSelector::stop ( )
overridevirtual

Definition at line 354 of file xAODEventSelector.cxx.

355{
356 // Fire EndInputFile for any file still open (the event loop may end
357 // before the file is fully read).
358 m_inputFileGuard.reset();
359 return StatusCode::SUCCESS;
360}
std::optional< InputFileIncidentGuard > m_inputFileGuard
RAII guard: guarantees a matching EndInputFile for every BeginInputFile.

◆ updateAddress()

StatusCode Athena::xAODEventSelector::updateAddress ( StoreID::type storeID,
SG::TransientAddress * tad,
const EventContext & ctx )
overridevirtual

update a transient Address

Definition at line 744 of file xAODEventSelector.cxx.

746{
747 // check if this tad is known to us.
748 if (tad) {
749 auto itr = m_rootAddresses.find(tad);
750 if ( itr != m_rootAddresses.end() && itr->second ) {
751 return StatusCode::SUCCESS;
752 }
753 ATH_MSG_DEBUG("updateAddress: address [" << tad->clID() << "#"
754 << tad->name() << ") NOT known to us.");
755 return StatusCode::FAILURE;
756 }
757
758 // do nothing.
759 return StatusCode::SUCCESS;
760}
CLID clID() const
Retrieve string key:
const std::string & name() const
Get the primary (hashed) SG key.

◆ Athena::xAODEventContext

friend class Athena::xAODEventContext
friend

Definition at line 57 of file xAODEventSelector.h.

Member Data Documentation

◆ m_accessMode

int Athena::xAODEventSelector::m_accessMode
private

Definition at line 234 of file xAODEventSelector.h.

◆ m_clidsvc

ServiceHandle<IClassIDSvc> Athena::xAODEventSelector::m_clidsvc
private

Pointer to the IClassIDSvc.

Definition at line 176 of file xAODEventSelector.h.

◆ m_collectionType

StringProperty Athena::xAODEventSelector::m_collectionType
private

Definition at line 249 of file xAODEventSelector.h.

◆ m_collEvts

std::vector<CollMetaData> Athena::xAODEventSelector::m_collEvts
mutableprivate

cache of the number of entries for each collection

Definition at line 214 of file xAODEventSelector.h.

◆ m_collIdx

long Athena::xAODEventSelector::m_collIdx
mutableprivate

current collection index (into m_inputCollectionsName)

Definition at line 205 of file xAODEventSelector.h.

◆ m_curEvt

long Athena::xAODEventSelector::m_curEvt
mutableprivate

current event index

Definition at line 202 of file xAODEventSelector.h.

◆ m_dataStore

ServiceHandle<StoreGateSvc> Athena::xAODEventSelector::m_dataStore
private

Pointer to the StoreGateSvc event store.

Definition at line 170 of file xAODEventSelector.h.

◆ m_dictsvc

ServiceHandle<IDictLoaderSvc> Athena::xAODEventSelector::m_dictsvc
private

Pointer to the IDictLoaderSvc.

Definition at line 178 of file xAODEventSelector.h.

◆ m_fillEventInfo

bool Athena::xAODEventSelector::m_fillEventInfo = false
private

Definition at line 236 of file xAODEventSelector.h.

◆ m_imetaStore

ServiceHandle<StoreGateSvc> Athena::xAODEventSelector::m_imetaStore
private

Pointer to the StoreGateSvc input metadata store.

Definition at line 172 of file xAODEventSelector.h.

◆ m_incsvc

ServiceHandle<IIncidentSvc> Athena::xAODEventSelector::m_incsvc
private

Handle to the incident service.

Definition at line 180 of file xAODEventSelector.h.

◆ m_inputCollectionsName

StringArrayProperty Athena::xAODEventSelector::m_inputCollectionsName
private

List of input files containing TTree.

Definition at line 187 of file xAODEventSelector.h.

◆ m_inputFileGuard

std::optional<InputFileIncidentGuard> Athena::xAODEventSelector::m_inputFileGuard
mutableprivate

RAII guard: guarantees a matching EndInputFile for every BeginInputFile.

Definition at line 245 of file xAODEventSelector.h.

◆ m_metadataName

StringProperty Athena::xAODEventSelector::m_metadataName
private

Name of TTree to load from metadata of input files.

Definition at line 193 of file xAODEventSelector.h.

◆ m_nbrEvts

long Athena::xAODEventSelector::m_nbrEvts
mutableprivate

Number of Events read so far.

Definition at line 199 of file xAODEventSelector.h.

◆ m_needReload

bool Athena::xAODEventSelector::m_needReload
mutableprivate

Definition at line 218 of file xAODEventSelector.h.

◆ m_ometaStore

ServiceHandle<StoreGateSvc> Athena::xAODEventSelector::m_ometaStore
private

Pointer to the StoreGateSvc output metadata store.

Definition at line 174 of file xAODEventSelector.h.

◆ m_poolSvc

ServiceHandle<IPoolSvc> Athena::xAODEventSelector::m_poolSvc
private

Handle to the PoolSvc (used in Hybrid mode when user is reading metadata with pool).

Definition at line 182 of file xAODEventSelector.h.

◆ m_ppSvc

ServiceHandle<IProxyProviderSvc> Athena::xAODEventSelector::m_ppSvc
private

Handle to the proxy provider svc.

Definition at line 184 of file xAODEventSelector.h.

◆ m_printEventProxyWarnings

bool Athena::xAODEventSelector::m_printEventProxyWarnings = true
private

Definition at line 242 of file xAODEventSelector.h.

◆ m_printPerfStats

bool Athena::xAODEventSelector::m_printPerfStats = false
private

Definition at line 240 of file xAODEventSelector.h.

◆ m_readMetadataWithPool

bool Athena::xAODEventSelector::m_readMetadataWithPool = false
private

Definition at line 238 of file xAODEventSelector.h.

◆ m_rootAddresses

std::unordered_map<SG::TransientAddress*, bool> Athena::xAODEventSelector::m_rootAddresses
private

Definition at line 223 of file xAODEventSelector.h.

◆ m_skipEvts

long Athena::xAODEventSelector::m_skipEvts
private

Number of events to skip at the beginning.

Definition at line 196 of file xAODEventSelector.h.

◆ m_tevent

xAOD::xAODTEvent* Athena::xAODEventSelector::m_tevent
mutableprivate

current TEvent being read

Definition at line 227 of file xAODEventSelector.h.

◆ m_tevent_entries

long Athena::xAODEventSelector::m_tevent_entries
mutableprivate

Definition at line 232 of file xAODEventSelector.h.

◆ m_tfile

TFile* Athena::xAODEventSelector::m_tfile
mutableprivate

current TFile being read

Definition at line 230 of file xAODEventSelector.h.

◆ m_tupleName

StringProperty Athena::xAODEventSelector::m_tupleName
private

Name of TTree to load from collection of input files.

Definition at line 190 of file xAODEventSelector.h.


The documentation for this class was generated from the following files: