Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-02 08:12:56

0001 #include "MbdRawContainerV2.h"
0002 #include "MbdRawHitV2.h"
0003 #include "MbdReturnCodes.h"
0004 #include "MbdDefs.h"
0005 
0006 #include <TClonesArray.h>
0007 
0008 #include <iostream>
0009 
0010 MbdRawContainerV2::MbdRawContainerV2() : MbdRawHits(new TClonesArray("MbdRawHitV2", MbdDefs::MBD_N_PMT))
0011 {
0012   // MbdRawHit is class for single hit (members: pmt,adc,ttdc,qtdc), do not mix
0013   // with TClonesArray *MbdRawHits
0014   
0015 }
0016 
0017 MbdRawContainerV2::~MbdRawContainerV2()
0018 {
0019   delete MbdRawHits;
0020 }
0021 
0022 int MbdRawContainerV2::isValid() const
0023 {
0024   if (npmt <= 0)
0025   {
0026     return 0;
0027   }
0028   return 1;
0029 }
0030 
0031 void MbdRawContainerV2::Reset()
0032 {
0033   MbdRawHits->Clear();
0034   npmt = 0;
0035 }
0036 
0037 void MbdRawContainerV2::identify(std::ostream &out) const
0038 {
0039   out << "identify yourself: I am a MbdRawContainerV2 object" << std::endl;
0040 }
0041 
0042 //______________________________________
0043 void MbdRawContainerV2::set_clocks(const Int_t ievt, const UShort_t iclk, const UShort_t ifemclk)
0044 {
0045   evt = ievt;
0046   clk = iclk;
0047   femclk = ifemclk;
0048 }
0049 
0050 Int_t MbdRawContainerV2::get_evt() const
0051 {
0052   return evt;
0053 }
0054 
0055 UShort_t MbdRawContainerV2::get_clock() const
0056 {
0057   return clk;
0058 }
0059 
0060 UShort_t MbdRawContainerV2::get_femclock() const
0061 {
0062   return femclk;
0063 }
0064