Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:06

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef FFAOBJECTS_EVENTHEADERV2_H
0004 #define FFAOBJECTS_EVENTHEADERV2_H
0005 
0006 /*!
0007  * \file EventHeaderv2.h
0008  * \author Hugo Pereira Da Costa <hugo.pereira-da-costa@cea.fr>
0009  */
0010 
0011 #include "EventHeaderv1.h"
0012 
0013 #include <cstdint>   // for int64_t
0014 #include <iostream>  // for cout, ostream
0015 
0016 class PHObject;
0017 
0018 //! simple event header with ID and time
0019 class EventHeaderv2 : public EventHeaderv1
0020 {
0021  public:
0022   //! ctor
0023   EventHeaderv2() = default;
0024 
0025   //! dtor
0026   ~EventHeaderv2() override = default;
0027 
0028   //! clone
0029   PHObject* CloneMe() const override
0030   {
0031     return new EventHeaderv2(*this);
0032   }
0033 
0034   ///  Clear Event
0035   void Reset() override;
0036 
0037   /*!
0038    * identify Function from PHObject
0039    * @param os Output Stream
0040    */
0041   void identify(std::ostream& out = std::cout) const override;
0042 
0043   void CopyTo(EventHeader*) override;
0044 
0045   //! bunch crossing
0046   void set_BunchCrossing(int64_t value) override
0047   {
0048     m_bunchCrossing = value;
0049   }
0050 
0051   //! bunch crossing
0052   int64_t get_BunchCrossing() const override
0053   {
0054     return m_bunchCrossing;
0055   }
0056 
0057  private:
0058   //! bunch crossing id
0059   int64_t m_bunchCrossing{0};
0060 
0061   ClassDefOverride(EventHeaderv2, 2)
0062 };
0063 
0064 #endif