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

AlgStripListFromSliceList.cxx

Go to the documentation of this file.
00001 
00002 // $Id: AlgStripListFromSliceList.cxx,v 1.2 2007/11/11 08:26:13 rhatcher Exp $
00003 //
00004 // AlgStripListFromSliceList.cxx
00005 //
00006 // The boilerplate code to write a chopr.
00007 //
00009 
00010 #include <cassert>
00011 
00012 #include "CandChop/AlgStripListFromSliceList.h"
00013 
00014 #include "RecoBase/CandSliceListHandle.h"
00015 #include "RecoBase/CandSliceHandle.h"
00016 #include "RecoBase/CandStripHandle.h"
00017 #include "RecoBase/CandStripListHandle.h"
00018 #include "RecoBase/CandStripList.h"
00019 
00020 #include "Algorithm/AlgConfig.h"
00021 #include "Algorithm/AlgFactory.h"
00022 #include "Algorithm/AlgHandle.h"
00023 #include "CandData/CandHeader.h"
00024 #include "CandData/CandRecord.h"
00025 #include "Candidate/CandContext.h"
00026 #include "MessageService/MsgService.h"
00027 #include "MinosObjectMap/MomNavigator.h"
00028 #include "RawData/RawHeader.h"
00029 #include "RawData/RawRecord.h"
00030 #include "RawData/RawDigitDataBlock.h"
00031 #include "UgliGeometry/UgliGeomHandle.h"
00032 #include "UgliGeometry/UgliStripHandle.h"
00033 #include "Validity/VldContext.h"
00034 #include "Calibrator/Calibrator.h"
00035 
00036 ClassImp(AlgStripListFromSliceList)
00037 CVSID( " $Id: AlgStripListFromSliceList.cxx,v 1.2 2007/11/11 08:26:13 rhatcher Exp $ ");
00038 
00039 struct compareDigitTimes : public binary_function<const CandDigitHandle&, const CandDigitHandle&, bool> {
00040   bool operator()(const CandDigitHandle& d1, const CandDigitHandle& d2) {
00041     return (d1.GetTime() < d2.GetTime());
00042   }
00043 };
00044 
00045 const RawChannelId kQieRcid(Detector::kNear,ElecType::kQIE,0,0,false,false);
00046 
00047 
00048 //______________________________________________________________________
00049 AlgStripListFromSliceList::AlgStripListFromSliceList()
00050 {
00051 }
00052 
00053 //______________________________________________________________________
00054 AlgStripListFromSliceList::~AlgStripListFromSliceList()
00055 {
00056 }
00057 
00058 
00059 
00060 //______________________________________________________________________
00061 void AlgStripListFromSliceList::RunAlg(AlgConfig& /*algConfig*/, 
00062                            CandHandle &candHandle,  // thing to make
00063                            CandContext &candContext)
00064 {
00068 
00069   assert(candHandle.InheritsFrom("CandStripListHandle"));
00070   CandStripListHandle &stripList = dynamic_cast<CandStripListHandle &>(candHandle);
00071 
00072    assert(candContext.GetDataIn());
00073    if (!(candContext.GetDataIn()->InheritsFrom("CandSliceListHandle"))) {
00074      MSG("Chop",Msg::kWarning ) << "Data into AlgStripListFromSliceList is not a slice list." << std::endl;
00075    }
00076    
00077    const CandSliceListHandle *sliceList = 
00078      dynamic_cast<const CandSliceListHandle*>(candContext.GetDataIn());
00079    assert(sliceList);
00080 
00081    // Loop over all slices:
00082    CandSliceHandleItr sliceItr(sliceList->GetDaughterIterator());
00083    while (CandSliceHandle* slice = sliceItr()) {
00084      
00085      // Loop over all strips:
00086      CandStripHandleItr stripItr(slice->GetDaughterIterator());
00087      while( CandStripHandle* strip = stripItr() ) {
00088        stripList.AddDaughterLink(*strip);
00089      }     
00090    }
00091 }
00092 
00093 //______________________________________________________________________
00094 void AlgStripListFromSliceList::Trace(const char * /* c */) const
00095 {
00096 }
00097 

Generated on Mon Feb 15 11:06:20 2010 for loon by  doxygen 1.3.9.1