source: trunk/Mars/mraw/MRawRunHeader.cc@ 11554

Last change on this file since 11554 was 11554, checked in by tbretz, 13 years ago
Added fIsSigned data memeber; increased version number.
File size: 42.0 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2008
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26//
27// MRawRunHeader
28//
29// Root storage container for the RUN HEADER information
30//
31//
32// RAW DATA FORMAT VERSION
33// =======================
34//
35// Format Version 12:
36// -----------------
37// * fIsSigned
38//
39// Format Version 11:
40// -----------------
41// * all variables got four bytes
42// * header sizes allow to make the format backward compatible
43// + fHeaderSizeRun
44// + fHeaderSizeEvt
45// + fHeaderSizeCrate
46// + fFileNumber
47// + fNumSamplesRemovedHead
48// + fNumSamplesRemovedTail
49//
50// Format Version 10:
51// -----------------
52// ?
53//
54// Format Version 9:
55// -----------------
56// + fNumEventsRead;
57// + fSamplingFrequency
58// - fFreqSampling
59// + fFadcResolution;
60// - fNumSignificantBits
61//
62// Format Version 8:
63// -----------------
64// + fNumBytesPerSample;
65// + fFreqSampling;
66// + fNumSignificantBits
67// * changes in MRawCrateHeader
68//
69// Format Version 7:
70// -----------------
71// - unused
72//
73// Format Version 6:
74// -----------------
75// + added CameraVersion
76// + added TelescopeNumber
77// + added ObservationMode
78// + added dummies for TelescopeRa/Dec
79//
80// Format Version 5:
81// -----------------
82// - now the sub millisecond information of the time is valid and decoded
83// which enhances the precision from 51.2us to 200ns
84//
85// Format Version 4:
86// -----------------
87// - added support for pixels with negative IDs
88//
89// Format Version 3:
90// -----------------
91// - ???
92//
93// Format Version 2:
94// -----------------
95// - removed mjd from data
96// - added start time
97// - added stop time
98//
99//
100// MRawRunHeader CLASS VERSION
101// ===========================
102//
103// Format Version 10:
104// -----------------
105// - added fHeaderSizeRun
106// - added fHeaderSizeEvt
107// - added fHeaderSizeCrate
108// - added fFileNumber
109// - increased fSourceEpochChar
110//
111// Format Version 7:
112// -----------------
113// - added fNumEventsRead;
114// * renamed fFreqSampling to fSamplingFrequency
115// * renamed fNumSignificantBits to fFadcResolution
116//
117// Format Version 6:
118// -----------------
119// - added fNumBytesPerSample;
120// - added fSamplingFrequency;
121// - added fFadcResolution;
122//
123// Class Version 5:
124// -----------------
125// - for compatibility with newer camera versions
126//
127// Class Version 4:
128// -----------------
129// - added fCameraVersion
130// - added fTelescopeNumber
131// - changed length of fProjectName to 101
132// - changed length of fSourceName to 81
133//
134// Class Version 3:
135// ----------------
136// - enhanced SourceName and ProjectName by one character, because
137// without telling us the guranteed trailing \0-character has
138// skipped
139//
140// Class Version 2:
141// ----------------
142// - removed fMJD, fYear, fMonth, fDay
143// - added fRunStart
144// - added fRunStop
145//
146// Class Version 1:
147// ----------------
148// - first implementation
149//
150////////////////////////////////////////////////////////////////////////////
151#include "MRawRunHeader.h"
152
153#include <fstream>
154#include <iomanip>
155
156#include <TArrayC.h>
157
158#include "MLog.h"
159#include "MLogManip.h"
160
161#include "MArrayS.h"
162#include "MString.h"
163
164ClassImp(MRawRunHeader);
165
166using namespace std;
167
168const UShort_t MRawRunHeader::kMagicNumber = 0xc0c0;
169const Byte_t MRawRunHeader::kMaxFormatVersion = 11;
170
171// --------------------------------------------------------------------------
172//
173// Default constructor. Creates array which stores the pixel assignment.
174//
175//
176MRawRunHeader::MRawRunHeader(const char *name, const char *title) : fPixAssignment(NULL)
177{
178 fName = name ? name : "MRawRunHeader";
179 fTitle = title ? title : "Raw Run Header Information";
180
181 fPixAssignment = new MArrayS(0);
182
183 // Remark: If we read old MC data from a root file which do not
184 // yet contain one of these variable, the value given here is
185 // the default. Do not mix files with and without a value if the
186 // files with the value do not match the default!
187 fFormatVersion=11;
188 fSoftVersion=0;
189 fTelescopeNumber=1;
190 fCameraVersion=1;
191 fFadcType=1;
192 fRunType=kRTNone; // use 0xffff for invalidation, 0 means: Data run
193 fRunNumber=0;
194 fFileNumber=0;
195 memset(fProjectName, 0, 101);
196 memset(fSourceName, 0, 81);
197 memset(fObservationMode, 0, 61);
198 fSourceEpochChar[0]=0;
199 fSourceEpochChar[1]=0;
200 fSourceEpochDate=0;
201 fNumCrates=0;
202 fNumPixInCrate=0;
203 fNumSamplesLoGain=0;
204 fNumSamplesHiGain=0;
205 fNumEvents=0;
206 fNumEventsRead=0;
207 fNumBytesPerSample=1;
208 fIsSigned = kFALSE;
209 fSamplingFrequency=300;
210 fFadcResolution=8;
211
212 fHeaderSizeRun=0;
213 fHeaderSizeEvt=0;
214 fHeaderSizeCrate=0;
215}
216
217MRawRunHeader::MRawRunHeader(const MRawRunHeader &h)
218{
219 fMagicNumber=h.fMagicNumber; // File type identifier
220
221 fHeaderSizeRun=h.fHeaderSizeRun; // Size of run header
222 fHeaderSizeEvt=h.fHeaderSizeEvt; // Size of evt header
223 fHeaderSizeCrate=h.fHeaderSizeCrate; // Size of crate header
224
225 fFormatVersion=h.fFormatVersion; // File format version
226 fSoftVersion=h.fSoftVersion; // DAQ software version
227 fFadcType=h.fFadcType; // FADC type (1=Siegen, 2=MUX)
228 fCameraVersion=h.fCameraVersion; // Camera Version (1=MAGIC I)
229 fTelescopeNumber=h.fTelescopeNumber; // Telescope number (1=Magic I)
230 fRunType=h.fRunType; // Run Type
231 fRunNumber=h.fRunNumber; // Run number
232 fFileNumber=h.fFileNumber; // File number
233 memcpy(fProjectName, h.fProjectName, 101); // Project name
234 memcpy(fSourceName, h.fSourceName, 81); // Source name
235 memcpy(fObservationMode, h.fObservationMode, 61); // observation mode
236 memcpy(fSourceEpochChar, h.fSourceEpochChar, 4); // epoch char of the source
237 fSourceEpochDate=h.fSourceEpochDate; // epoch date of the source
238 fNumCrates=h.fNumCrates; // number of electronic boards
239 fNumPixInCrate=h.fNumPixInCrate; // number of pixels in crate
240 fNumSamplesLoGain=h.fNumSamplesLoGain; // number of logain samples stored
241 fNumSamplesHiGain=h.fNumSamplesHiGain; // number of higain samples stored
242 fNumBytesPerSample=h.fNumBytesPerSample; // number of bytes per sample
243 fNumEvents=h.fNumEvents; // number of events stored
244 fNumEventsRead=h.fNumEventsRead; // number of events read by the electronics
245 fSamplingFrequency=h.fSamplingFrequency; // Sampling Frequency [MHz]
246 fFadcResolution=h.fFadcResolution; // number of significant bits
247 fRunStart=h.fRunStart; // time of run start
248 fRunStop=h.fRunStop; // time of run stop
249 fPixAssignment = new MArrayS(*h.fPixAssignment); //-> pixel assignment table
250}
251
252// --------------------------------------------------------------------------
253//
254// Destructor. Deletes the 'pixel-assignment-array'
255//
256MRawRunHeader::~MRawRunHeader()
257{
258 delete fPixAssignment;
259}
260
261// --------------------------------------------------------------------------
262//
263// Checks for consistency between two run headers. Checks:
264// fNumCrates
265// fNumPixInCrate
266// fNumSamplesLoGain
267// fNumSamplesHiGain
268// fNumBytesPerSample
269//
270Bool_t MRawRunHeader::IsConsistent(const MRawRunHeader &h) const
271{
272 return fNumCrates==h.fNumCrates &&
273 fNumPixInCrate==h.fNumPixInCrate &&
274 fNumSamplesLoGain==h.fNumSamplesLoGain &&
275 fNumSamplesHiGain==h.fNumSamplesHiGain &&
276 fNumBytesPerSample==h.fNumBytesPerSample;
277}
278
279// --------------------------------------------------------------------------
280//
281// Swap the assignment of the pixels with hardware id id0 and id1
282//
283Bool_t MRawRunHeader::SwapAssignment(Short_t id0, Short_t id1)
284{
285 const Int_t n = fPixAssignment->GetSize();
286
287 // Look-up-table
288 UShort_t *lut = fPixAssignment->GetArray();
289
290 // Search for one of the hardware indices to get exchanged
291 int i;
292 for (i=0; i<n; i++)
293 if (lut[i]==id0 || lut[i]==id1)
294 break;
295
296 // Check if one of the two pixels were found
297 if (i==n)
298 {
299 *fLog << warn << "WARNING - Assignment of pixels with hardware ID " << id0 << " and " << id1;
300 *fLog << " should be exchanged, but none were found." << endl;
301 return kTRUE;
302 }
303
304 // Store first index
305 const Int_t idx0 = i;
306
307 // Search for the other hardware indices to get exchanged
308 for (i++; i<n; i++)
309 if (lut[i]==id0 || lut[i]==id1)
310 break;
311
312 // Check if the second pixel was found
313 if (i==n)
314 {
315 *fLog << err << "ERROR - Assignment of pixels with hardware ID " << id0 << " and " << id1;
316 *fLog << " should be exchanged, but only one was found." << endl;
317 return kFALSE;
318 }
319
320 const Int_t idx1 = i;
321
322 const Short_t p0 = lut[idx0];
323 const Short_t p1 = lut[idx1];
324
325 lut[idx0] = p1;
326 lut[idx1] = p0;
327
328 *fLog << inf << "Assignment of pixels with hardware ID " << id0 << " and " << id1 << " exchanged." << endl;
329
330 return kTRUE;
331}
332
333// --------------------------------------------------------------------------
334//
335// Return Telescope number, runnumber and filenumber on the form:
336// run
337// as string for runnumber<1000000 and
338// telescope:run/file
339// otherwise.
340//
341TString MRawRunHeader::GetStringID() const
342{
343 return fRunNumber<1000000?MString::Format("%d", fRunNumber):MString::Format("%d:%d/%d", fTelescopeNumber, fRunNumber, fFileNumber);
344}
345
346// --------------------------------------------------------------------------
347//
348// Consistency checks. See code for detils.
349//
350Bool_t MRawRunHeader::IsConsistent() const
351{
352 // FIXME: Match first digits of run-number with telescope number
353
354 if (fFormatVersion>10)
355 {
356 if (GetTypeID()!=fTelescopeNumber &&
357 GetTypeID()!=fTelescopeNumber*10U &&
358 GetTypeID()!=5U)
359 {
360 *fLog << err << "ERROR - Telescope number " << fTelescopeNumber << " doesn't match the first two digits of the run number " << fRunNumber << " and run number doesn't start with 5." << endl;
361 return kFALSE;
362 }
363
364 // Old formats can not contain a run number larger 999999
365 if (fRunNumber<1000000)
366 {
367 *fLog << err << "ERROR - Run number " << fRunNumber << " smaller than 1000000." << endl;
368 return kFALSE;
369 }
370 }
371
372 // Check for correct number of bytes in data stream
373 if (fFormatVersion>7 && fNumBytesPerSample!=2)
374 {
375 *fLog << err << "ERROR - " << fNumBytesPerSample << " bytes per sample are not supported!" << endl;
376 return kFALSE;
377 }
378
379 // If we have a vlid stop time check its consistency with the start time
380 if (fRunStop!=MTime() && fRunStop<fRunStart)
381 {
382 *fLog << err << "ERROR - Stop time smaller than start time." << endl;
383 return kFALSE;
384 }
385
386 // No file numbers larger than 999 allowed in general
387 if (fFileNumber>999)
388 {
389 *fLog << err << "ERROR - File number " << fFileNumber << " larger than 999." << endl;
390 return kFALSE;
391 }
392
393 // Old formats can not contain a run number larger 0
394 if (fFormatVersion<11 && fFileNumber>0)
395 {
396 *fLog << err << "ERROR - File number " << fFileNumber << " larger than 0." << endl;
397 return kFALSE;
398 }
399
400 if (fFormatVersion>1)
401 {
402 // For most of the formats the start time must be valid
403 if (fRunStart==MTime())
404 {
405 *fLog << err << "ERROR - Start time invalid." << endl;
406 return kFALSE;
407 }
408
409 // For most of the formats an invalid stop time cannot happen if file closed
410 if (fMagicNumber==kMagicNumber && fRunStop==MTime())
411 {
412 *fLog << err << "ERROR - File closed but stop time invalid." << endl;
413 return kFALSE;
414 }
415 }
416 return kTRUE;
417}
418
419void MRawRunHeader::FixRunNumbers()
420{
421 if (fFormatVersion<11 || fTelescopeNumber!=1)
422 return;
423
424 // Map 1:1001349 to 47:1001395
425 if (fRunNumber<48 &&
426 fRunStart.GetMjd()>54674.5 && fRunStart.GetMjd()<56476.5)
427 {
428 fRunNumber += 1001348;
429 *fLog << warn << "Format >V10: Wrong run number increased by 1001348 to " << fRunNumber << "." << endl;
430 }
431
432 // Map 1001916:1001922 to 1002349:1002355
433 if (fRunNumber>1001915 && fRunNumber<1001923 &&
434 fRunStart.GetMjd()>54710.5 && fRunStart.GetMjd()<54711.5)
435 {
436 fRunNumber += 433;
437 *fLog << warn << "Format >V10: Wrong run number increased by 434 to " << fRunNumber << "." << endl;
438 }
439
440 // Map 10000342:1000343 to 10000351:1000351
441 if (fRunNumber>10000342 && fRunNumber<10000352 &&
442 fRunStart.GetMjd()>54254.5 && fRunStart.GetMjd()<54255.5)
443 {
444 fRunNumber -= 9000000;
445 *fLog << warn << "Format >V10: Wrong run number decreased by 9000000 to " << fRunNumber << "." << endl;
446 }
447
448 if (fRunNumber==1000382 &&
449 fRunStart.GetMjd()>54256.5 && fRunStart.GetMjd()<54257.5 &&
450 !strcmp(fSourceName, "GRB080605-2347"))
451 {
452 fFileNumber += 99;
453 *fLog << warn << "Format >V10: Ambiguous file number increased by 99 to " << fFileNumber << "." << endl;
454 }
455}
456
457// --------------------------------------------------------------------------
458//
459// This implements a fix of the pixel assignment before 25.9.2005
460//
461// From magic_online (the pixel numbers are hardware indices):
462// --------------------------------------------------------------------------
463// From: Florian Goebel <fgoebel@mppmu.mpg.de>
464// Date: Sun Sep 25 2005 - 05:13:19 CEST
465//
466// [...]
467// - problem 2: pixels were swaped
468// - cause: opical fibers were wrongly connected to receiver board
469// 554 <-> 559
470// 555 <-> 558
471// 556 <-> 557
472// - action: reconnect correctly
473// - result: ok now
474// - comment: I don't know when this error was introduced, so backward
475// correction of the data is difficult.
476// Fortunately the effect is not too large since the affected 6 pixels are
477// on the outermost edge of the camera
478// Since this board has special pixels the optical fibers have been
479// unplugged several times.
480// !!!!! Whenever you unplug and reconnect optical fibers make really !!!!!
481// !!!!! sure you connect them back correctly. !!!!!
482// !!!!! Always contact me before you do so and if you have any doubts !!!!!
483// !!!!! how to reconnect the fibers ask me. !!!!!
484// These swapped pixels have only been found by chance when doing the
485// flatfielding.
486// [...]
487//
488// --------------------------------------------------------------------------
489//
490// MAGIC runbook CC_2006_04_22_22_28_52.rbk
491//
492// [2006-04-22 23:14:13]
493//
494// [...]
495// Found 2 pairs of swapped pixels.
496// We corrected swapped pixels 54<->55 in the receiver boards. We probably
497// swapped today in the camera.
498// We did not correct 92<-<93 which are likely swapped. Will check and correct
499// tomorrow.
500//
501// ---
502//
503// comments:
504// - 54<->55 were corrected but have not been swapped, hence they are swapped
505// since then (run 88560 ok, run 88669 swapped; between them mostly dummy and
506// test runs)
507// - 92<->93 are never swapped, always ok.
508//
509// --------------------------------------------------------------------------
510//
511// MAGIC runbook CC_2006_08_28_19_40_18.rbk
512//
513// [2006-08-28 23:09:07]
514// While doing a flatfielding we have found out that the signals for pixels
515// 119 and 120 were swapped. We have fixed it by exchanging the corresponding
516// fibers at the input of the receivers (not before the splitters!).
517//
518// ---
519//
520// MAGIC runbook CC_2006_08_29_15_19_14.rbk
521//
522// [2006-08-29 16:43:09]
523// In the last hours we have found out and fixed a good number of pixels which
524// were swapped: 119-120, 160-161-162 and 210-263. According to Florian,
525// 160-161-162 and 210-263 were swapped since November 2005.
526//
527// ---
528//
529// mail Florian Goebel (08/30/2006 03:13 PM):
530//
531// As far as I can tell pixels 161 and 162 as well as 263 and 210 were
532// swapped in the trigger. This leads to some inefficiency of the trigger.
533// However, they were not swapped in the readout. So, you don't have to
534// correct anything in the data for these pixels.
535//
536// ---
537//
538// comments:
539// - 119-120 swapped between run 93251 (not swapped) and 93283 (swapped)
540// (only testruns between these runs)
541// corrected since run 99354 (== runbook [2006-08-28 23:09:07])
542// - 160 never swapped
543// - 161-162 were only swapped in the trigger, but nevertheless were
544// "corrected" also in the signal. Hence signal swapped since 99354
545//
546Bool_t MRawRunHeader::FixAssignment()
547{
548 if (!fTelescopeNumber==1)
549 return kTRUE;
550
551 if (fRunNumber>=53300 && fRunNumber<=68754)
552 {
553 if (!SwapAssignment(554, 559))
554 return kFALSE;
555 if (!SwapAssignment(555, 558))
556 return kFALSE;
557 if (!SwapAssignment(556, 557))
558 return kFALSE;
559 }
560
561 if (fRunNumber>=93283 && fRunNumber<99354)
562 {
563 if (!SwapAssignment(119, 120))
564 return kFALSE;
565 }
566
567 if (fRunNumber>=99354 && fRunNumber<=101789)
568 {
569 if (!SwapAssignment(161, 162))
570 return kFALSE;
571 if (!SwapAssignment(210, 263))
572 return kFALSE;
573 }
574
575 if (fRunNumber>=88669)
576 {
577 if (!SwapAssignment(54, 55))
578 return kFALSE;
579 }
580
581 if (fRunNumber>=200000)
582 {
583 if (!SwapAssignment(428, 429))
584 return kFALSE;
585 }
586
587 return kTRUE;
588}
589
590// --------------------------------------------------------------------------
591//
592// Fixes to fix bugs in the run header
593//
594Bool_t MRawRunHeader::Fixes()
595{
596 FixRunNumbers();
597
598 if (fFormatVersion>8 && fRunNumber>326152 && fTelescopeNumber==1)
599 {
600 fNumEvents--;
601 fNumEventsRead--;
602 *fLog << inf << "Format >V8 and Run>M1:326152: Stored number of events decreased by 1." << endl;
603 }
604
605 return FixAssignment();
606}
607
608// --------------------------------------------------------------------------
609//
610// Reading function to read/interpret the file formats 1-10
611//
612Bool_t MRawRunHeader::ReadEvtOld(istream& fin)
613{
614 if (fFormatVersion==7)
615 {
616 *fLog << err << "ERROR - File format V7 was for testing only and is not correctly implemented!" << endl;
617 return kFALSE;
618 }
619
620 // ----- DAQ software format version -----
621 fin.read((char*)&fSoftVersion, 2); // Total=6
622
623
624 fFadcType = 1;
625 if (fFormatVersion>7)
626 fin.read((char*)&fFadcType, 2);
627
628 // ----- Camera geometry and telescope number -----
629 fCameraVersion = 1;
630 fTelescopeNumber = 1;
631 if (fFormatVersion>5)
632 {
633 fin.read((char*)&fCameraVersion, 2); // (+2)
634 fin.read((char*)&fTelescopeNumber, 2); // (+2)
635 }
636
637 // ----- Run information -----
638 fin.read((char*)&fRunType, 2); // Total=8
639
640 fin.read((char*)&fRunNumber, 4); // Total=12
641 fin.read((char*)&fProjectName, fFormatVersion>5?100:22); // Total=34 (+78)
642 fin.read((char*)&fSourceName, fFormatVersion>5? 80:12); // Total=46 (+58)
643
644 if (fFormatVersion>5)
645 fin.read((char*)fObservationMode, 60); // (+60)
646 // Maybe we should set fObservationMode to something
647 // in case of fFormatVersion<6
648
649 // ----- Source position -----
650 fin.seekg(fFormatVersion>5 ? 16 : 8, ios::cur);
651 /*
652 if (fFormatVersion>5)
653 {
654 fin.read((char*)&fSourceRa, 4); // F32 SourceRA; Total=48
655 fin.read((char*)&fSourceDec, 4); // F32 SourceDEC; Total=52
656 }
657 fin.read((char*)&fTelescopeRa, 4); // F32 TelescopeRA; (+4)
658 fin.read((char*)&fTelescopeDec, 4); // F32 TelescopeDEC; (+4)
659 */
660
661 // Maybe we should set these to something
662 // in case of fFormatVersion<6
663 fin.read((char*)&fSourceEpochChar, 2); // Total=56
664 fin.read((char*)&fSourceEpochDate, 2); // Total=58
665
666 // ----- Old Start time -----
667 if (fFormatVersion<2) // Total += 10
668 {
669 UShort_t y, m, d;
670 fin.seekg(4, ios::cur); // Former fMJD[4],
671 fin.read((char*)&y, 2); // Former fDateYear[2]
672 fin.read((char*)&m, 2); // Former fDateMonth[2]
673 fin.read((char*)&d, 2); // Former fDateDay[2]
674 fRunStart.Set(y, m, d, 0, 0, 0, 0);
675 }
676
677 // ----- Data Geometry -----
678
679 fin.read((char*)&fNumCrates, 2); // MUX: number of channels
680 fin.read((char*)&fNumPixInCrate, 2); // MUX: number of pix in channel
681 fin.read((char*)&fNumSamplesLoGain, 2); // MUX: dummy (must be 0 for MUX data)
682 fin.read((char*)&fNumSamplesHiGain, 2); // MUX: Number of samples per pixel
683
684 char dummy[16];
685 if (fFormatVersion>8)
686 fin.read(dummy, 4); // 2xU16 (NumSamplesRemovedHead and NumSamplesRemovedTail)
687
688 // ----- Number of events -----
689 fin.read((char*)&fNumEvents, 4); // Total=70
690
691 if (fFormatVersion>8)
692 fin.read((char*)&fNumEventsRead, 4);
693
694 // New in general features: (should they be included in new MAGIC1 formats, too?)
695 fNumBytesPerSample = 1; // 2 for MUX DATA
696 fSamplingFrequency = 300;
697 fFadcResolution = 8;
698
699 if (fFormatVersion>7)
700 {
701 fin.read((char*)&fNumBytesPerSample, 2);
702 fin.read((char*)&fSamplingFrequency, 2); // [MHz], 2000 for MuxFadc
703 fin.read((char*)&fFadcResolution, 1); // nominal resolution [# Bits], 10 for MuxFadc
704 }
705
706 // ----- Start/Stop time -----
707 if (fFormatVersion>1)
708 {
709 fRunStart.ReadBinary(fin); // Total += 7
710 fRunStop.ReadBinary(fin); // Total += 7
711 }
712
713 //
714 // calculate size of array, create it and fill it
715 //
716 const Int_t nPixel = fNumCrates*fNumPixInCrate;
717 fPixAssignment->Set(nPixel);
718
719 // ----- Pixel Assignement -----
720 fin.read((char*)fPixAssignment->GetArray(), nPixel*2);
721
722 if (fFormatVersion<7)
723 fin.read(dummy, 16);
724
725 // ----- Fixes for broken files or contents -----
726 if (!Fixes())
727 return kFALSE;
728
729 // ----- Consistency checks -----
730 return IsConsistent();
731}
732
733// --------------------------------------------------------------------------
734//
735// Read in one run header from the binary file
736//
737Bool_t MRawRunHeader::ReadEvt(istream& fin)
738{
739 //
740 // read one RUN HEADER from the input stream
741 //
742 fMagicNumber = 0;
743
744 fin.read((char*)&fMagicNumber, 2); // Total=2
745
746 //
747 // check whether the the file has the right file type or not
748 //
749 if (fMagicNumber != kMagicNumber && fMagicNumber != kMagicNumber+1)
750 {
751 *fLog << err << "ERROR - Wrong Magic Number (0x" << hex << fMagicNumber << "): Not a Magic File!" << endl;
752 return kFALSE;
753 }
754
755 if (fMagicNumber == kMagicNumber+1)
756 *fLog << warn << "WARNING - This file maybe broken (0xc0c1) - DAQ didn't close it correctly!" << endl;
757
758 // ----- File format version -----
759 fin.read((char*)&fFormatVersion, 2); // Total=4
760 if (fFormatVersion==10 || fFormatVersion>kMaxFormatVersion)
761 {
762 *fLog << err << "ERROR - File format V" << fFormatVersion << " not implemented!" << endl;
763 return kFALSE;
764 }
765
766 // ----- Process old file formats -----
767 if (fFormatVersion<10)
768 return ReadEvtOld(fin);
769
770 // ----- Overwrite format version for format 11 -----
771 fin.read((char*)&fFormatVersion, 4);
772 if (fFormatVersion<11)
773 {
774 *fLog << err << "ERROR - Format Version <11." << endl;
775 return kFALSE;
776 }
777
778 // ----- Read Header by size as written in the header -----
779 fin.read((char*)&fHeaderSizeRun, 4);
780 if (fHeaderSizeRun<346)
781 {
782 *fLog << err << "ERROR - Event header too small (<388b)." << endl;
783 return kFALSE;
784 }
785
786 TArrayC h(fHeaderSizeRun-12);
787 fin.read(h.GetArray(), h.GetSize());
788 if (!fin)
789 return kFALSE;
790
791 // ----- convert -----
792 const Byte_t *Char = reinterpret_cast<Byte_t* >(h.GetArray());
793 const UInt_t *Int = reinterpret_cast<UInt_t* >(h.GetArray());
794 //const Float_t *Float = reinterpret_cast<Float_t*>(h.GetArray());
795
796 // ----- Start interpretation -----
797
798 fHeaderSizeEvt = Int[0];
799 fHeaderSizeCrate = Int[1];
800 fSoftVersion = Int[2];
801 fFadcType = Int[3];
802 fCameraVersion = Int[4];
803 fTelescopeNumber = Int[5];
804 fRunType = Int[6];
805 fRunNumber = Int[7];
806 fFileNumber = Int[8];
807
808 memcpy(fProjectName, Char+ 36, 100); // 25
809 memcpy(fSourceName, Char+136, 80); // 20
810 memcpy(fObservationMode, Char+216, 60); // 15
811
812 //F32 fSourceRA = Float[69];
813 //F32 fSourceDEC = Float[70];
814 //F32 fTelescopeRA = Float[71];
815 //F32 fTelescopeDEC = Float[72];
816
817 memcpy(fSourceEpochChar, Char+232, 4);
818
819 fSourceEpochDate = Int[74];
820 fNumCrates = Int[75];
821 fNumPixInCrate = Int[76];
822 fNumSamplesHiGain = Int[77];
823 fNumSamplesLoGain = 0;
824
825 //fNumSamplesRemovedHead = Int[78];
826 //fNumSamplesRemovedTail = Int[79];
827
828 fNumEvents = Int[80];
829 fNumEventsRead = Int[81];
830 fNumBytesPerSample = Int[82];
831 fSamplingFrequency = Int[83];
832 fFadcResolution = Int[84];
833
834 fRunStart.SetBinary(Int+85);
835 fRunStop.SetBinary(Int+91);
836
837 // ----- 388 bytes so far -----
838
839 const UInt_t n = fNumCrates*fNumPixInCrate;
840 if (fHeaderSizeRun<388+n*4)
841 {
842 *fLog << err << "ERROR - Event header too small to contain pix assignment." << endl;
843 return kFALSE;
844 }
845
846 // ----- Pixel Assignment -----
847 fPixAssignment->Set(n);
848
849 for (UInt_t i=0; i<n; i++)
850 (*fPixAssignment)[i] = Int[97+i];
851
852 // ----- Fixes for broken files or contents -----
853 if (!Fixes())
854 return kFALSE;
855
856 // ----- Consistency checks -----
857 return IsConsistent();
858}
859/*
860Bool_t MRawRunHeader::WriteEvt(ostream& out) const
861{
862 //
863 // write one RUN HEADER from the input stream
864 //
865 const UInt_t n = fNumCrates*fNumPixInCrate;
866
867 const UShort_t magicnumber = kMagicNumber;
868 const UInt_t formatversion = 11;
869 const UInt_t headersizerun = (97+n)*4; //???
870
871 // FIXME: Write fixed number (c0c0)
872 out.write((char*)&magicnumber, 2); // Total=2
873 out.write((char*)&formatversion, 2); // Total=4
874 out.write((char*)&formatversion, 4);
875 out.write((char*)&headersizerun, 4);
876
877 TArrayC h(headersizerun-12);
878
879 // ----- convert -----
880 Byte_t *Char = reinterpret_cast<Byte_t* >(h.GetArray());
881 UInt_t *Int = reinterpret_cast<UInt_t* >(h.GetArray());
882 //const Float_t *Float = reinterpret_cast<Float_t*>(h.GetArray());
883
884 // ----- Start interpretation -----
885
886 Int[0] = 0; // fHeaderSizeEvt;
887 Int[1] = 0; // fHeaderSizeCrate;
888 Int[2] = 0; // fSoftVersion;
889 Int[3] = fFadcType;
890 Int[4] = fCameraVersion;
891 Int[5] = fTelescopeNumber;
892 Int[5] = fRunType;
893 Int[6] = fRunNumber;
894 Int[7] = fFileNumber;
895
896 memcpy(Char+ 36, fProjectName, 100); // 25
897 memcpy(Char+136, fSourceName, 80); // 20
898 memcpy(Char+216, fObservationMode, 60); // 15
899
900 //F32 fSourceRA = Float[69];
901 //F32 fSourceDEC = Float[70];
902 //F32 fTelescopeRA = Float[71];
903 //F32 fTelescopeDEC = Float[72];
904
905 memcpy(Char+232, fSourceEpochChar, 4);
906
907 Int[74] = fSourceEpochDate;
908 Int[75] = fNumCrates;
909 Int[76] = fNumPixInCrate;
910 Int[77] = fNumSamplesHiGain;
911
912 //fNumSamplesRemovedHead = Int[78];
913 //fNumSamplesRemovedTail = Int[79];
914
915 Int[80] = fNumEvents;
916 Int[81] = fNumEvents; //fNumEventsRead;
917 Int[82] = fNumBytesPerSample;
918 Int[83] = fSamplingFrequency;
919 Int[84] = fFadcResolution;
920
921 fRunStart.GetBinary(Int+85);
922 fRunStop.GetBinary(Int+91);
923
924 // ----- 388 bytes so far -----
925
926 //const UInt_t n = fNumCrates*fNumPixInCrate;
927 //if (fHeaderSizeRun<(97+n)*4)
928 //{
929 // *fLog << err << "ERROR - Event header too small to contain pix assignment." << endl;
930 // return kFALSE;
931 //}
932
933 // ----- Pixel Assignment -----
934 for (UInt_t i=0; i<n; i++)
935 Int[97+i] = (*fPixAssignment)[i];
936
937 out.write(h.GetArray(), h.GetSize());
938
939 return out;
940}
941*/
942// --------------------------------------------------------------------------
943//
944// Return the run type as string ("Data", "Pedestal", ...), for example
945// to print it as readable text.
946//
947const Char_t *MRawRunHeader::GetRunTypeStr() const
948{
949 switch (fRunType)
950 {
951 case kRTData:
952 return "Data";
953 case kRTPedestal:
954 return "Pedestal";
955 case kRTCalibration:
956 return "Calibration";
957 case kRTDominoCal:
958 return "DominoCal";
959 case kRTLinearity:
960 return "Linearity";
961 case kRTPointRun:
962 return "Point-Run";
963 case kRTMonteCarlo:
964 return "Monte Carlo";
965 case kRTNone:
966 return "<none>";
967 default:
968 return "<unknown>";
969 }
970}
971
972const Char_t MRawRunHeader::GetRunTypeChar() const
973{
974 switch (fRunType&0xff)
975 {
976 case kRTData:
977 case kRTPointRun:
978 return 'D';
979 case kRTPedestal:
980 return 'P';
981 case kRTCalibration:
982 return 'C';
983 case kRTDominoCal:
984 return 'L';
985 case kRTLinearity:
986 return 'N';
987 default:
988 return ' ';
989 }
990}
991
992// --------------------------------------------------------------------------
993//
994// print run header information on *fLog. The option 'header' supresses
995// the pixel index translation table.
996//
997void MRawRunHeader::Print(Option_t *t) const
998{
999 *fLog << all << endl;
1000 *fLog << "MagicNumber: 0x" << hex << fMagicNumber << " - ";
1001 switch (fMagicNumber)
1002 {
1003 case kMagicNumber: *fLog << "OK"; break;
1004 case kMagicNumber+1: *fLog << "File not closed!"; break;
1005 default: *fLog << "Wrong!"; break;
1006 }
1007 *fLog << endl;
1008 *fLog << "Versions: " << dec << "Format=" << fFormatVersion << " ";
1009 *fLog << "Software=" << fSoftVersion << " ";
1010 if (fFormatVersion>5)
1011 *fLog << "Camera=" << fCameraVersion;
1012 *fLog << endl;
1013 if (fFormatVersion>10)
1014 *fLog << "Header sizes: " << fHeaderSizeRun << "b (run), " << fHeaderSizeEvt << "b (evt), " << fHeaderSizeCrate << "b (crate)" << endl;
1015 if (fRunNumber>0)
1016 {
1017 if (fFormatVersion>5)
1018 *fLog << "Telescope: " << fTelescopeNumber << endl;
1019 *fLog << "RunNumber: " << fRunNumber;
1020 if (fFormatVersion>10)
1021 *fLog << "/" << fFileNumber << " (id=" << GetFileID() << ")";
1022 *fLog << " (Type=" << GetRunTypeStr() << ")" << endl;
1023 }
1024 if (fFormatVersion>7)
1025 {
1026 *fLog << "FadcType: " << fFadcType << " (";
1027 switch (fFadcType)
1028 {
1029 case 1: *fLog << "Siegen"; break;
1030 case 2: *fLog << "MUX"; break;
1031 case 0xffff: *fLog << "artificial"; break;
1032 default: *fLog << "unknown";
1033 }
1034 *fLog << ")" << endl;
1035 }
1036 *fLog << "ProjectName: '" << fProjectName << "'" << endl;
1037 if (fFormatVersion>5)
1038 *fLog << "Observation: '" << fObservationMode << "'" << endl;
1039 if (fSourceName[0]!=0 || fSourceEpochChar[0]!=0 || fSourceEpochDate!=0)
1040 {
1041 *fLog << "Source: '" << fSourceName << "' " << " ";
1042 *fLog << fSourceEpochChar << dec << fSourceEpochDate << endl;
1043 }
1044 if (fRunStart)
1045 *fLog << "Run Start: " << fRunStart << endl;
1046 if (fRunStop)
1047 *fLog << "Run Stop: " << fRunStop << endl;
1048 if (fNumCrates>0 || fNumPixInCrate>0)
1049 *fLog << "Crates: " << fNumCrates << " x " << fNumPixInCrate << " Pixel/Crate = " << fNumCrates*fNumPixInCrate << " Pixel/Evt" << endl;
1050 if (GetNumConnectedPixels()>0)
1051 *fLog << "Num Pixels: " << GetNumNormalPixels() << " (normal) + " << GetNumSpecialPixels() << " (special) = " << GetNumConnectedPixels() << " (total)" << endl;
1052 if (fFormatVersion>6)
1053 *fLog << "Sampling: " << fSamplingFrequency << "MHz with " << (int)fFadcResolution << " significant bits" << endl;
1054 *fLog << "Samples: " << fNumSamplesHiGain << "/" << fNumSamplesLoGain << " (hi/lo) * " << fNumBytesPerSample << "B/sample = ";
1055 if (fNumCrates>0)
1056 *fLog << (fNumSamplesLoGain+fNumSamplesHiGain) * fNumCrates * fNumPixInCrate * fNumBytesPerSample/1000 << "kB/Evt" << endl;
1057 else
1058 *fLog << (fNumSamplesLoGain+fNumSamplesHiGain) * fNumBytesPerSample << "B/pix" << endl;
1059 if (fNumEvents>0 || fNumEventsRead>0)
1060 {
1061 *fLog << "Evt Counter: " << fNumEvents;
1062 if (fFormatVersion>8)
1063 *fLog << " (read=" << fNumEventsRead << ")";
1064 *fLog << endl;
1065 }
1066
1067 if (TString(t).Contains("header", TString::kIgnoreCase))
1068 return;
1069
1070 *fLog << inf3 << "Assignment:" << hex << endl;
1071 for (int i=0; i<GetNumPixel(); i++)
1072 *fLog << setfill('0') << setw(3) << (*fPixAssignment)[i] << " ";
1073
1074 *fLog << dec << setfill(' ') << endl;
1075}
1076
1077// --------------------------------------------------------------------------
1078//
1079// Return the assigned pixel number for the given FADC channel
1080//
1081Short_t MRawRunHeader::GetPixAssignment(UShort_t i) const
1082{
1083 // FIXME: Do we need a range check here?
1084 return (Short_t)(*fPixAssignment)[i];
1085}
1086
1087// --------------------------------------------------------------------------
1088//
1089// Return the number of pixel which are markes as connected in the
1090// pix assignment (!=0)
1091//
1092UShort_t MRawRunHeader::GetNumConnectedPixels() const
1093{
1094 const Int_t num = fPixAssignment->GetSize();
1095
1096 UShort_t rc = 0;
1097 for (int i=0; i<num; i++)
1098 {
1099 if (GetPixAssignment(i)!=0)
1100 rc++;
1101 }
1102 return rc;
1103}
1104
1105// --------------------------------------------------------------------------
1106//
1107// Return the number of pixel which are markes as connected and so-called
1108// 'normal' pixels in the pix assignment (>0)
1109//
1110UShort_t MRawRunHeader::GetNumNormalPixels() const
1111{
1112 const Int_t num = fPixAssignment->GetSize();
1113
1114 UShort_t rc = 0;
1115 for (int i=0; i<num; i++)
1116 {
1117 if (GetPixAssignment(i)>0)
1118 rc++;
1119 }
1120 return rc;
1121}
1122
1123// --------------------------------------------------------------------------
1124//
1125// Return the number of pixel which are markes as connected and so-called
1126// 'special' pixels in the pix assignment (<0)
1127//
1128UShort_t MRawRunHeader::GetNumSpecialPixels() const
1129{
1130 const Int_t num = fPixAssignment->GetSize();
1131
1132 UShort_t rc = 0;
1133 for (int i=0; i<num; i++)
1134 {
1135 if (GetPixAssignment(i)<0)
1136 rc++;
1137 }
1138 return rc;
1139}
1140
1141// --------------------------------------------------------------------------
1142//
1143// Return the maximum id which exists in the pix assignment
1144//
1145UShort_t MRawRunHeader::GetMaxPixId() const
1146{
1147 const Int_t num = fPixAssignment->GetSize();
1148
1149 Short_t rc = 0;
1150 for (int i=0; i<num; i++)
1151 rc = TMath::Max(GetPixAssignment(i), rc);
1152
1153 return rc;
1154}
1155
1156// --------------------------------------------------------------------------
1157//
1158// Return minus th minimum id which exists in the pix assignment
1159//
1160UShort_t MRawRunHeader::GetMinPixId() const
1161{
1162 const Int_t num = fPixAssignment->GetSize();
1163
1164 Short_t rc = 0;
1165 for (int i=0; i<num; i++)
1166 rc = TMath::Min(GetPixAssignment(i), rc);
1167
1168 return (UShort_t)-rc;
1169}
1170
1171// --------------------------------------------------------------------------
1172//
1173// Return the number of pixel in this event.
1174//
1175// WARNING: This is the number of pixels stored in this file which is
1176// a multiple of the number of pixels per crate and in general
1177// a number which is larger than the camera size!
1178//
1179// To know the range of the pixel indices please use the geometry
1180// container!
1181//
1182UShort_t MRawRunHeader::GetNumPixel() const
1183{
1184 return fPixAssignment->GetSize();
1185}
1186
1187// --------------------------------------------------------------------------
1188//
1189// Returns absolute size in bytes of the run header as read from a raw file.
1190// This must be done _after_ the header is read, because the header doesn't
1191// have a fixed size (used in MRawSocketRead)
1192//
1193Int_t MRawRunHeader::GetNumTotalBytes() const
1194{
1195 switch (fFormatVersion)
1196 {
1197 case 1:
1198 return 80+fNumCrates*fNumPixInCrate*2+16;
1199 case 2:
1200 case 3:
1201 case 4:
1202 case 5:
1203 return 84+fNumCrates*fNumPixInCrate*2+16;
1204 case 6:
1205 return 84+fNumCrates*fNumPixInCrate*2+16 +4+78+58+60+8;
1206 case 7:
1207 return 84+fNumCrates*fNumPixInCrate*2+16 +4+78+58+60+8 +3-16;
1208 }
1209 return 0;
1210}
1211
1212// --------------------------------------------------------------------------
1213//
1214// Monte Carlo Interface
1215//
1216// This is a (prelimiary) way to setup an existing FADC system.
1217//
1218// 1: Siegen FADCs
1219// 2: MUX FADCs
1220//
1221void MRawRunHeader::InitFadcType(UShort_t type)
1222{
1223 switch (type)
1224 {
1225 case 1:
1226 fNumSamplesHiGain = 15;
1227 fNumSamplesLoGain = 15;
1228 fNumBytesPerSample = 1; // number of bytes per sample
1229 fSamplingFrequency = 300; // Sampling Frequency [MHz]
1230 fFadcResolution = 8; // number of significant bits
1231 break;
1232 case 2:
1233 fNumSamplesHiGain = 50;
1234 fNumSamplesLoGain = 0;
1235 fNumBytesPerSample = 2; // number of bytes per sample
1236 fSamplingFrequency = 2000; // Sampling Frequency [MHz]
1237 fFadcResolution = 12; // number of significant bits
1238 break;
1239 case 3:
1240 fNumSamplesHiGain = 150;
1241 fNumSamplesLoGain = 0;
1242 fNumBytesPerSample = 2; // number of bytes per sample
1243 fSamplingFrequency = 1000; // Sampling Frequency [MHz]
1244 fFadcResolution = 12; // number of significant bits
1245 break;
1246 }
1247
1248 fFadcType = type;
1249}
1250
1251// --------------------------------------------------------------------------
1252//
1253// Monte Carlo Interface
1254//
1255// Init a camera
1256//
1257void MRawRunHeader::InitCamera(UShort_t type, UShort_t pix)
1258{
1259 switch (type)
1260 {
1261 case 1:
1262 fNumCrates = 1;
1263 fNumPixInCrate = 577;
1264 break;
1265 case 2:
1266 fNumCrates = 1;
1267 fNumPixInCrate = 703;
1268 break;
1269 case (UShort_t)-1:
1270 fNumCrates = 1;
1271 fNumPixInCrate = pix;
1272 break;
1273 }
1274
1275 fCameraVersion = type;
1276
1277 const Int_t n = fNumCrates*fNumPixInCrate;
1278
1279 fPixAssignment->Set(n);
1280
1281 for (int i=0; i<n; i++)
1282 (*fPixAssignment)[i] = i+1;
1283}
1284
1285void MRawRunHeader::InitFact(UShort_t num, UShort_t pix, UShort_t samples)
1286{
1287 fNumCrates = num;
1288 fNumPixInCrate = pix;
1289 fCameraVersion = 0xfac7;
1290 fFadcType = 0xfac7;
1291
1292 fPixAssignment->Set(num*pix);
1293
1294 for (int i=0; i<num*pix; i++)
1295 (*fPixAssignment)[i] = i+1;
1296
1297 fNumSamplesHiGain = samples;
1298 fNumSamplesLoGain = 0;
1299 fNumBytesPerSample = 2; // number of bytes per sample
1300 fIsSigned = kTRUE;
1301 fSamplingFrequency = 2000; // Sampling Frequency [MHz]
1302 fFadcResolution = 12; // number of significant bits
1303}
1304
1305// --------------------------------------------------------------------------
1306//
1307// Monte Carlo Interface
1308//
1309// Set telescope number, run-number and file-number
1310//
1311void MRawRunHeader::SetRunInfo(UShort_t tel, UInt_t run, UInt_t file)
1312{
1313 fTelescopeNumber = tel;
1314 fRunNumber = run;
1315 fFileNumber = file;
1316}
1317
1318// --------------------------------------------------------------------------
1319//
1320// Monte Carlo Interface
1321//
1322// Set source-name, epoch (default J) and date (default 2000)
1323//
1324void MRawRunHeader::SetSourceInfo(const TString src, char epoch, UShort_t date)
1325{
1326 strncpy(fSourceName, src.Data(), 80);
1327
1328 fSourceEpochChar[0] = epoch; // epoch char of the source
1329 fSourceEpochDate = date; // epoch date of the source
1330}
1331
1332// --------------------------------------------------------------------------
1333//
1334// Monte Carlo Interface
1335//
1336// Set run-start and -stop time
1337//
1338void MRawRunHeader::SetRunTime(const MTime &start, const MTime &end)
1339{
1340 fRunStart = start;
1341 fRunStop = end;
1342}
1343
1344// --------------------------------------------------------------------------
1345//
1346// Monte Carlo Interface
1347//
1348// Set project name and observation mode
1349//
1350void MRawRunHeader::SetObservation(const TString mode, const TString proj)
1351{
1352 strncpy(fProjectName, proj.Data(), 100);
1353 strncpy(fObservationMode, mode.Data(), 60);
1354}
1355
1356// --------------------------------------------------------------------------
1357//
1358// Monte Carlo Interface
1359//
1360// Set number of events in file.
1361//
1362void MRawRunHeader::SetNumEvents(UInt_t num)
1363{
1364 fNumEvents = num;
1365 fNumEventsRead = num;
1366}
1367
1368// --------------------------------------------------------------------------
1369//
1370// NumSamples: 50
1371// NumBytePerSample: 2
1372// SamplingFrequency: 2000
1373// FadcResolution: 12
1374// FadcType: XXXX
1375//
1376Int_t MRawRunHeader::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
1377{
1378 Bool_t rc = kFALSE;
1379
1380 if (IsEnvDefined(env, prefix, "NumSamples", print))
1381 {
1382 rc = kTRUE;
1383 fNumSamplesHiGain = GetEnvValue(env, prefix, "NumSamples", fNumSamplesHiGain);
1384 fNumSamplesLoGain = 0;
1385 }
1386
1387 if (IsEnvDefined(env, prefix, "NumBytesPerSample", print))
1388 {
1389 rc = kTRUE;
1390 fNumBytesPerSample = GetEnvValue(env, prefix, "NumBytesPerSample", fNumBytesPerSample);
1391 }
1392
1393 if (IsEnvDefined(env, prefix, "SamplingFrequency", print))
1394 {
1395 rc = kTRUE;
1396 fSamplingFrequency = GetEnvValue(env, prefix, "SamplingFrequency", fSamplingFrequency);
1397 }
1398
1399 if (IsEnvDefined(env, prefix, "FadcResolution", print))
1400 {
1401 rc = kTRUE;
1402 fFadcResolution = GetEnvValue(env, prefix, "FadcResolution", fFadcResolution);
1403 }
1404 // Saturation behaviour etc.
1405 if (IsEnvDefined(env, prefix, "FadcType", print))
1406 {
1407 //rc = kTRUE;
1408 //TString type = GetEnvValue(env, prefix, "FadcType", "");
1409 // Eval "Siegen", "MUX", Dwarf"
1410 }
1411 else
1412 if (rc)
1413 fFadcType = 0xffff; // "Artificial"
1414
1415 return rc;
1416}
1417
Note: See TracBrowser for help on using the repository browser.