|
clas12root
|
#include <clas12reader.h>
Clas12root HIPO file reader.
Public Member Functions | |
| clas12reader ()=default | |
| clas12reader (const clas12reader &other, std::string filename="", std::vector< long > tags=std::vector< long >()) | |
| clas12reader (std::string filename, std::vector< long > tags=std::vector< long >()) | |
| virtual | ~clas12reader ()=default |
| void | addARegionBAND () |
| void | addARegionCDet () |
| void | addARegionFDet () |
| void | addARegionFT () |
| void | addAtLeastPid (short pid, short n) |
| uint | addBank (const std::string &name) |
| void | addExactPid (short pid, short n) |
| void | addZeroOfRestPid () |
| void | applyQA (const string &pass) |
| ccdb_reader * | ccdb () const |
| bool | checkTriggerBit (uint k) |
| bool | checkVTPTriggerBit (uint k) |
| void | clearEvent () |
| read the data | |
| void | connectDataBases (clas12databases *db) |
| Enable QA skimming. | |
| clas12databases * | db () |
| event_ptr | event () const |
| get a pointer to the REC::Event bank | |
| ftbevent_ptr | ftbevent () const |
| get a pointer to the REC::FTEvent bank | |
| std::vector< hipo::bank * > | getAllBanksPtrs () |
| hipo::bank * | getBank (uint index) const |
| int | getBankOrder (int ibank, std::string itemname) const |
| const std::vector< hipo::bank * > | getBanksPtrs (std::vector< std::string > names) const |
| std::vector< region_part_ptr > | getByCharge (int ch, bool const &applyBankFilter=false) const |
| Get the list of region_particles, filtered by charge. | |
| std::vector< region_part_ptr > | getByID (int id, bool const &applyBankFilter=false) const |
| Get the list of region_particles, filtered by PDG. | |
| std::vector< region_part_ptr > | getByRegion (int ir, bool const &applyBankFilter=false) const |
| Get the list of region_particles, filtered by region. | |
| double | getCurrApproxCharge () |
| std::vector< region_part_ptr > & | getDetParticles () |
| Get the full list of region_particles. | |
| std::vector< region_part_ptr > | getDetParticles (bool const &applyBankFilter) const |
| Get the list of region_particles. | |
| std::vector< region_part_ptr > * | getDetParticlesPtr () |
| Get the full list of region_particles. | |
| hipo::dictionary & | getDictionary () |
| std::string | getFilename () |
| class helflip & | getHELflip () const |
| get the HEL::flip bank | |
| class helonline & | getHELonline () const |
| get the HEL::online bank | |
| class mcevent & | getMCEvent () const |
| get the MC::Event bank | |
| class mcparticle & | getMCLund () const |
| get the MC::Lund bank | |
| int | getNParticles () const noexcept |
| Get the number of region_particles. | |
| short | getNPid (short pid) const noexcept |
| hipo::bank & | getParticleBank () const |
| get the particle bank, depending on your configuration | |
| const std::vector< short > & | getPids () const noexcept |
| class vtp & | getRAWvtp () const |
| get the RAW::vtp bank | |
| hipo::reader & | getReader () |
| class calorimeter & | getRECCalorimeter () const |
| get the REC::Calorimeter bank | |
| class cherenkov & | getRECCherenkov () const |
| get the REC::Cherenkov bank | |
| class covmatrix & | getRECCovMat () const |
| get the REC::CovMat bank | |
| class event & | getRECEvent () const |
| get the REC::Event bank | |
| class forwardtagger & | getRECForwardTagger () const |
| get the REC::ForwardTagger bank | |
| class ftbevent & | getRECFTEvent () const |
| get the REC::FTEvent bank | |
| class ftbparticle & | getRECFTParticle () const |
| get the REC::FTParticle bank | |
| class particle & | getRECParticle () const |
| get the REC::Particle bank | |
| class scintillator & | getRECScintillator () const |
| get the REC::Scintillator bank | |
| class tracker & | getRECTrack () const |
| get the REC::Track bank | |
| class traj & | getRECTraj () const |
| get the REC::Traj bank | |
| class utracker & | getRECUTrack () const |
| get the REC::UTrack bank | |
| class vertdoca & | getRECVertDoca () const |
| get the REC::VertDoca bank | |
| class rich & | getRICHParticle () const |
| get the RICH::Particle bank | |
| double | getRunBeamCharge () |
| class runconfig & | getRUNconfig () const |
| get the RUN::config bank | |
| int | getRunNumber () const |
| std::set< int > | getRunNumbers () const |
| void | getStructure (hipo::bank *bank) |
| bool | grabEvent (Long64_t Nev) |
| helflip_ptr | helflip () const |
| get a pointer to the HEL::flip bank | |
| helonline_ptr | helonline () const |
| get a pointer to the HEL::online bank | |
| void | ignoreBank (const string &bnk) |
| bool | isOpen () |
| mcevt_ptr | mcevent () const |
| get a pointer to the MC::Event bank | |
| mcpar_ptr | mcparts () const |
| get a pointer to the MC::Lund bank | |
| bool | next () |
| initialise next event from the reader | |
| bool | nextInRecord () |
| initialise next event from the reader | |
| bool | passPidSelect () |
| const std::vector< short > & | preCheckPids () |
| const std::vector< short > & | preCheckPidsOrCharge () |
| qadb_reader * | qadb () const |
| rcdb_reader * | rcdb () const |
| bool | readEvent () |
| runconfig_ptr | runconfig () const |
| get a pointer to the RUN::config bank | |
| scalerreader_ptr | scalerReader () |
| void | setEntries (long n) |
| void | SetReadAction (std::function< bool(clas12reader *)> readEventUserAction) |
| Set a "read action", a custom lambda function that is executed for every event within readEvent(). | |
| void | SetRecParticleOnly () |
| void | setVerbose (short level=1) |
| void | sort () |
| void | summary () |
| void | useFTBased () |
| use FT-based PID, rather than the default | |
| bool const | usingFTBased () const |
| vertdoca_ptr | vertdoca () const |
| get a pointer to the REC::VertDoca bank | |
| vtp_ptr | vtp () const |
| get a pointer to the RAW::vtp bank | |
Static Public Member Functions | |
| static int | readQuickRunConfig (const std::string &filename) |
| static int | tryTaggRunConfig (const std::string &filename, int tag) |
Protected Member Functions | |
| void | initReader () |
|
default |
| clas12::clas12reader::clas12reader | ( | std::string | filename, |
| std::vector< long > | tags = std::vector<long>() ) |
| clas12::clas12reader::clas12reader | ( | const clas12reader & | other, |
| std::string | filename = "", | ||
| std::vector< long > | tags = std::vector<long>() ) |
copy constructor opens a new reader Can give alternative filename
|
virtualdefault |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void clas12::clas12reader::clearEvent | ( | ) |
read the data
Function to query RCDB and record most relevant run conditions. This is only called once to avoid overloading the database.
| void clas12::clas12reader::connectDataBases | ( | clas12databases * | db | ) |
Enable QA skimming.
Returns qadb_reader once declared connect to the data bases
|
inline |
|
inline |
get a pointer to the REC::Event bank
|
inline |
get a pointer to the REC::FTEvent bank
|
inline |
|
inline |
|
inline |
|
inline |
| std::vector< region_part_ptr > clas12::clas12reader::getByCharge | ( | int | ch, |
| bool const & | applyBankFilter = false ) const |
Get the list of region_particles, filtered by charge.
| ch | The charge |
| applyBankFilter | If true, apply any hipo::bank filters (e.g., from iguana) |
| std::vector< region_part_ptr > clas12::clas12reader::getByID | ( | int | id, |
| bool const & | applyBankFilter = false ) const |
Get the list of region_particles, filtered by PDG.
| id | The PDG |
| applyBankFilter | If true, apply any hipo::bank filters (e.g., from iguana) |
| std::vector< region_part_ptr > clas12::clas12reader::getByRegion | ( | int | ir, |
| bool const & | applyBankFilter = false ) const |
Get the list of region_particles, filtered by region.
| ir | The region |
| applyBankFilter | If true, apply any hipo::bank filters (e.g., from iguana) |
|
inline |
|
inline |
Get the full list of region_particles.
| std::vector< region_part_ptr > clas12::clas12reader::getDetParticles | ( | bool const & | applyBankFilter | ) | const |
Get the list of region_particles.
| applyBankFilter | If true, apply any hipo::bank filters (e.g., from iguana) |
|
inline |
Get the full list of region_particles.
|
inline |
|
inline |
|
inline |
get the HEL::flip bank
|
inline |
get the HEL::online bank
|
inline |
get the MC::Event bank
|
inline |
get the MC::Lund bank
|
inlinenoexcept |
Get the number of region_particles.
|
inlinenoexcept |
|
inline |
get the particle bank, depending on your configuration
|
inlinenoexcept |
|
inline |
get the RAW::vtp bank
|
inline |
|
inline |
get the REC::Calorimeter bank
|
inline |
get the REC::Cherenkov bank
|
inline |
get the REC::CovMat bank
|
inline |
get the REC::Event bank
|
inline |
get the REC::ForwardTagger bank
|
inline |
get the REC::FTEvent bank
|
inline |
get the REC::FTParticle bank
|
inline |
get the REC::Particle bank
|
inline |
get the REC::Scintillator bank
|
inline |
get the REC::Track bank
|
inline |
get the REC::Traj bank
|
inline |
get the REC::UTrack bank
|
inline |
get the REC::VertDoca bank
|
inline |
get the RICH::Particle bank
|
inline |
|
inline |
get the RUN::config bank
|
inline |
|
inline |
|
inline |
| bool clas12::clas12reader::grabEvent | ( | Long64_t | Nev | ) |
|
inline |
get a pointer to the HEL::flip bank
|
inline |
get a pointer to the HEL::online bank
|
inline |
|
protected |
|
inline |
|
inline |
get a pointer to the MC::Event bank
|
inline |
get a pointer to the MC::Lund bank
| bool clas12::clas12reader::next | ( | ) |
initialise next event from the reader
| bool clas12::clas12reader::nextInRecord | ( | ) |
initialise next event from the reader
| bool clas12::clas12reader::passPidSelect | ( | ) |
| const std::vector< short > & clas12::clas12reader::preCheckPids | ( | ) |
This function may be called before readEvent to allow checking of Pids by external routines
| const std::vector< short > & clas12::clas12reader::preCheckPidsOrCharge | ( | ) |
|
inline |
|
inline |
| bool clas12::clas12reader::readEvent | ( | ) |
|
static |
Basically get the run number! will open and close a hipo file
|
inline |
get a pointer to the RUN::config bank
|
inline |
|
inline |
|
inline |
Set a "read action", a custom lambda function that is executed for every event within readEvent().
readEvent() is called by methods like clas12reader::next() and clas12root::HipoChain::Next()
| readEventUserAction | lambda function, where its argument is a pointer to an instance of this clas12reader class, and its bool return value controls whether to proceed with the event or not |
|
inline |
|
inline |
| void clas12::clas12reader::sort | ( | ) |
Loop over particles and find their region Add appropriate region_partcle to event particle vector
|
inline |
|
static |
|
inline |
use FT-based PID, rather than the default
|
inline |
|
inline |
get a pointer to the REC::VertDoca bank
|
inline |
get a pointer to the RAW::vtp bank