| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

ElecFeeCrate.h

Go to the documentation of this file.
00001 
00002 //   **************************************************************************
00003 //   *                                                                        *
00004 //   *                      ! ! ! A T T E N T I O N ! ! !                     *
00005 //   *                                                                        *
00006 //   *  This file was created automatically by GaudiObjDesc, please do not    *
00007 //   *  delete it or edit it by hand.                                         *
00008 //   *                                                                        *
00009 //   *  If you want to change this file, first change the corresponding       *
00010 //   *  xml-file and rerun the tools from GaudiObjDesc (or run make if you    *
00011 //   *  are using it from inside a Gaudi-package).                            *
00012 //   *                                                                        *
00013 //   **************************************************************************
00014 
00015 #ifndef ElecEvent_ElecFeeCrate_H
00016 #define ElecEvent_ElecFeeCrate_H 1
00017 
00018 // Include files
00019 #include "Event/ElecCrate.h"
00020 #include "Event/ElecFeeChannel.h"
00021 #include "Conventions/Electronics.h"
00022 #include "GaudiKernel/boost_allocator.h"
00023 #include <ostream>
00024 
00025 // Forward declarations
00026 
00027 namespace DayaBay 
00028 {
00029 
00030   // Forward declarations
00031 
00041   class ElecFeeCrate: public ElecCrate
00042   {
00043   public:
00044 
00046     typedef std::map<DayaBay::FeeChannelId,DayaBay::ElecFeeChannel> ChannelData;
00048     typedef std::map<DayaBay::FeeChannelId,DayaBay::DigitalSignal> DigitalMap;
00050     typedef std::map<DayaBay::FeeChannelId,DayaBay::AnalogSignal> AnalogMap;
00051   
00053   ElecFeeCrate(const DayaBay::Detector& detector,
00054                  DayaBay::ElecCrateHeader* header);
00055   
00057   ElecFeeCrate(const Site::Site_t& site,
00058                  const DetectorId::DetectorId_t& detectorId,
00059                  DayaBay::ElecCrateHeader* header);
00060   
00062     ElecFeeCrate() : m_channelData(),
00063                      m_nhit(),
00064                      m_esum(),
00065                      m_esumUpper(),
00066                      m_esumLower(),
00067                      m_esumTotal(),
00068                      m_esumADC() {}
00069   
00071     virtual ~ElecFeeCrate() {}
00072   
00074    virtual std::ostream& fillStream(std::ostream& s) const;
00075   
00077     void addChannel(const DayaBay::FeeChannelId& channelId);
00078   
00080     ElecFeeChannel& channel(const DayaBay::FeeChannelId& channelId);
00081   
00083     DigitalSignal& nhitSignal(const DayaBay::FeeChannelId& channelId);
00084   
00086     AnalogSignal& esumSignal(const DayaBay::FeeChannelId& channelId);
00087   
00090   const ChannelData& channelData() const;
00091   
00094   void setChannelData(const ChannelData& value);
00095   
00098   const DigitalMap& nhit() const;
00099   
00102   DigitalMap& nhit();
00103   
00106   void setNhit(const DigitalMap& value);
00107   
00110   const AnalogMap& esum() const;
00111   
00114   AnalogMap& esum();
00115   
00118   void setEsum(const AnalogMap& value);
00119   
00122   const DayaBay::AnalogSignal& esumUpper() const;
00123   
00126   DayaBay::AnalogSignal& esumUpper();
00127   
00130   void setEsumUpper(const DayaBay::AnalogSignal& value);
00131   
00134   const DayaBay::AnalogSignal& esumLower() const;
00135   
00138   DayaBay::AnalogSignal& esumLower();
00139   
00142   void setEsumLower(const DayaBay::AnalogSignal& value);
00143   
00146   const DayaBay::AnalogSignal& esumTotal() const;
00147   
00150   DayaBay::AnalogSignal& esumTotal();
00151   
00154   void setEsumTotal(const DayaBay::AnalogSignal& value);
00155   
00158   const DayaBay::DigitalSignal& esumADC() const;
00159   
00162   DayaBay::DigitalSignal& esumADC();
00163   
00166   void setEsumADC(const DayaBay::DigitalSignal& value);
00167   
00168   
00169   #ifndef GOD_NOALLOC
00171     static void* operator new ( size_t size )
00172     {
00173       return ( sizeof(ElecFeeCrate) == size ? 
00174                boost::singleton_pool<ElecFeeCrate, sizeof(ElecFeeCrate)>::malloc() :
00175                ::operator new(size) );
00176     }
00177   
00181     static void* operator new ( size_t size, void* pObj )
00182     {
00183       return ::operator new (size,pObj);
00184     }
00185   
00187     static void operator delete ( void* p )
00188     {
00189       boost::singleton_pool<ElecFeeCrate, sizeof(ElecFeeCrate)>::is_from(p) ?
00190       boost::singleton_pool<ElecFeeCrate, sizeof(ElecFeeCrate)>::free(p) :
00191       ::operator delete(p);
00192     }
00193   
00196     static void operator delete ( void* p, void* pObj )
00197     {
00198       ::operator delete (p, pObj);
00199     }
00200   #endif
00201   protected:
00202 
00203   private:
00204 
00205     ChannelData            m_channelData; 
00206     DigitalMap             m_nhit;        
00207     AnalogMap              m_esum;        
00208     DayaBay::AnalogSignal  m_esumUpper;   
00209     DayaBay::AnalogSignal  m_esumLower;   
00210     DayaBay::AnalogSignal  m_esumTotal;   
00211     DayaBay::DigitalSignal m_esumADC;     
00212   
00213   }; // class ElecFeeCrate
00214 
00215   inline std::ostream& operator<< (std::ostream& str, const ElecFeeCrate& obj)
00216   {
00217     return obj.fillStream(str);
00218   }
00219   
00220 } // namespace DayaBay;
00221 
00222 // -----------------------------------------------------------------------------
00223 // end of class
00224 // -----------------------------------------------------------------------------
00225 
00226 // Including forward declarations
00227 
00228 inline DayaBay::ElecFeeCrate::ElecFeeCrate(const DayaBay::Detector& detector,
00229                                            DayaBay::ElecCrateHeader* header) 
00230 {
00231 
00232           setDetector(detector);
00233           setHeader(header);
00234         
00235 }
00236 
00237 inline DayaBay::ElecFeeCrate::ElecFeeCrate(const Site::Site_t& site,
00238                                            const DetectorId::DetectorId_t& detectorId,
00239                                            DayaBay::ElecCrateHeader* header) 
00240 {
00241 
00242           setDetector(DayaBay::Detector(site,
00243                                         detectorId));
00244           setHeader(header);
00245         
00246 }
00247 
00248 inline std::ostream& DayaBay::ElecFeeCrate::fillStream(std::ostream& s) const
00249 {
00250   ElecCrate::fillStream(s);
00251   s << "{ " << "channelData :   " << m_channelData << std::endl
00252             << "nhit :  " << m_nhit << std::endl
00253             << "esum :  " << m_esum << std::endl
00254             << "esumUpper :     " << m_esumUpper << std::endl
00255             << "esumLower :     " << m_esumLower << std::endl
00256             << "esumTotal :     " << m_esumTotal << std::endl
00257             << "esumADC :       " << m_esumADC << std::endl << " }";
00258   return s;
00259 }
00260 
00261 
00262 inline const DayaBay::ElecFeeCrate::ChannelData& DayaBay::ElecFeeCrate::channelData() const 
00263 {
00264   return m_channelData;
00265 }
00266 
00267 inline void DayaBay::ElecFeeCrate::setChannelData(const ChannelData& value) 
00268 {
00269   m_channelData = value;
00270 }
00271 
00272 inline const DayaBay::ElecFeeCrate::DigitalMap& DayaBay::ElecFeeCrate::nhit() const 
00273 {
00274   return m_nhit;
00275 }
00276 
00277 inline DayaBay::ElecFeeCrate::DigitalMap& DayaBay::ElecFeeCrate::nhit() 
00278 {
00279   return m_nhit;
00280 }
00281 
00282 inline void DayaBay::ElecFeeCrate::setNhit(const DigitalMap& value) 
00283 {
00284   m_nhit = value;
00285 }
00286 
00287 inline const DayaBay::ElecFeeCrate::AnalogMap& DayaBay::ElecFeeCrate::esum() const 
00288 {
00289   return m_esum;
00290 }
00291 
00292 inline DayaBay::ElecFeeCrate::AnalogMap& DayaBay::ElecFeeCrate::esum() 
00293 {
00294   return m_esum;
00295 }
00296 
00297 inline void DayaBay::ElecFeeCrate::setEsum(const AnalogMap& value) 
00298 {
00299   m_esum = value;
00300 }
00301 
00302 inline const DayaBay::AnalogSignal& DayaBay::ElecFeeCrate::esumUpper() const 
00303 {
00304   return m_esumUpper;
00305 }
00306 
00307 inline DayaBay::AnalogSignal& DayaBay::ElecFeeCrate::esumUpper() 
00308 {
00309   return m_esumUpper;
00310 }
00311 
00312 inline void DayaBay::ElecFeeCrate::setEsumUpper(const DayaBay::AnalogSignal& value) 
00313 {
00314   m_esumUpper = value;
00315 }
00316 
00317 inline const DayaBay::AnalogSignal& DayaBay::ElecFeeCrate::esumLower() const 
00318 {
00319   return m_esumLower;
00320 }
00321 
00322 inline DayaBay::AnalogSignal& DayaBay::ElecFeeCrate::esumLower() 
00323 {
00324   return m_esumLower;
00325 }
00326 
00327 inline void DayaBay::ElecFeeCrate::setEsumLower(const DayaBay::AnalogSignal& value) 
00328 {
00329   m_esumLower = value;
00330 }
00331 
00332 inline const DayaBay::AnalogSignal& DayaBay::ElecFeeCrate::esumTotal() const 
00333 {
00334   return m_esumTotal;
00335 }
00336 
00337 inline DayaBay::AnalogSignal& DayaBay::ElecFeeCrate::esumTotal() 
00338 {
00339   return m_esumTotal;
00340 }
00341 
00342 inline void DayaBay::ElecFeeCrate::setEsumTotal(const DayaBay::AnalogSignal& value) 
00343 {
00344   m_esumTotal = value;
00345 }
00346 
00347 inline const DayaBay::DigitalSignal& DayaBay::ElecFeeCrate::esumADC() const 
00348 {
00349   return m_esumADC;
00350 }
00351 
00352 inline DayaBay::DigitalSignal& DayaBay::ElecFeeCrate::esumADC() 
00353 {
00354   return m_esumADC;
00355 }
00356 
00357 inline void DayaBay::ElecFeeCrate::setEsumADC(const DayaBay::DigitalSignal& value) 
00358 {
00359   m_esumADC = value;
00360 }
00361 
00362 inline void DayaBay::ElecFeeCrate::addChannel(const DayaBay::FeeChannelId& channelId) 
00363 {
00364 
00365           m_channelData[channelId];
00366           m_nhit[channelId.boardId()];
00367           m_esum[channelId.boardId()];
00368         
00369 }
00370 
00371 inline DayaBay::ElecFeeChannel& DayaBay::ElecFeeCrate::channel(const DayaBay::FeeChannelId& channelId) 
00372 {
00373 return m_channelData[channelId];
00374 }
00375 
00376 inline DayaBay::DigitalSignal& DayaBay::ElecFeeCrate::nhitSignal(const DayaBay::FeeChannelId& channelId) 
00377 {
00378 return m_nhit[channelId.boardId()];
00379 }
00380 
00381 inline DayaBay::AnalogSignal& DayaBay::ElecFeeCrate::esumSignal(const DayaBay::FeeChannelId& channelId) 
00382 {
00383 return m_esum[channelId.boardId()];
00384 }
00385 
00386 
00387 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:32:32 2011 for ElecEvent by doxygen 1.4.7