Back to home page

sPhenix code displayed by LXR

 
 

    


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

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