#ifndef TDigit_hxx_seen #define TDigit_hxx_seen #include #include #include "IDatum.hxx" #include "IChannelId.hxx" #include "ITrigger.hxx" #include "IDigitContainer.hxx" namespace COMET { /// Base class for all exceptions associated with the IDigit classes. OA_EXCEPTION(EDigit,EoaCore); /// An exception that should be thrown when the user requests information /// from the digit that is not available. OA_EXCEPTION(EInvalidDigitRequest,EDigit); // The abstract base class for electronics data. class IDigit; // A handle to reference a IDigit object that may or may not be available. class IDigitProxy; class ITrigger; } /// An abstract base class for raw digits. This base class for detector /// specific digit classes. There are derived classes which define the /// methods, and which actually contain the data associated with the object. class COMET::IDigit : public TObject { public: IDigit (); /// Construct a digit for a particular channel and cycle number. /** Sice the trigger is not set, expected to be obsoleted. */ explicit IDigit(const COMET::IChannelId& channel); /// Construct a digit for a paticular channel and trigger IDigit(const COMET::IChannelId& channel, COMET::ITrigger* trigger); virtual ~IDigit(); /// Return the channel identifier for this digit. const COMET::IChannelId& GetChannelId() const; /// Return the trigger related to this digit const COMET::IHandle& GetTrigger() const; /// Print the digit information. virtual void ls(Option_t* opt = "") const; protected: /// The electronics id number. COMET::IChannelId fChannelId; /// Trigger related to this digit. /** This is a temporarily treatment, probably it should be better to implement ITriggerProxy like IDigitProxy in the future. */ COMET::IHandle fTrigger; ClassDef(IDigit, 2); }; #endif