1 / 10

Accessing Event Data

Accessing Event Data. Event Data Reside In Data Store. Tree - similar to file system Identification by path ”/Event/MC/Particles” LHCb::MCParticleLocation::Default Objects or Containers of objects KeyedContainer<Type>. Containers: e.g. KeyedContainer. Templated class

jorn
Télécharger la présentation

Accessing Event Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Accessing Event Data

  2. Event Data Reside In Data Store • Tree - similar to file system • Identification by path”/Event/MC/Particles”LHCb::MCParticleLocation::Default • Objects or • Containers of objectsKeyedContainer<Type>

  3. Containers: e.g. KeyedContainer • Templated class • Usually hidden to end-user code by typedefs in header file • Iteration like any STL vector • //note LHCb:: namespace • LHCb::MCParticle::Container* parts = … ; • LHCb::MCParticle::Container::const_iterator i;for( i=parts->begin(); i != parts->end(); i++ ) • { info() << (*i)->particleID().pid() << endmsg;}

  4. Data Service Algorithm (3) Request load (1) get<class>(location) PersistencyService Request dispatcherSICB, ROOT,.. (5) Register Conversion Service (4) Request creation Converter Converter Converter Converter Understanding Data Stores: Loading Unsuccessful ifrequested object is not present (2) Search in Store Try to accessan object data Data Store

  5. Caveats • Consider Objects on the store asREAD-ONLY • Do not modify existing objects! • Do not destroy existing objects! • Never, never delete an object which is registered to the store • It’s not yours! • It will only screw up others!

  6. Data Access In GaudiAlgorithm • const LHCb::MCHeader* evt = • get<LHCb::MCHeader>( LHCb::MCHeaderLocation::Default ); • // No need to test a return code, this method throws • // an exception if data is not found

  7. Conventions • For Event Model objects of type TYPE: • The actual type stored in TES • LHCb::<TYPE>::Container • Vector of pointers [ std::vector<TYPE*> ] • LHCb::<TYPE>::Vector • Vector of “pointers-to-const” [ std::vector<const TYPE*> ] • LHCb::<TYPE>::ConstVector • “default” location in TES : • LHCb::<TYPE>Location::Default

  8. Specify Event Data Input EventSelector.Input = { “DATAFILE=‘a_filename’ [Spec]” [,“DATAFILE=‘another_filename’ [Spec]”] }; • Event data input is specified in the job options • [Spec] is an array of qualified strings:KEY1=‘VALUE1’ … KEYn=‘VALUEn’ • Several files can be specified, separated by a comma

  9. Specify POOL Event Input • EventSelector.Input = {"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/production/DC06/v1-lumi2/00001284/SIM/00001284_00000001_1.sim' TYP='POOL_ROOTTREE' OPT='READ'"} • PFN: keyword tells POOL this is a physical file name • castor: keyword selects data transfer protocol (rootd in this case)omit for a disk file • OPT=‘READ’ is read only file

  10. Specify POOL Event Input • For simple file on disk • EventSelector.Input ={ • "DATAFILE=‘/software/lhcb/BenderData/Bs2PsiPhi/00001395_00000005_5.dst' TYP='POOL_ROOTTREE' OPT='READ'"}

More Related