// CbntDataset.h #ifndef dset__CbntDataset_H #define dset__CbntDataset_H // David Adams // April 2003 // // EventDataset describing an ATLAS combined ntuple. The unit // of content is a block in this ntuple. Each block has // the same "type" and the distinguishing keys are the // block names. // // Inherits from GenericDataset. // Content and location are explicit. #include #include #include "dataset_base/GenericDataset.h" #include "dataset_file/Url.h" class HbookFile; namespace dset { class CbntDataset : public GenericDataset { public: // typedefs typedef std::vector FlagList; private: // data // Flags indicating which entries are included in the dataset. mutable bool m_have_evflags; mutable FlagList m_evflags; // Logical file. // Mutable so replica can be accesssed. mutable Url m_file; // HBOOK file. // Mutable so file can be opened and closed const. mutable HbookFile* m_phfile; private: // Hide assignment // Assignment. CbntDataset& operator=(const CbntDataset& rhs); public: // static functions // Content ID name for a combined ntuple block. static const char* content_id_name() { return "CombinedNTupleBlock"; } public: // functions // Constructor from file name. // Dataset is defined using all events and content in the specified file. // The lock status is set to locked. CbntDataset(Url file, bool locked =true); // Constructor from a generic dataset. CbntDataset(const GenericDataset& gdst); // Copy constructor. CbntDataset(const CbntDataset& rhs); // Destructor. ~CbntDataset(); // Return the logical file. Url file() const; // Return the (readonly) physical file. std::string filename() const; // Return the HBOOK file. // Name safe for use with PAW can be found here. HbookFile& hbook_file() const; // Return the list of flags indicating which ntuple entries are // included in the dataset. // These are in the order in which the events appear in the ntuple. const FlagList& event_flags() const; public: // virtual functions // Select content. // Not implemented but could easily be added. int select(const Content& con); }; } // end namespace dset #endif