StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcDbMaker.cxx
1 // *-- Author : Jan Balewski
2 //
3 // $Id: StEEmcDbMaker.cxx,v 1.58 2009/10/18 22:46:01 perev Exp $
4 
5 
6 #include <time.h>
7 #include <string.h>
8 
9 #include <TList.h>
10 
11 //#include "StEventTypes.h"
12 
13 #include "StEEmcDbMaker.h"
14 
15 #include "StEEmcUtil/database/StEEmcDb.h"
16 //#include "StEEmcUtil/EEfeeRaw/EEname2Index.h"
17 
18 #include <StMessMgr.h>
19 
20 ClassImp(StEEmcDbMaker)
21 
22 //________________________________________________________
23 //________________________________________________________
24 StEEmcDbMaker::StEEmcDbMaker(const char *name)
25  : StMaker(name), mEEmcDb(new StEEmcDb())
26 {
27  if (mEEmcDb) mEEmcDb->setSectors(1, 12);
28 }
29 
30 
31 //________________________________________________________
32 //________________________________________________________
33 //_______________________________________________________
34 StEEmcDbMaker::~StEEmcDbMaker(){
35  mEEmcDb = 0;
36 }
37 
38 //________________________________________________________
39 //________________________________________________________
40 //________________________________________________________
41 Int_t StEEmcDbMaker::Init(){
42  if (mEEmcDb) AddConst(mEEmcDb);
43  return StMaker::Init();
44 }
45 
46 
47 //__________________________________________________
48 //__________________________________________________
49 //__________________________________________________
50 
51 Int_t StEEmcDbMaker::InitRun(int runNumber) {
52  // Reloads database for each occurence of a new run number.
53  StEEmcDb *db = (StEEmcDb*)this->GetDataSet("StEEmcDb");
54  if (db) db->loadTables(this);
55  return StMaker::InitRun(runNumber);
56 }
57 
58 
59 // $Log: StEEmcDbMaker.cxx,v $
60 // Revision 1.58 2009/10/18 22:46:01 perev
61 // bfc .q crash fix
62 //
63 // Revision 1.57 2009/02/11 20:03:40 ogrebeny
64 // Initialize all 12 sectors
65 //
66 // Revision 1.56 2009/02/04 20:33:06 ogrebeny
67 // Moved the EEMC database functionality from StEEmcDbMaker to StEEmcUtil/database. See ticket http://www.star.bnl.gov/rt2/Ticket/Display.html?id=1388
68 //
69 // Revision 1.55 2007/04/28 17:56:00 perev
70 // Redundant StChain.h removed
71 //
72 // Revision 1.54 2007/03/11 01:25:47 balewski
73 // nicer printouts
74 //
75 // Revision 1.53 2007/01/26 20:45:58 balewski
76 // now we have pure new Logger, thanks Jason, Jan
77 //
78 // Revision 1.52 2007/01/26 00:47:58 balewski
79 // new logger only (almost)
80 //
81 // Revision 1.51 2006/12/12 20:29:09 balewski
82 // added hooks for Endcap embedding
83 //
84 // Revision 1.50 2005/12/15 16:05:11 balewski
85 // printouts with more details
86 //
87 // Revision 1.49 2005/08/17 22:08:45 balewski
88 // cleanup
89 //
90 // Revision 1.48 2005/08/17 22:00:48 balewski
91 // remove assert
92 //
93 // Revision 1.47 2005/08/17 20:51:14 balewski
94 // allow to mask fibers based on event content
95 //
96 // Revision 1.46 2005/06/09 20:04:06 balewski
97 // upgrade for embedding
98 //
99 // Revision 1.45 2005/04/25 19:48:37 balewski
100 // overwrite of masks was not working properly
101 //
102 // Revision 1.44 2005/02/02 01:36:52 balewski
103 // few more access methods + sigPed visible in EEmcDbItem
104 //
105 // Revision 1.43 2005/01/24 05:08:26 balewski
106 // more get-methods
107 //
108 // Revision 1.42 2004/10/27 17:02:46 balewski
109 // move setKsig from Init() to constructor where it belongs
110 //
111 // Revision 1.41 2004/10/20 20:06:55 balewski
112 // only printouts
113 //
114 // Revision 1.40 2004/09/20 13:32:59 balewski
115 // to make Valgrind happy
116 //
117 // Revision 1.39 2004/08/09 20:17:12 balewski
118 // a bit more printout
119 //
120 // Revision 1.38 2004/08/07 02:46:51 perev
121 // WarnOff
122 //
123 // Revision 1.37 2004/07/27 22:00:19 balewski
124 // can overwrite gains & stat from DB
125 //
126 // Revision 1.36 2004/06/25 22:55:53 balewski
127 // now it survives missing fiberMap in DB , also gMessMgr is used
128 //
129 // Revision 1.35 2004/06/04 13:30:24 balewski
130 // use gMessMgr for most of output
131 //
132 // Revision 1.33 2004/05/20 16:40:14 balewski
133 // fix of strnlen --> strlen
134 //
135 // Revision 1.32 2004/05/14 20:55:34 balewski
136 // fix to process many runs, by Piotr
137 //
138 // Revision 1.31 2004/05/05 22:01:44 jwebb
139 // byStrip[] is now initialized when reading database from a file.
140 //
141 // Revision 1.30 2004/05/04 16:24:18 balewski
142 // ready for analysis of 62GeV AuAU production
143 //
144 // Revision 1.29 2004/04/28 20:38:10 jwebb
145 // Added StEEmcDbMaker::setAsciiDatabase(). Currently not working, since
146 // tube name missing for some towers, triggereing a "clear" of all EEmcDbItems.
147 //
148 // Revision 1.28 2004/04/12 16:19:51 balewski
149 // DB cleanup & update
150 //
151 // Revision 1.27 2004/04/09 18:38:10 balewski
152 // more access methods, not important for 63GeV production
153 //
154 // Revision 1.26 2004/04/08 16:28:06 balewski
155 // *** empty log message ***
156 //
157 // Revision 1.25 2004/04/04 06:10:37 balewski
158 // *** empty log message ***
159 //
160 // Revision 1.24 2004/03/30 04:44:57 balewski
161 // *** empty log message ***
162 //
163 // Revision 1.23 2004/03/28 04:09:08 balewski
164 // storage of EEMC raw data, not finished
165 //
166 // Revision 1.22 2004/03/19 21:31:53 balewski
167 // new EEMC data decoder
168 //
169 // Revision 1.21 2004/01/06 21:19:34 jwebb
170 // Added methods for accessing preshower, postshower and SMD info.
171 //
172 // Revision 1.20 2003/11/20 16:01:25 balewski
173 // towards run4
174 //
175 // Revision 1.19 2003/10/03 22:44:27 balewski
176 // fix '$' problem in db-entries name
177 //
178 // Revision 1.18 2003/09/11 05:49:17 perev
179 // ansi corrs
180 //
181 // Revision 1.17 2003/09/02 19:02:49 balewski
182 // fix for TMemeStat
183 //
184 // Revision 1.16 2003/08/27 03:26:45 balewski
185 // flavor option added: myMk1->setPreferedFlavor("set-b","eemcPMTcal");
186 //
187 // Revision 1.15 2003/08/26 03:02:30 balewski
188 // fix of pix-stat and other
189 //
190 // Revision 1.14 2003/08/25 17:57:12 balewski
191 // use teplate to access DB-tables
192 //
193 // Revision 1.13 2003/08/22 20:52:20 balewski
194 // access to stat-table
195 //
196 // Revision 1.12 2003/08/02 01:02:17 perev
197 // change %d to %p int printf
198 //
199 // Revision 1.11 2003/07/18 18:31:46 perev
200 // test for nonexistance of XXXReader added
201 //
202 // Revision 1.10 2003/04/27 23:08:13 balewski
203 // clean up of daq-reader
204 //
205 // Revision 1.9 2003/04/25 14:42:00 jeromel
206 // Minor change in messaging
207 //
208 // Revision 1.8 2003/04/16 20:33:51 balewski
209 // small fixes in eemc daq reader
210 //
211 // Revision 1.7 2003/04/02 20:42:23 balewski
212 // tower-->tube mapping
213 //
214 // Revision 1.6 2003/03/26 21:28:02 balewski
215 // fix
216 //
217 // Revision 1.5 2003/03/26 15:26:23 balewski
218 // add print()
219 //
220 // Revision 1.4 2003/03/07 15:35:44 balewski
221 // towards EEMC daq reader
222 //
223 // Revision 1.3 2003/02/18 22:01:40 balewski
224 // fixes
225 //
226 // Revision 1.2 2003/02/18 19:55:53 balewski
227 // add pedestals
228 //
229 // Revision 1.1 2003/01/28 23:18:34 balewski
230 // start
231 //
232 // Revision 1.5 2003/01/06 17:09:21 balewski
233 // DB-fix
234 //
235 // Revision 1.4 2003/01/03 23:37:56 balewski
236 // move to robinson
237 //
238 // Revision 1.3 2002/12/05 14:22:24 balewski
239 // cleanup, time stamp fixed
240 //
241 // Revision 1.2 2002/12/04 13:39:04 balewski
242 // remove dependency on dbase/
243 //
244 // Revision 1.1 2002/11/30 20:01:26 balewski
245 // start DB interface for EEMC RELATED ROUTINES
246 //
247 
virtual Int_t InitRun(int runumber)
to access STAR-DB
void loadTables(StMaker *anyMaker)
to access STAR-DB
Definition: StEEmcDb.cxx:211