LedIdList Class Reference

List of all members.

Public Member Functions

 LedIdList (const VldContext &context)
 LedIdList ()
void Reset (const VldContext &context)

Private Attributes

DbiResultPtr< PlexPinDiodeToLedfResPtr

Detailed Description

Definition at line 69 of file LIPlexMaps.cxx.


Constructor & Destructor Documentation

LedIdList::LedIdList ( const VldContext context  )  [inline]

Definition at line 74 of file LIPlexMaps.cxx.

00074 { Reset(context);};

LedIdList::LedIdList (  )  [inline]

Definition at line 75 of file LIPlexMaps.cxx.

References Detector::kCalDet, and SimFlag::kData.

00075               { 
00076     VldTimeStamp ts;
00077     VldContext cx(Detector::kCalDet,SimFlag::kData,ts);
00078     Reset(cx);
00079   };


Member Function Documentation

void LedIdList::Reset ( const VldContext context  )  [inline]

Definition at line 81 of file LIPlexMaps.cxx.

References clear(), PlexPinDiodeToLed::GetPlexLedId(), it, Msg::kInfo, and MSG.

00081                                         { 
00082     Int_t numRows=fResPtr.NewQuery(context,0);
00083     MSG("LIPlexMaps",Msg::kInfo)
00084       <<"New DB query produced "<<numRows<<" rows"<<endl;
00085     std::map<PlexLedId,int> tmpMap;
00086 
00087     for (UInt_t i=0;i<fResPtr.GetNumRows();i++) {
00088       const PlexPinDiodeToLed* datum = fResPtr.GetRow(i);
00089       if(datum){
00090         tmpMap[datum->GetPlexLedId()] += 1; // Add it to map.
00091       }
00092     }
00093 
00094     this->clear();
00095     for (std::map<PlexLedId,int>::iterator it=tmpMap.begin(); 
00096         it!=tmpMap.end(); it++) {
00097       this->push_back(it->first);
00098     }
00099   };


Member Data Documentation

Definition at line 99 of file LIPlexMaps.cxx.


The documentation for this class was generated from the following file:

Generated on 18 Jan 2018 for loon by  doxygen 1.6.1