/** @file CbmDigi.h ** @author Volker Friese ** @date 23.05.2019 **/ #ifndef CBMDIGI_H #define CBMDIGI_H 1 #include #include #include "TObject.h" /** @class CbmDigi ** @brief Base class for persistent representation of digital information. ** @author V.Friese ** @since 30.04.2013 ** @version 23.05.2019 ** ** CbmDigi is an abstract base class for the ROOT representation of ** the smallest information unit delivered by the detector front-ends. ** It is equivalent to the message of a single electronics channel. ** The information content is the channel address (unique identifier), ** the time stamp and (optionally) the charge (ADC). ** ** Unlike the data class used to actually transport the information ** through the data acquisition ("message"), the digi contains ** context-free information, i.e. absolute time and unique address. ** ** The CbmDigi base class does not contain any data members. The actual ** representation of address, time and charge is left to the derived classes. **/ class CbmDigi : public TObject { public: /** Default constructor **/ CbmDigi(); /** Destructor **/ virtual ~CbmDigi(); /** @brief Unique channel address **/ virtual Int_t GetAddress() const = 0; /** @brief Charge (optional) **/ virtual Double_t GetCharge() const { return 0.; } /** @brief System (enum DetectorId) **/ virtual Int_t GetSystemId() const = 0; /** @brief Absolute time [ns] **/ virtual Double_t GetTime() const = 0; /** @brief Output information **/ virtual std::string ToString() const; ClassDef(CbmDigi,3); }; typedef std::unique_ptr up_CbmDigi; #endif