CDF II
CDF KITS
source navigation ]
diff markup ]
identifier search ]
freetext search ]
file search ]
 
Architecture: i386 ]
Version: 4.10.4 ] [ 4.10.5 ] [ 4.8.4 ] [ 4.8.4l3s ] [ 4.8.5 ] [ 4.9.0 ] [ 4.9.1 ] [ 4.9.1.hpt3 ] [ 4.9.1hpt3 ] [ 4.9.1top1 ] [ 5.0.0 ] [ 5.1.0 ] [ 5.1.0beamonly ] [ 5.1.1 ] [ 5.2.0 ] [ 5.3.0 ] [ 5.3.1 ] [ 5.3.1dsp ] [ 5.3.3 ] [ 5.3.3_nt ] [ 5.3.4 ] [ 6.1.1 ] [ 6.1.1b ] [ 6.1.2 ] [ 6.1.3 ] [ 6.1.4 ] [ 6.1.4int3 ] [ 6.1.4mc ] [ 6.1.4mc_a ] [ 6.1.6 ] [ development ]

001 //===========================================================================
002 //  TRYRun2SiStripSet.hh
003 //  --------------------
004 //  Persistent version of SiStripSet that uses Run 2 version of SIXD
005 //  Trybos bank for data source.
006 //
007 //  Author: R. Snider
008 //          7-Feb-1998
009 //===========================================================================
010 #ifndef TRYRUN2SISTRIPSET_HH
011 #define TRYRUN2SISTRIPSET_HH 1
012 
013 #ifdef __CINT__
014 //
015 class SiStripSet
016 {};
017 //
018 #else 
019 //
020 #include "BaBar/Cdf.hh"
021 #include "TrackingObjects/SiData/SiStripSet.hh"
022 #include "Trybos/TRY_Record_Iter_Same.hh"
023 //
024 #endif // __CINT__
025 #include "RegionalGeometry/WorldRegion.hh"
026 #include "RawDataBanks/ISLD_StorableBank.hh"
027 #include "RawDataBanks/SIXD_StorableBank.hh"
028 extern WorldRegion TWorld;
029 
030 class EventRecord;
031 // class ISLD_StorableBank;
032 class MSVX_StorableBank;
033 class MISL_StorableBank;
034 class SiDataMapping;
035 class SiVrbInfoSet;
036 // class SIXD_StorableBank;
037 
038 class ChipStatus;
039 class SixdErrorMonitorHtmlGen;
040 
041 class TRYRun2SiStripSet : public SiStripSet 
042   {
043 public:
044 
045 #ifndef __CINT__
046   //-------------------------------------------------------------------------
047   // Constructor. Reads data from SIXD in trybos record
048   // 
049   // 18.01.99 Author : David Waters.  Defaulted second argument is a region 
050   // reference, which sets the corresponding private data member. This is 
051   // needed to create regional strip sets.
052   //-------------------------------------------------------------------------
053   
054   // Create a set from Trybos banks, optionally select only
055   // those strips within the specified region
056   //
057   TRYRun2SiStripSet( AbsEvent* theRecord , const GeometricRegion& region = TWorld );
058 #endif // !__CINT__
059   
060   // Create an empty set, optionally associated with 
061   // a region (needed for EDM2 implementation)
062   //
063   TRYRun2SiStripSet( const GeometricRegion & region = TWorld );
064     
065 #ifndef __CINT__
066   virtual ~TRYRun2SiStripSet();
067   
068   //-------------------------------------------------------------------------
069   // Select data representation mode
070   //-------------------------------------------------------------------------
071 
072   static void selectDataRepByBankVersion( bool useBankVersion );
073     
074   //-------------------------------------------------------------------------
075   // Select unpacker and whether to use chip thresholds from the data base
076   //-------------------------------------------------------------------------
077 
078   static void useNNDataUnpacker( bool useNNData );
079   static void useNNChipThreshold( bool useNNChipThresh );
080     
081   //-------------------------------------------------------------------------
082   // Set monitor mode for unpacker
083   //-------------------------------------------------------------------------
084 
085   static void setMonitorMode( bool monitorMode );
086     
087   //-------------------------------------------------------------------------
088   // Chip status for thresholds
089   //-------------------------------------------------------------------------
090 
091 
092   static ChipStatus *_chipStatus;
093   static int lastRunNumber;
094   static SixdErrorMonitorHtmlGen *_htmlGen;
095   static bool dumpHtml;
096   //-------------------------------------------------------------------------
097   //  Read and write SIXD/ISLD banks.
098   //-------------------------------------------------------------------------
099 //   void readSIXDBank( const SIXD_StorableBank & sixd, const MSVX_StorableBank * pMsvx );
100 //   void readSIXDBank( const SIXD_StorableBank & sixd, const MSVX_StorableBank * pMsvx );
101   void readSIXDBank_simple( const SIXD_StorableBank & sixd,
102                             const MSVX_StorableBank * pMsvx );
103   void readSIXDBank_nndata( const SIXD_StorableBank & sixd,
104                             std::vector<int4> & hdiKeys);
105   void readSIXDBank_prepare( const SIXD_StorableBank & sixd,
106                              std::vector<int4> & hdiKeys );
107                              
108 //   void readISLDBank( const ISLD_StorableBank & isld, const MISL_StorableBank * pMisl );
109   void readISLDBank_simple( const ISLD_StorableBank & isld,
110                             const MISL_StorableBank * pMisl );
111   void readISLDBank_nndata( const ISLD_StorableBank & isld,
112                              std::vector<int4> & hdiKeys );
113   void readISLDBank_prepare( const ISLD_StorableBank & isld,
114                              std::vector<int4> & hdiKeys );
115                               
116   void fillSIXDBank( SIXD_StorableBank & sixd,  MSVX_StorableBank & msvx );
117   
118   void fillISLDBank( ISLD_StorableBank & isld, MISL_StorableBank & misl  );
119   
120   int estimateSIXDsize( int nStrips ) const;
121   int estimateISLDsize( int nStrips ) const;
122 
123   int estimateMSVXsize( int nStrips ) const;
124   int estimateMISLsize( int nStrips ) const;
125   
126   //-------------------------------------------------------------------------
127   // Method to merge contents from Trybos 'newRecord' with current 
128   // contents of set. This this handles both the SIXD and ISLD bank 
129   // at the same time.
130   // Author of this method: T. Hessing, Oxford University 
131   //-------------------------------------------------------------------------
132 
133   virtual void mergeEvent( AbsEvent* newRecord );
134 
135   //-------------------------------------------------------------------------
136   // Set the default DB used to construct ChipStatus (which in turn we
137   // need in order to tell which mode each chip was in... so that we
138   // can use Lester's nearest-neigbor corrections). 
139   // Petar's note: the hard-wired default was "ofotl_prd_read", which
140   // is (a) dangerous and inflexible, and (b) prevented Frontier-only jobs
141   // from being truly Frontier-only.
142   //-------------------------------------------------------------------------
143   inline void setDefaultDbName(const std::string db ) 
144   { _defaultDbName = db; }
145 
146   //-------------------------------------------------------------------------
147   //  Set debugging level
148   //-------------------------------------------------------------------------
149  
150   void setDebugSixdWrite( bool flag ) { _debugSixdWrite = flag ; }
151   void setDebugIsldWrite( bool flag ) { _debugIsldWrite = flag ; } 
152   //
153   // access Daq Info sets
154   //
155   
156   inline void setSvxSiVrbInfoSet(SiVrbInfoSet* daqInfo) {
157     _svxDaqInfoSet = daqInfo;
158   }   
159   inline SiVrbInfoSet* getSvxSiVrbInfoSet() const {
160     return _svxDaqInfoSet;
161   } 
162 
163   
164   inline void setIslSiVrbInfoSet(SiVrbInfoSet* daqInfo) {
165     _islDaqInfoSet = daqInfo;
166   }   
167   inline SiVrbInfoSet* getIslSiVrbInfoSet() const {
168     return _islDaqInfoSet;
169   }
170   inline unsigned int bankReadoutError() const {
171     return _bankReadoutError;
172   } 
173 
174   //-------------------------------------------------------------------------
175   // Droping SIXD z side or not, also ISLD z side, L00 and L7
176   //-------------------------------------------------------------------------
177   inline bool getDropSIXDz() {
178     return _dropSIXDz;
179   }
180 
181   inline void setDropSIXDz(bool flag) {
182     _dropSIXDz = flag;
183   }
184 
185   inline bool getDropISLDz() {
186     return _dropISLDz;
187   }
188 
189   inline void setDropISLDz(bool flag) {
190     _dropISLDz = flag;
191   }
192 
193   inline bool getDropISLL7() {
194     return _dropISLL7;
195   }
196 
197   inline void setDropISLL7(bool flag) {
198     _dropISLL7 = flag;
199   }
200 
201   inline bool getDropL00() {
202     return _dropL00;
203   }
204 
205   inline void setDropL00(bool flag) {
206     _dropL00 = flag;
207   }
208 
209   inline bool getDropForwardIsl() {
210     return _dropForwardIsl;
211   }
212 
213   inline void setDropForwardIsl(bool flag) {
214     _dropForwardIsl = flag;
215   }
216 
217 protected:
218 
219   // EDM2 needs to be able to set the region after construction
220   //
221   void setRegion( const GeometricRegion & region );
222   static bool           _useNNData;
223   static bool           _useNNChipThreshold;
224   static bool           _monitorMode;
225   
226 private:
227   std::string     _defaultDbName;
228 
229   SiVrbInfoSet* _svxDaqInfoSet;
230   SiVrbInfoSet* _islDaqInfoSet;
231 
232   unsigned int _bankReadoutError;
233   
234   // The data representation is translated using the SiDataMapping
235   // class. At present, the following reference is initialized to the 
236   // data mapping stored in the SiRecoDataRep singleton. This could be
237   // changed to allow more run-time flexibility. Until then, changes to
238   // the data representation should be handled by accessing the SiDataRep
239   // directly through the SiRecoDataRep singleton.
240   //
241   const SiDataMapping & _dataMap;
242   static bool           _selectDataRepByBankVersion;
243     
244   //-------------------------------------------------------------------------
245   // Droping SIXD z side or not, also ISLD z side, L00 and L7
246   //-------------------------------------------------------------------------
247   bool _dropSIXDz ;
248   bool _dropISLDz ;
249   bool _dropISLL7 ;
250   bool _dropL00 ;
251   bool _dropForwardIsl ;
252 
253   //-------------------------------------------------------------------------
254   //  Debugging flags
255   //-------------------------------------------------------------------------
256 
257   bool _debugSixdWrite ;
258   bool _debugIsldWrite ; 
259   
260   //-------------------------------------------------------------------------
261   // 18.01.99 Author : David Waters. 
262   // An SiStripSet should know which region it corresponds to.
263   //-------------------------------------------------------------------------
264   const GeometricRegion * _pRegion ;
265 
266   //-------------------------------------------------------------------------
267   //  Implementation utilities
268   //-------------------------------------------------------------------------
269 
270   void _readSvxData( EventRecord * newRecord );
271   void _readIslData( EventRecord * newRecord );
272 
273 
274 #endif // !__CINT__
275   
276   //-------------------------------------------------------------------------
277   //  Hide copy constructor and assignment operator.
278   //-------------------------------------------------------------------------
279   
280   TRYRun2SiStripSet( const TRYRun2SiStripSet & );
281   const TRYRun2SiStripSet & operator= ( const TRYRun2SiStripSet & ); 
282 
283   };
284 
285 #ifndef __CINT__
286 #include "TrackingObjects/Trybos/TRYRun2SiStripSet.icc"
287 #endif // !__CINT__
288 
289 #endif  //  TRYRUN2SISTRIPSET_HH
290 

source navigation ] diff markup ] identifier search ] freetext search ] file search ]

This page was automatically generated by the LXR engine.
The LXR team
Valid HTML 4.01!

Send problems or questions to cdfcode@fnal.gov