// // File : EyeRunTrailer.hh // // Purpose: Header file for EyeRunTrailer.cc, // containing the class declaration for TEyeRunTrailer // // $Id: EyeRunTrailer.hh 12083 2011-02-21 17:11:42Z mathes $ // #ifndef _EyeRunTrailer_hh_ #define _EyeRunTrailer_hh_ #include #include /** @file EyeRunTrailer.hh * Declaration of the class TEyeRunTrailer. * @author H.-J. Mathes, FzK */ // --- forward declaration(s) class TMirrorRunTrailer; #include #include /** Class for the run trailer of an Eye RUN. */ class TEyeRunTrailer : public TObject { public: /** Constructor for the class TEyeRunTrailer. * All data memebers are set to 0. */ TEyeRunTrailer(); /** Copy constructor of the class TEyeRunTrailer. */ TEyeRunTrailer(const TEyeRunTrailer& rhs) : TObject(rhs) { *this = rhs; } /** Destructor of the class TEyeRunTrailer. */ virtual ~TEyeRunTrailer(); /** Assignment operator of the class TEyeRunTrailer. */ TEyeRunTrailer& operator=(const TEyeRunTrailer&); /** Add the contents of the TMirrorRunTrailer for the specified mirror_id. */ void AddMirrorRunTrailer(const TMirrorRunTrailer*,unsigned int mirror_id); /** Add a time interval to a mirrors individual accumulated life time. */ void AddToLifeTimeCounter(int,unsigned int mirror_id); /** Clear the contents of the TEyeRunTrailer. */ virtual void Clear(Option_t *option=""); /** Print the contents of this object to the specified ostream. */ void Show(std::ostream& ostr=std::cout) const; // --- getters /** Get a mirrors individual accumulated dead time. */ unsigned long long GetDeadTimeCounter(unsigned int) const; /** Get the total dead time caused by the Eye DAQ. */ unsigned long long GetEyeDaqDeadTime() const { return fEyeDaqDeadTime; } /** Get a mirrors individual accumulated life time. */ unsigned int GetLifeTimeCounter(unsigned int) const; /** Get the total dead time [* 100 nsec] caused by each * individual Mirror DAQ. */ unsigned long long GetMirrorDaqDeadTime(unsigned int) const; /** Get the number of skipped triggers caused by each individual Mirror DAQs burst rejection. */ unsigned int GetMirrorNSkippedTriggers(unsigned int) const; /** Get the bit vector indicating Mirrors present or not. */ unsigned int GetMirrorStatus() { return fMirrorStatus; } /** Get the total number of T3 during this RUN (includes the rejected T3). */ unsigned int GetNumberOfT3() const { return fNT3; } /** Get the total number of rejected T3 during this RUN. */ unsigned int GetNumberOfRejectedT3() const { return fNRejectedT3; } /** Get a reference to the start time object. */ const FdRoot::TTimeStamp& GetStartTime() const { return fStartTime; } /** Get a reference to the stop time object. * * All time related values are zero if the RUN is not stopped yet. */ const FdRoot::TTimeStamp& GetStopTime() const { return fStopTime; } /** Get the total dead time [sec] for T3-CDAS due to the T3-CDAS VETO. */ float GetTotalT3DeadTime() const { return fTotalT3DeadTime; } /** Get the accumulated VETO time until this event. */ unsigned long long GetVetoTimeCounter() const { return fVetoTimeCounter; } /** Test if the specified mirror was present in the DAQ (obsolete). * * @param mirror_id the mirrors id, range 1 .. 6 * * Note: This variable is set at the end of a RUN. */ Bool_t IsMirrorPresent(unsigned int mirror_id) const; // --- setters /** Set the value for a Mirrors individual dead time counter. */ void SetDeadTimeCounter(unsigned long long,unsigned int mirror_id); /** Set the total dead time caused by the Eye DAQ. */ void SetEyeDaqDeadTime(unsigned long long dead_time) { fEyeDaqDeadTime = dead_time; } /** Set the value for a Mirrors individual dead time counter. */ void SetLifeTimeCounter(unsigned int,unsigned int mirror_id); /** Set the total dead time caused by each individual Mirror DAQ. */ void SetMirrorDaqDeadTime(unsigned long long,unsigned int mirror_id); /** Set the number of skipped triggers caused by each individual Mirror * DAQs burst rejection. */ void SetMirrorNSkippedTriggers(unsigned int,unsigned int mirror_id); /** Set a flag that mirror is present in this RUN. */ void SetMirrorPresent(unsigned int); /** Set the bit vector indicating Mirrors present or not. */ void SetMirrorStatus(unsigned int status) { fMirrorStatus = (unsigned char)(status & 0x3f); } /** Set the number of events acquired by this run. */ void SetNEvents(unsigned int n_events) { fNEvents = n_events; } /** Set the number of total T3 of this RUN. */ void SetNumberOfRejectedT3(unsigned int n_reject) { fNRejectedT3 = n_reject; } /** Set the number of total T3 of this RUN. */ void SetNumberOfT3(unsigned int n_t3) { fNT3 = n_t3; } /** Set the start time of the current RUN. */ void SetStartTime(const FdRoot::TTimeStamp& t) { fStartTime = t; } /** Set the start time of the current RUN to the current time. The nano * time is set to 0. */ void SetStartTime(); /** Set the stop time of the current RUN. */ void SetStopTime(const FdRoot::TTimeStamp& t) { fStopTime = t; } /** Set the stop time of the current RUN to the current time. The nano * time is set to 0. */ void SetStopTime(); /** Set the total time for this RUN, i.e. the number of seconds since the * RUN was started. */ void SetTotalTime(unsigned int total_time=0); /** Set the total dead time [sec] for T3-CDAS due to the T3-CDAS VETO. */ void SetTotalT3DeadTime(float t3_deadtime) { fTotalT3DeadTime = t3_deadtime; } /** Set the value for the VETO time counter. This value is the * same for all telescopes of an Eye building. */ void SetVetoTimeCounter(ULong64_t veto_ctr) { fVetoTimeCounter = veto_ctr; } private: UChar_t fMirrorStatus; // bit for each mirror in DAQ UInt_t fNEvents; // number of events in the file ULong64_t fVetoTimeCounter; // accumulated VETO time ULong64_t fDeadTimeCounter[FdUtil::Fd::kEYE_NMIRRORS]; // accumulated, individual DEAD time UInt_t fLifeTimeCounter[FdUtil::Fd::kEYE_NMIRRORS]; // accumulated, individual life time [sec] ULong64_t fMirrorDaqDeadTime[FdUtil::Fd::kEYE_NMIRRORS]; // acc. DAQ dead times UInt_t fMirrorNSkippedTriggers[FdUtil::Fd::kEYE_NMIRRORS]; ULong64_t fEyeDaqDeadTime; UInt_t fNT3; // total number of T3, incl. rejected UInt_t fNRejectedT3; // number of T3 rejected by T3-CDAS VETO float fTotalT3DeadTime; // acc. deadtime by T3-CDAS VETO FdRoot::TTimeStamp fStartTime; // timestamp when the RUN was started FdRoot::TTimeStamp fStopTime; // timestamp when the RUN was stopped UInt_t fTotalTime; // total number of seconds of the RUN // is set to zero before the RUN is stopped ClassDef(TEyeRunTrailer,EyeEVENTVERSIONv3) }; #endif // _EyeRunTrailer_hh_