Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PulserSummaryList Class Reference

#include <PulserSummaryList.h>

List of all members.

Public Member Functions

 PulserSummaryList ()
 ~PulserSummaryList ()
 PulserSummaryList (const RawLIAdcSummaryBlock &)
void Add (const RawLIAdcSummaryBlock &)
void Finish ()
VldContext GetVldContext () const
Pulser::EPulseType GetPulseType () const
Int_t GetLed () const
Int_t GetPulserBox () const
Int_t GetHeight () const
Int_t GetWidth () const
Int_t GetNumPulses () const
Int_t GetPointIndex () const
Int_t GetExpectedPoints () const
Int_t GetAggregateNo () const
Int_t GetTriggers () const
Int_t GetIdent () const
const PulserSummaryGetHighPin () const
const PulserSummaryGetLowPin () const
std::map< Int_t, PulserSummary
>::const_iterator 
GetBegin () const
std::map< Int_t, PulserSummary
>::const_iterator 
GetEnd () const
std::map< Int_t, PulserSummary
>::const_iterator 
GetNearBegin () const
std::map< Int_t, PulserSummary
>::const_iterator 
GetNearEnd () const
std::map< Int_t, PulserSummary
>::const_iterator 
GetFarBegin () const
std::map< Int_t, PulserSummary
>::const_iterator 
GetFarEnd () const

Private Attributes

std::map< Int_t, PulserSummaryfNearMap
std::map< Int_t, PulserSummaryfFarMap
PulserSummaryfLowPin
PulserSummaryfHighPin
Int_t fTriggers
Pulser::EPulseType fPulseType
Int_t fLed
Int_t fPulserBox
Int_t fWidth
Int_t fHeight
Int_t fNumPulses
Int_t fPointIndex
Int_t fExpectedPoints
Int_t fIdent
PlexLedId fAggregateNo
VldContext fValidity
bool fUsePlex


Constructor & Destructor Documentation

PulserSummaryList::PulserSummaryList  ) 
 

Definition at line 57 of file PulserSummaryList.cxx.

References MSG.

00057                                      : 
00058   TNamed("PulserSummaryList","PulserSummaryList")
00059 {
00060   MSG("Pulser",Msg::kVerbose) <<" PulserSummaryList ctor \n";
00061   fLowPin = new PulserSummary();
00062   fHighPin = new PulserSummary();
00063   fTriggers=0;
00064   fUsePlex = false;
00065 }

PulserSummaryList::~PulserSummaryList  ) 
 

Definition at line 67 of file PulserSummaryList.cxx.

References MSG.

00068 {
00069   MSG("Pulser",Msg::kVerbose) <<" PulserSummaryList dtor \n";
00070   delete fLowPin;
00071   delete fHighPin;
00072 }

PulserSummaryList::PulserSummaryList const RawLIAdcSummaryBlock  ) 
 

Definition at line 75 of file PulserSummaryList.cxx.

References Add(), fAggregateNo, fExpectedPoints, fHeight, fHighPin, fIdent, fLed, fLowPin, fNumPulses, fPointIndex, fPulserBox, fTriggers, fUsePlex, fValidity, fWidth, RawLIAdcSummaryBlock::GetCalibPoint(), RawLIAdcSummaryBlock::GetCalibType(), VldContext::GetDetector(), RawLIAdcSummaryBlock::GetLed(), RawLIAdcSummaryBlock::GetPulseHeight(), RawLIAdcSummaryBlock::GetPulserBox(), RawLIAdcSummaryBlock::GetPulses(), RawLIAdcSummaryBlock::GetPulseWidth(), RawLIAdcSummaryBlock::GetVldContext(), and MSG.

00075                                                                         : 
00076   TNamed("PulserSummaryList","PulserSummaryList")
00077 {
00078   MSG("Pulser",Msg::kVerbose) <<
00079     " PulserSummaryList constructing from RawLIAdcSummary \n";
00080   fLowPin = new PulserSummary();
00081   fHighPin = new PulserSummary();
00082   fTriggers=0;
00083   fNumPulses = rawsum.GetPulses();
00084   fLed=rawsum.GetLed();
00085   fPulserBox=rawsum.GetPulserBox();
00086   fHeight=rawsum.GetPulseHeight();
00087   fWidth=rawsum.GetPulseWidth();
00088   fPointIndex=rawsum.GetCalibPoint();
00089   fExpectedPoints=rawsum.GetCalibType(); // Will be 1 for dougpoint, 
00090                                          // more than 1 for gaincurve
00091   fAggregateNo = PlexLedId(rawsum.GetVldContext().GetDetector(),
00092                            fPulserBox, fLed);
00093   fIdent = fLed + 100 * fExpectedPoints;
00094   fUsePlex = false;
00095   fValidity = rawsum.GetVldContext();
00096  this->Add(rawsum);
00097 }


Member Function Documentation

void PulserSummaryList::Add const RawLIAdcSummaryBlock  ) 
 

Definition at line 106 of file PulserSummaryList.cxx.

References PulserSummary::Add(), PlexStripEndId::BuildPlnStripEndKey(), fAggregateNo, fExpectedPoints, fFarMap, fHeight, fHighPin, fLed, fLowPin, fNearMap, fPointIndex, fPulserBox, fTriggers, fWidth, RawLIAdcSummaryBlock::GetCalibPoint(), RawLIAdcSummaryBlock::GetCalibType(), RawLIAdcSummary::GetChannel(), RawLIAdcSummaryBlock::GetDatumIter(), RawLIAdcSummary::GetEntries(), RawLIAdcSummaryBlock::GetLed(), PlexHandle::GetLedId(), RawLIAdcSummaryBlock::GetNumberOfSummaries(), PlexStripEndId::GetOppositeSEId(), PlexHandle::GetPinDiodeId(), PlexHandle::GetPinDiodeIds(), RawLIAdcSummaryBlock::GetPulseHeight(), RawLIAdcSummaryBlock::GetPulserBox(), RawLIAdcSummaryBlock::GetPulseWidth(), PlexHandle::GetReadoutType(), PlexHandle::GetSEIdAltL(), RawLIAdcSummaryBlock::GetVldContext(), max, MSG, and PulserSummary::SetPinDiodeId().

Referenced by PulserSummaryModule::EndRun(), PulserSummaryList(), and PulserSummaryModule::Reco().

00107 {
00108   // If we get here, we should be adding the same kinds of pulse
00109   // but just in case...
00110   MSG("Pulser",Msg::kVerbose) <<"LED "<<fLed<<"  "<<rawsum.GetLed()<<endl;
00111   MSG("Pulser",Msg::kVerbose) <<"H   "<<fHeight<<"  "<<rawsum.GetPulseHeight()<<endl;
00112   MSG("Pulser",Msg::kVerbose) <<"W   "<<fWidth<<"  "<<rawsum.GetPulseWidth()<<endl;
00113 
00114   assert(fLed==rawsum.GetLed());
00115   assert(fPulserBox==rawsum.GetPulserBox());
00116   assert(fHeight==rawsum.GetPulseHeight());
00117   assert(fWidth==rawsum.GetPulseWidth());
00118   assert(fPointIndex==rawsum.GetCalibPoint());
00119   assert(fExpectedPoints==rawsum.GetCalibType());
00120 
00121   //Get validity context
00122   VldContext vldc(rawsum.GetVldContext());
00123   PlexHandle plex(vldc);
00124 
00125   int numTriggers=0;
00126   std::pair<PlexPinDiodeId,PlexPinDiodeId> myPins = 
00127      plex.GetPinDiodeIds(fAggregateNo); // hi, low
00128   fHighPin->SetPinDiodeId(myPins.first);
00129   fLowPin->SetPinDiodeId(myPins.second);
00130   //myGetPinDiodeIds(plex,fAggregateNo);
00131 
00132   MSG("Pulser",Msg::kVerbose)<<"We have "<<rawsum.GetNumberOfSummaries() <<" summaries"<<endl;
00133   TIter rawit = rawsum.GetDatumIter(); 
00134   while (RawLIAdcSummary *rawch = 
00135          dynamic_cast<RawLIAdcSummary *>(rawit.Next())) {
00136       RawChannelId rcid = rawch->GetChannel();
00137       ReadoutType::Readout_t rt = plex.GetReadoutType(rcid);
00138       if (rawsum.GetNumberOfSummaries()<10) 
00139         MSG("Pulser",Msg::kVerbose) << "Channel "<<rcid<<endl; 
00140       if (rt & ReadoutType::kScintStrip) {
00141         MSG("Pulser",Msg::kVerbose) << "Got LI in strip at "<<rawch->GetChannel()<<endl;
00142         // Find out which strip-end we are. At CalDet, this is
00143         // a bit pointless, but...
00144         PlexSEIdAltL altlist = plex.GetSEIdAltL(rcid);
00145         for (PlexSEIdAltL::iterator it = altlist.begin(); 
00146              it!=altlist.end(); it++) {
00147           PlexStripEndId seid = (*it).GetSEId();
00148           
00149           if (plex.GetLedId(seid) == fAggregateNo) {
00150              MSG("Pulser",Msg::kVerbose) << "Got LI in strip "
00151                                          << seid << endl;
00152              // near end
00153              // MSG("Pulser",Msg::kVerbose) << "Near "<<rcid<<endl;
00154              fNearMap[seid.BuildPlnStripEndKey()].Add(*rawch,seid);
00155           }
00156           else if (plex.GetLedId(seid.GetOppositeSEId())==fAggregateNo) {
00157              MSG("Pulser",Msg::kVerbose) << "Got LI in strip "
00158                                          << seid << endl;
00159              // far end
00160              // MSG("Pulser",Msg::kVerbose) << "Far "<<rcid<<endl; 
00161              fFarMap[seid.BuildPlnStripEndKey()].Add(*rawch,seid);
00162           }
00163           else {
00164              // Crosstalk or such
00165              // MSG("Pulser",Msg::kVerbose) << "Xtalk "<<rcid<<endl; 
00166           }
00167         }
00168       }
00169       else if (rt & ReadoutType::kPinDiode) {
00170          MSG("Pulser",Msg::kVerbose) << "Got LI in PIN at "<<rawch->GetChannel()<<endl;
00171          PlexPinDiodeId pinid = plex.GetPinDiodeId(rcid);
00172          //     MSG("Pulser",Msg::kDebug)<<"PIN "<<rcid<<" is "<<pinid<<endl;
00173          if (pinid==myPins.first) {
00174             //High gain PIN
00175             //MSG("Pulser",Msg::kDebug)<<"High Gain PIN "<<rcid<<" is "<<pinid<<endl;
00176             fHighPin->Add(*rawch,pinid);
00177          }
00178          else if (pinid==myPins.second) {
00179             //Low Gain PIN
00180             //MSG("Pulser",Msg::kDebug)<<"Low Gain PIN "<<rcid<<" is "<<pinid<<endl;
00181             fLowPin->Add(*rawch,pinid);
00182          }
00183          //MSG("Pulser",Msg::kDebug)<<"Other PIN "<<pinid<<" with "<<rawch->GetEntries()<<endl;
00184          // Else not this LED's PIN
00185       }
00186       else if (rt & ReadoutType::kFlashTrigPMT) {
00187          MSG("Pulser",Msg::kVerbose) << "Got LI in trigger at "<<rawch->GetChannel()<<endl;
00188          numTriggers = max(numTriggers,int(rawch->GetEntries()));
00189       }
00190   }
00191   
00192   
00193   fTriggers +=numTriggers;
00194   MSG("Pulser",Msg::kDebug) << "Trig PMT: "<<numTriggers<<" of "<<fTriggers<<" triggers\n";
00195   
00196 }

void PulserSummaryList::Finish  ) 
 

Definition at line 198 of file PulserSummaryList.cxx.

References fFarMap, fHighPin, PulserSummary::Finish(), fLowPin, fNearMap, and fTriggers.

Referenced by PulserSummaryModule::EndRun(), and PulserSummaryModule::FinishList().

00199 {
00200   // Do zero correction here.
00201   for (std::map<Int_t,PulserSummary>::iterator it = fNearMap.begin();
00202        it!=fNearMap.end(); it++) (*it).second.Finish(fTriggers);
00203   for (std::map<Int_t,PulserSummary>::iterator it = fFarMap.begin();
00204        it!=fFarMap.end(); it++) (*it).second.Finish(fTriggers);
00205   fLowPin->Finish(fTriggers);
00206   fHighPin->Finish(fTriggers);
00207 }

Int_t PulserSummaryList::GetAggregateNo  )  const [inline]
 

Definition at line 53 of file PulserSummaryList.h.

References fAggregateNo, and PlexLedId::GetEncoded().

Referenced by PulserGainLog::Add(), PulserDBModule::AddToGC(), PulserDBModule::DriftPoint(), PulserCollectorModule::Reco(), PulserCollectorModule::ReferencePointReco(), PulserCollectorModule::WriteRawCurveData(), PulserCollectorModule::WriteRawDriftData(), and PulserCollectorModule::WriteReferenceDriftData().

00053 {return 0x7ff & fAggregateNo.GetEncoded();}

std::map<Int_t,PulserSummary>::const_iterator PulserSummaryList::GetBegin  )  const [inline]
 

Definition at line 60 of file PulserSummaryList.h.

References fNearMap.

00060 {return fNearMap.begin();}

std::map<Int_t,PulserSummary>::const_iterator PulserSummaryList::GetEnd  )  const [inline]
 

Definition at line 61 of file PulserSummaryList.h.

References fNearMap.

00061 {return fNearMap.end();}

Int_t PulserSummaryList::GetExpectedPoints  )  const [inline]
 

Definition at line 52 of file PulserSummaryList.h.

Referenced by PulserGainLog::Add(), PulserDBModule::AddToGC(), PEGainModule::DoMeanSigmaFromSums(), PulserSummaryModule::EndRun(), PulserDBModule::EndRun(), PulserSummaryModule::FinishList(), PulserSummaryModule::Reco(), PulserQDP::Reco(), PulserDBModule::Reco(), PulserCollectorModule::Reco(), and PulserCollectorModule::ReferencePointReco().

00052 {return fExpectedPoints;}

std::map<Int_t,PulserSummary>::const_iterator PulserSummaryList::GetFarBegin  )  const [inline]
 

Definition at line 64 of file PulserSummaryList.h.

References fFarMap.

Referenced by PulserDBModule::AddToGC(), PEGainModule::DoMeanSigmaFromSums(), PulserDBModule::DriftPoint(), PulserQDP::Reco(), PulserCollectorModule::Reco(), and PulserCollectorModule::ReferencePointReco().

00064 {return fFarMap.begin();}

std::map<Int_t,PulserSummary>::const_iterator PulserSummaryList::GetFarEnd  )  const [inline]
 

Definition at line 65 of file PulserSummaryList.h.

References fFarMap.

Referenced by PulserDBModule::AddToGC(), PEGainModule::DoMeanSigmaFromSums(), PulserDBModule::DriftPoint(), PulserQDP::Reco(), PulserCollectorModule::Reco(), and PulserCollectorModule::ReferencePointReco().

00065 {return fFarMap.end();}

Int_t PulserSummaryList::GetHeight  )  const [inline]
 

Definition at line 48 of file PulserSummaryList.h.

Referenced by PulserGainLog::Add(), PEGainModule::DoMeanSigmaFromSums(), and PulserSummaryModule::FinishList().

00048 {return fHeight;}

const PulserSummary& PulserSummaryList::GetHighPin  )  const [inline]
 

Definition at line 58 of file PulserSummaryList.h.

Referenced by PulserDBModule::AddToGC(), PulserDBModule::DriftPoint(), PulserCollectorModule::Reco(), and PulserCollectorModule::ReferencePointReco().

00058 {return *fHighPin;} 

Int_t PulserSummaryList::GetIdent  )  const [inline]
 

Definition at line 55 of file PulserSummaryList.h.

Referenced by PulserGainLog::Add(), and PulserCollectorModule::Reco().

00055 {return fIdent;} // uid for gaincurve

Int_t PulserSummaryList::GetLed  )  const [inline]
 

Definition at line 46 of file PulserSummaryList.h.

Referenced by PEGainModule::DoMeanSigmaFromSums(), PulserSummaryModule::FinishList(), and PulserSummaryModule::Reco().

00046 {return fLed;}

const PulserSummary& PulserSummaryList::GetLowPin  )  const [inline]
 

Definition at line 59 of file PulserSummaryList.h.

Referenced by PulserDBModule::AddToGC(), PulserDBModule::DriftPoint(), PulserCollectorModule::Reco(), and PulserCollectorModule::ReferencePointReco().

00059 {return *fLowPin;}

std::map<Int_t,PulserSummary>::const_iterator PulserSummaryList::GetNearBegin  )  const [inline]
 

Definition at line 62 of file PulserSummaryList.h.

References fNearMap.

Referenced by PulserDBModule::AddToGC(), PEGainModule::DoMeanSigmaFromSums(), PulserDBModule::DriftPoint(), PulserQDP::Reco(), PulserCollectorModule::Reco(), and PulserCollectorModule::ReferencePointReco().

00062 {return fNearMap.begin();}

std::map<Int_t,PulserSummary>::const_iterator PulserSummaryList::GetNearEnd  )  const [inline]
 

Definition at line 63 of file PulserSummaryList.h.

References fNearMap.

Referenced by PulserDBModule::AddToGC(), PEGainModule::DoMeanSigmaFromSums(), PulserDBModule::DriftPoint(), PulserQDP::Reco(), PulserCollectorModule::Reco(), and PulserCollectorModule::ReferencePointReco().

00063 {return fNearMap.end();}

Int_t PulserSummaryList::GetNumPulses  )  const [inline]
 

Definition at line 50 of file PulserSummaryList.h.

Referenced by PulserGainLog::Add(), PulserSummaryModule::EndRun(), and PulserSummaryModule::FinishList().

00050 {return fNumPulses;}

Int_t PulserSummaryList::GetPointIndex  )  const [inline]
 

Definition at line 51 of file PulserSummaryList.h.

Referenced by PulserGainLog::Add(), PulserDBModule::AddToGC(), PEGainModule::DoMeanSigmaFromSums(), PulserSummaryModule::FinishList(), PulserSummaryModule::Reco(), PulserQDP::Reco(), PulserDBModule::Reco(), PulserCollectorModule::Reco(), and PulserCollectorModule::ReferencePointReco().

00051 {return fPointIndex;}

Int_t PulserSummaryList::GetPulserBox  )  const [inline]
 

Definition at line 47 of file PulserSummaryList.h.

Referenced by PEGainModule::DoMeanSigmaFromSums(), PulserSummaryModule::FinishList(), and PulserSummaryModule::Reco().

00047 {return fPulserBox;}

Pulser::EPulseType PulserSummaryList::GetPulseType  )  const [inline]
 

Definition at line 44 of file PulserSummaryList.h.

00044 {return fPulseType;} 

Int_t PulserSummaryList::GetTriggers  )  const [inline]
 

Definition at line 54 of file PulserSummaryList.h.

Referenced by PulserGainLog::Add(), PulserSummaryModule::EndRun(), PulserDBModule::EndRun(), PulserSummaryModule::FinishList(), and PulserDBModule::Reco().

00054 {return fTriggers;}

VldContext PulserSummaryList::GetVldContext  )  const
 

Definition at line 99 of file PulserSummaryList.cxx.

Referenced by PulserGainLog::Add(), PEGainModule::DoMeanSigmaFromSums(), PulserDBModule::DriftPoint(), PulserDBModule::GainCurve(), PulserCollectorModule::WriteRawCurveData(), PulserCollectorModule::WriteRawDriftData(), and PulserCollectorModule::WriteReferenceDriftData().

00100 {
00101   return fValidity;
00102 }

Int_t PulserSummaryList::GetWidth  )  const [inline]
 

Definition at line 49 of file PulserSummaryList.h.

Referenced by PulserGainLog::Add(), PEGainModule::DoMeanSigmaFromSums(), and PulserSummaryModule::FinishList().

00049 {return fWidth;}


Member Data Documentation

PlexLedId PulserSummaryList::fAggregateNo [private]
 

Definition at line 87 of file PulserSummaryList.h.

Referenced by Add(), GetAggregateNo(), and PulserSummaryList().

Int_t PulserSummaryList::fExpectedPoints [private]
 

Definition at line 85 of file PulserSummaryList.h.

Referenced by Add(), and PulserSummaryList().

std::map<Int_t,PulserSummary> PulserSummaryList::fFarMap [private]
 

Definition at line 74 of file PulserSummaryList.h.

Referenced by Add(), Finish(), GetFarBegin(), and GetFarEnd().

Int_t PulserSummaryList::fHeight [private]
 

Definition at line 82 of file PulserSummaryList.h.

Referenced by Add(), and PulserSummaryList().

PulserSummary* PulserSummaryList::fHighPin [private]
 

Definition at line 76 of file PulserSummaryList.h.

Referenced by Add(), Finish(), and PulserSummaryList().

Int_t PulserSummaryList::fIdent [private]
 

Definition at line 86 of file PulserSummaryList.h.

Referenced by PulserSummaryList().

Int_t PulserSummaryList::fLed [private]
 

Definition at line 79 of file PulserSummaryList.h.

Referenced by Add(), and PulserSummaryList().

PulserSummary* PulserSummaryList::fLowPin [private]
 

Definition at line 75 of file PulserSummaryList.h.

Referenced by Add(), Finish(), and PulserSummaryList().

std::map<Int_t,PulserSummary> PulserSummaryList::fNearMap [private]
 

Definition at line 73 of file PulserSummaryList.h.

Referenced by Add(), Finish(), GetBegin(), GetEnd(), GetNearBegin(), and GetNearEnd().

Int_t PulserSummaryList::fNumPulses [private]
 

Definition at line 83 of file PulserSummaryList.h.

Referenced by PulserSummaryList().

Int_t PulserSummaryList::fPointIndex [private]
 

Definition at line 84 of file PulserSummaryList.h.

Referenced by Add(), and PulserSummaryList().

Int_t PulserSummaryList::fPulserBox [private]
 

Definition at line 80 of file PulserSummaryList.h.

Referenced by Add(), and PulserSummaryList().

Pulser::EPulseType PulserSummaryList::fPulseType [private]
 

Definition at line 78 of file PulserSummaryList.h.

Int_t PulserSummaryList::fTriggers [private]
 

Definition at line 77 of file PulserSummaryList.h.

Referenced by Add(), Finish(), and PulserSummaryList().

bool PulserSummaryList::fUsePlex [private]
 

Definition at line 90 of file PulserSummaryList.h.

Referenced by PulserSummaryList().

VldContext PulserSummaryList::fValidity [private]
 

Definition at line 88 of file PulserSummaryList.h.

Referenced by PulserSummaryList().

Int_t PulserSummaryList::fWidth [private]
 

Definition at line 81 of file PulserSummaryList.h.

Referenced by Add(), and PulserSummaryList().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:07 2010 for loon by  doxygen 1.3.9.1