/* BOREXINO Reconstruction program * * Author: Marcin Misiaszek * Maintainer: Alessandro Razeto * * $Id: bx_barn.hh,v 1.4 2006/08/21 14:40:49 razeto Exp $ * * A repository for db objects, to be used from root file. * Store db_calib, db_profile, db_run and db_channel. * */ #ifndef _BX_BARN_H #define _BX_BARN_H #include #include #include #include #ifdef G__DICTIONARY // to be used in dictionary #include "db_run.hh" #include "db_profile.hh" #include "db_calib.hh" #include "db_channel.hh" #include "bx_detector.hh" #else class db_run; class db_profile; class db_calib; class db_channel; class bx_detector; #endif class bx_barn: public TNamed { public: bx_barn (): TNamed () {} // List of run number present in bx_barn const std::vector& get_run_list () const { return v_run_list; } // DB visitors const db_run *get_db_run (int i_run) { return m_run_runs[i_run]; } const db_profile *get_db_profile (int i_run) { return m_run_profiles[i_run]; } const db_calib *get_db_calib (int i_run) { return m_run_calibs[i_run]; } const db_channel *get_db_channel (int i_run, int i_lg) { return (*(m_run_channels[i_run]))[i_lg]; }; typedef std::map map_channels; const map_channels& get_db_channels_map (int i_run) { return *m_run_channels [i_run]; }; // BxDetector const bx_detector* get_bx_detector (int i_run) { return m_run_detector[i_run]; } private: std::vector v_run_list; std::map m_run_channels; std::map m_run_profiles; std::map m_run_runs; std::map m_run_calibs; std::map m_run_detector; bx_barn (char* name, const char* title); friend class barn_interface; ClassDef(bx_barn,1) }; #endif /* * $Log$ */