#ifndef TDigitContainer_hxx_seen #define TDigitContainer_hxx_seen #include #include #include "IDatum.hxx" #include "IDigit.hxx" namespace COMET { class IDigit; class IDigitHeader; class IDigitContainer; } /// A container for IDigit and IDigitHeader objects. The IDigitContainer /// class holds a representation of the uncalibrated electronics data and is /// generated from two sources. For data, the IDigitContainer is dynamically /// generated from the MIDAS information saved in ICOMETRawEvent. For Monte /// Carlo, the IDigitContainer is saved with the event (instead of saving a /// ICOMETRawEvent). The information inside of the IDigitContainer is usually /// only accessed by the calibration routines, but can be accessed from the /// final THitObjects using the IDigitProxy which references the contributing /// IDigit. class COMET::IDigitContainer : public COMET::IDatum, public std::vector { public: IDigitContainer(const char* name = "digits", const char* title = "Digit Pointers"); ~IDigitContainer(); /// Get a header out of the container. These headers provide information /// needed to calibrate the digits in this container. COMET::IDigitHeader *const GetHeader(int i) const; /// Get the total number of headers in the container. unsigned int GetHeaderCount() const {return fHeaders.size();} /// Add a header to the container. void AddHeader(COMET::IDigitHeader* header); /// Return the signature of this digit container. The signature is used /// by the proxy to make sure that the correct IDigitContainer is being /// referenced. unsigned int GetSignature() const; /// Print the datum information. virtual void ls(Option_t* opt = "") const; private: /// A vector of headers. std::vector fHeaders; /// The signature of this container. mutable unsigned int fSignature; //! Do not save. ClassDef(IDigitContainer,1); }; #endif