Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:52

0001 #include "MbdPmtContainerV1.h"
0002 #include "MbdPmtHitV1.h"
0003 #include "MbdReturnCodes.h"
0004 
0005 #include <TClonesArray.h>
0006 
0007 #include <iostream>
0008 
0009 static const int NPMTMBDV1 = 128;
0010 
0011 MbdPmtContainerV1::MbdPmtContainerV1() : MbdPmtHits(new TClonesArray("MbdPmtHitV1", NPMTMBDV1))
0012 {
0013   // MbdPmtHit is class for single hit (members: pmt,adc,tdc0,tdc1), do not mix
0014   // with TClonesArray *MbdPmtHits
0015   
0016 }
0017 
0018 MbdPmtContainerV1::~MbdPmtContainerV1()
0019 {
0020   delete MbdPmtHits;
0021 }
0022 
0023 int MbdPmtContainerV1::isValid() const
0024 {
0025   if (npmt <= 0)
0026   {
0027     return 0;
0028   }
0029   return 1;
0030 }
0031 
0032 void MbdPmtContainerV1::Reset()
0033 {
0034   MbdPmtHits->Clear();
0035   npmt = 0;
0036 }
0037 
0038 void MbdPmtContainerV1::identify(std::ostream &out) const
0039 {
0040   out << "identify yourself: I am a MbdPmtContainerV1 object" << std::endl;
0041 }