Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:20:20

0001 #include "MbdRawContainerV1.h"
0002 #include "MbdRawHitV1.h"
0003 #include "MbdReturnCodes.h"
0004 #include "MbdDefs.h"
0005 
0006 #include <TClonesArray.h>
0007 
0008 #include <iostream>
0009 
0010 MbdRawContainerV1::MbdRawContainerV1() : MbdRawHits(new TClonesArray("MbdRawHitV1", 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 MbdRawContainerV1::~MbdRawContainerV1()
0018 {
0019   delete MbdRawHits;
0020 }
0021 
0022 int MbdRawContainerV1::isValid() const
0023 {
0024   if (npmt <= 0)
0025   {
0026     return 0;
0027   }
0028   return 1;
0029 }
0030 
0031 void MbdRawContainerV1::Reset()
0032 {
0033   MbdRawHits->Clear();
0034   npmt = 0;
0035 }
0036 
0037 void MbdRawContainerV1::identify(std::ostream &out) const
0038 {
0039   out << "identify yourself: I am a MbdRawContainerV1 object" << std::endl;
0040 }
0041 
0042 //______________________________________
0043 void MbdRawContainerV1::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 MbdRawContainerV1::get_evt() const
0051 {
0052   return evt;
0053 }
0054 
0055 UShort_t MbdRawContainerV1::get_clock() const
0056 {
0057   return clk;
0058 }
0059 
0060 UShort_t MbdRawContainerV1::get_femclock() const
0061 {
0062   return femclk;
0063 }
0064