62    typedef std::vector<std::string> 
Files;
 
 
  110using namespace Gaudi;
 
  124  if ( !status.
isSuccess() ) { 
return error( 
"Error initializing base class Service!" ); }
 
  127  if ( !ipers ) { 
return error( 
"Unable to locate IPersistencySvc interface of " + 
m_persName ); }
 
  130  status = ipers->getService( itm.
name(), cnvSvc );
 
  132    status = ipers->getService( itm.
type(), cnvSvc );
 
  134      return error( 
"Unable to locate IConversionSvc interface of database type " + 
m_cnvSvcName );
 
  146  if ( !eds ) { 
return error( 
"Unable to localize service EventDataSvc" ); }
 
 
  175    TBranch* b = pCtxt->
branch();
 
  180      if ( fileit != pCtxt->
files().end() ) {
 
  193        m_dbMgr->disconnect( in ).ignore();
 
  199    long     ent  = pCtxt->
entry();
 
  200    Long64_t nent = b->GetEntries();
 
  201    if ( nent > ( ent + 1 ) ) {
 
 
  218    for ( 
int i = 0; i < jump; ++i ) {
 
  220      if ( !status.
isSuccess() ) { 
return status; }
 
 
  229  return error( 
"EventSelector Iterator, operator -- not supported " );
 
 
  235    for ( 
int i = 0; i < jump; ++i ) {
 
  237      if ( !status.
isSuccess() ) { 
return status; }
 
 
  249    if ( fileit != pCtxt->
files().end() ) {
 
  250      string input = *fileit;
 
  251      m_dbMgr->disconnect( input ).ignore();
 
 
  266    long ent = pctxt->
entry();
 
  269      if ( fileit != pctxt->
files().end() ) {
 
  271        const unsigned long ipar[2] = { 0, (
unsigned long)ent };
 
 
  295  string                  db, typ, item, sel, stmt, aut, addr;
 
  297    if ( criteria.compare( 0, 5, 
"FILE " ) == 0 ) {
 
  300      db = criteria.substr( 5 );
 
  303      for ( 
auto attrib : Parser( criteria ) ) {
 
  304        string tmp = attrib.tag.substr( 0, 3 );
 
  305        if ( tmp == 
"DAT" ) {
 
  306          db = std::move( attrib.value );
 
  307        } 
else if ( tmp == 
"OPT" ) {
 
  308          if ( attrib.value.compare( 0, 3, 
"REA" ) != 0 ) {
 
  309            log << 
MSG::ERROR << 
"Option:\"" << attrib.value << 
"\" not valid" << 
endmsg;
 
  312        } 
else if ( tmp == 
"TYP" ) {
 
  313          typ = std::move( attrib.value );
 
  314        } 
else if ( tmp == 
"ADD" ) {
 
  315          item = std::move( attrib.value );
 
  316        } 
else if ( tmp == 
"SEL" ) {
 
  317          sel = std::move( attrib.value );
 
  318        } 
else if ( tmp == 
"FUN" ) {
 
  319          stmt = std::move( attrib.value );
 
  320        } 
else if ( tmp == 
"AUT" ) {
 
  321          aut = std::move( attrib.value );
 
  322        } 
else if ( tmp == 
"COL" ) {
 
  323          addr = std::move( attrib.value );
 
  335      int ipos = rest.find_first_not_of( 
" ," );
 
  336      if ( ipos == -1 ) 
break;
 
  337      rest     = rest.substr( ipos, string::npos ); 
 
  338      int lpos = rest.find_first_of( 
" ," );        
 
  340      files.push_back( rest.substr( 0, lpos == -1 ? string::npos : lpos ) ); 
 
  341      if ( lpos == -1 ) 
break;
 
  342      rest = rest.substr( lpos, string::npos ); 
 
  348  return error( 
"Invalid iteration context." );
 
 
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
const std::string & fid() const
Access file id.
Concrete implementation of the IDataConnection interface to access ROOT files.
TBranch * getBranch(std::string_view section, std::string_view branch_name)
Access data branch by name: Get existing branch in read only mode.
ROOT specific event selector context.
TBranch * m_branch
Reference to the top level branch (typically /Event) used to iterate.
Files::const_iterator fileIterator() const
Access to the file iterator.
long entry() const
Access to the current event entry number.
Files m_files
The file container managed by this context.
long m_entry
Current entry of current file.
const Files & files() const
Access to the file container.
void * identifier() const override
Context identifier.
TBranch * branch() const
Access to the top level branch (typically /Event) used to iterate.
const std::string & fid() const
Access connection fid.
void setFiles(const Files &f)
Set the file container.
std::string m_fid
Connection fid.
void setEntry(long e)
Set current event entry number.
Files::const_iterator m_fiter
The iterator to the.
void setFileIterator(Files::const_iterator i)
Set file iterator.
void setFID(const std::string &fid)
Set connection FID.
const RootEvtSelector * m_sel
Reference to the hosting event selector instance.
void setBranch(TBranch *b)
Set the top level branch (typically /Event) used to iterate.
RootEvtSelectorContext(const RootEvtSelector *s)
Standard constructor with initialization.
std::vector< std::string > Files
Definition of the file container.
Concrete event selector implementation to access ROOT files.
StatusCode rewind(Context &refCtxt) const override
Rewind the dataset.
StatusCode resetCriteria(const std::string &cr, Context &c) const override
Will set a new criteria for the selection of the next list of events and will change the state of the...
StatusCode releaseContext(Context *&refCtxt) const override
Release existing event iteration context.
CLID m_rootCLID
Class id of root node to create opaque address.
StatusCode next(Context &refCtxt) const override
Get next iteration item from the event loop context.
StatusCode initialize() override
IService implementation: Db event selector override.
StatusCode error(const std::string &msg) const
Helper method to issue error messages.
StatusCode createContext(Context *&refpCtxt) const override
Create a new event loop context.
StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&) const override
Create new Opaque address corresponding to the current record.
StatusCode previous(Context &refCtxt) const override
Get previous iteration item from the event loop context.
StatusCode last(Context &refContext) const override
Access last item in the iteration.
StatusCode finalize() override
IService implementation: Service finalization.
Gaudi::Property< std::string > m_persName
std::string m_cnvSvcName
Property; Name of the concversion service used to create opaque addresses.
std::string m_rootName
Property: Name of the ROOT entry name.
RootCnvSvc * m_dbMgr
Reference to the corresponding conversion service.
Parse attribute strings allowing iteration over the various attributes.
Helper class to parse a string of format "type/name".
const std::string & type() const
const std::string & name() const
virtual unsigned long release() const =0
Release Interface instance.
Opaque address interface definition.
Data persistency service interface.
virtual SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
Definition of the MsgStream class used to transmit messages.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
StatusCode finalize() override
const std::string & name() const override
Retrieve name of the service.
StatusCode initialize() override
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...