Changeset 17148 for trunk/Mars/mjobs
- Timestamp:
- 09/09/13 12:39:18 (11 years ago)
- Location:
- trunk/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars
-
Property svn:mergeinfo
set to
/branches/Mars_MC merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Mars/mjobs/MJSimulation.cc
r15277 r17148 260 260 write.AddContainer("IncidentAngle", "Events", kFALSE); 261 261 } 262 263 void MJSimulation::SetupHeaderKeys(MWriteFitsFile &write,MRawRunHeader &header) const 264 { 265 const MTime now(-1); 266 write.SetHeaderKey("ISMC",true,"Bool if File is Montecarlo File"); 267 write.SetHeaderKey("TELESCOP", "FACT", ""); 268 write.SetHeaderKey("PACKAGE", "MARS Cheobs", ""); 269 write.SetHeaderKey("VERSION", "1.0", ""); 270 write.SetHeaderKey("CREATOR", "Ceres", ""); 271 write.SetHeaderKey("EXTREL", 1., ""); 272 write.SetHeaderKey("COMPILED", __DATE__" "__TIME__, ""); 273 write.SetHeaderKey("REVISION", "0", ""); 274 write.SetHeaderKey("ORIGIN", "FACT", ""); 275 write.SetHeaderKey("DATE", now.GetStringFmt("%Y-%m-%dT%H:%M:%S").Data(), ""); 276 write.SetHeaderKey("NIGHT", now.GetNightAsInt(), ""); 277 write.SetHeaderKey("TIMESYS", "UTC", ""); 278 write.SetHeaderKey("TIMEUNIT", "d", ""); 279 write.SetHeaderKey("MJDREF", 40587, ""); 280 //write.SetHeaderKey("BLDVER", 1, ""); 281 write.SetHeaderKey("RUNID", header.GetRunNumber(), ""); 282 write.SetHeaderKey("NBOARD", 40, ""); 283 write.SetHeaderKey("NPIX", header.GetNumPixel(), ""); 284 write.SetHeaderKey("NROI", header.GetNumSamplesHiGain(), ""); 285 write.SetHeaderKey("NROITM", 0, ""); 286 write.SetHeaderKey("TMSHIFT", 0, ""); 287 write.SetHeaderKey("CAMERA", "MGeomCamFACT", ""); 288 write.SetHeaderKey("DAQ", "DRS4", ""); 289 290 // FTemme: ADCRANGE and ADC have to be calculated, using the values for 291 // the fadctype. 292 // write.SetHeaderKey("ADCRANGE", 2000, "Dynamic range in mV"); 293 // write.SetHeaderKey("ADC", 12, "Resolution in bits"); 294 295 switch(header.GetRunType()) 296 { 297 case MRawRunHeader::kRTData|MRawRunHeader::kRTMonteCarlo: 298 write.SetHeaderKey("RUNTYPE", "data", ""); 299 break; 300 case MRawRunHeader::kRTPedestal|MRawRunHeader::kRTMonteCarlo: 301 write.SetHeaderKey("RUNTYPE", "pedestal", ""); 302 break; 303 case MRawRunHeader::kRTCalibration|MRawRunHeader::kRTMonteCarlo: 304 write.SetHeaderKey("RUNTYPE", "calibration", ""); 305 break; 306 } 307 // write.SetHeaderKey("ID", 777, "Board 0: Board ID"); 308 // write.SetHeaderKey("FMVER", 532, "Board 0: Firmware Version"); 309 // write.SetHeaderKey("DNA", "0", ""); 310 // write.SetHeaderKey("BOARD", 0, ""); 311 // write.SetHeaderKey("PRESC", 40, ""); 312 // write.SetHeaderKey("PHASE", 0, ""); 313 // write.SetHeaderKey("DAC0", 26500, ""); 314 // write.SetHeaderKey("DAC1", 0, ""); 315 // write.SetHeaderKey("DAC2", 0, ""); 316 // write.SetHeaderKey("DAC3", 0, ""); 317 // write.SetHeaderKey("DAC4", 28800, ""); 318 // write.SetHeaderKey("DAC5", 28800, ""); 319 // write.SetHeaderKey("DAC6", 28800, ""); 320 // write.SetHeaderKey("DAC7", 28800, ""); 321 write.SetHeaderKey("REFCLK", header.GetFreqSampling(), ""); 322 write.SetHeaderKey("DRSCALIB", false, ""); 323 // write.SetHeaderKey("TSTARTI", 0, ""); 324 // write.SetHeaderKey("TSTARTF", 0., ""); 325 // write.SetHeaderKey("TSTOPI", 0, ""); 326 // write.SetHeaderKey("TSTOPF", 0., ""); 327 // write.SetHeaderKey("DATE-OBS", "1970-01-01T00:00:00", ""); 328 // write.SetHeaderKey("DATE-END", "1970-01-01T00:00:00", ""); 329 // write.SetHeaderKey("NTRG", 0, ""); 330 // write.SetHeaderKey("NTRGPED", 0, ""); 331 // write.SetHeaderKey("NTRGLPE", 0, ""); 332 // write.SetHeaderKey("NTRGTIM", 0, ""); 333 // write.SetHeaderKey("NTRGLPI", 0, ""); 334 // write.SetHeaderKey("NTRGEXT1", 0, ""); 335 // write.SetHeaderKey("NTRGEXT2", 0, ""); 336 // write.SetHeaderKey("NTRGMISC", 0, ""); 337 } 338 339 void MJSimulation::SetupVetoColumns(MWriteFitsFile &write) const 340 { 341 write.VetoColumn("MParameterD.fVal"); 342 write.VetoColumn("MRawEvtData.fLoGainPixId"); 343 write.VetoColumn("MRawEvtData.fLoGainFadcSamples"); 344 write.VetoColumn("MRawEvtData.fABFlags"); 345 write.VetoColumn("MRawEvtHeader.fNumTrigLvl2"); 346 //write.VetoColumn("MRawEvtHeader.fTrigPattern"); 347 write.VetoColumn("MRawEvtHeader.fNumLoGainOn"); 348 } 349 262 350 Bool_t MJSimulation::Process(const MArgs &args, const MSequence &seq) 263 351 { … … 558 646 MTask &write3a = fWriteFitsFile ? static_cast<MTask&>(write3af) : static_cast<MTask&>(write3ar); 559 647 560 write3af.SetHeaderKey("DUMMY0", 3, "First dummy"); 561 write3af.SetHeaderKey("DUMMY1", 3.14159265358979323846, "Second dummy"); 562 write3af.SetHeaderKey("DUMMY2", true, "Third dummy"); 563 write3af.SetHeaderKey("DUMMY3", "one value", "Fourth dummy"); 564 565 write3af.VetoColumn("MParameterD.fVal"); 566 write3af.VetoColumn("MCorsikaEvtHeader.fEvtNumber"); 567 write3af.VetoColumn("MCorsikaEvtHeader.fNumReuse"); 568 write3af.VetoColumn("MCorsikaEvtHeader.fTotalEnergy"); 569 write3af.VetoColumn("MCorsikaEvtHeader.fStartAltitude"); 570 write3af.VetoColumn("MCorsikaEvtHeader.fFirstTargetNum"); 571 write3af.VetoColumn("MCorsikaEvtHeader.fFirstInteractionHeight"); 572 write3af.VetoColumn("MCorsikaEvtHeader.fMomentumX"); 573 write3af.VetoColumn("MCorsikaEvtHeader.fMomentumY"); 574 write3af.VetoColumn("MCorsikaEvtHeader.fMomentumZ"); 575 write3af.VetoColumn("MCorsikaEvtHeader.fAz"); 576 write3af.VetoColumn("MCorsikaEvtHeader.fWeightedNumPhotons"); 577 write3af.VetoColumn("MCorsikaEvtHeader.fZd"); 578 write3af.VetoColumn("MCorsikaEvtHeader.fAd"); 579 write3af.VetoColumn("MCorsikaEvtHeader.fX"); 580 write3af.VetoColumn("MCorsikaEvtHeader.fY"); 581 write3af.VetoColumn("MCorsikaEvtHeader.fWeightNumPhotons"); 582 write3af.VetoColumn("MMcEvt.fEvtNumber"); 583 write3af.VetoColumn("MMcEvt.fThick0"); 584 write3af.VetoColumn("MMcEvt.fFirstTarget"); 585 write3af.VetoColumn("MMcEvt.fZFirstInteraction"); 586 write3af.VetoColumn("MMcEvt.fCoreD"); 587 write3af.VetoColumn("MMcEvt.fCoreX"); 588 write3af.VetoColumn("MMcEvt.fCoreY"); 589 write3af.VetoColumn("MMcEvt.fTimeFirst"); 590 write3af.VetoColumn("MMcEvt.fTimeLast"); 591 write3af.VetoColumn("MMcEvt.fLongiNmax"); 592 write3af.VetoColumn("MMcEvt.fLongit0"); 593 write3af.VetoColumn("MMcEvt.fLongitmax"); 594 write3af.VetoColumn("MMcEvt.fLongia"); 595 write3af.VetoColumn("MMcEvt.fLongib"); 596 write3af.VetoColumn("MMcEvt.fLongic"); 597 write3af.VetoColumn("MMcEvt.fLongichi2"); 598 write3af.VetoColumn("MMcEvt.fPhotIni"); 599 write3af.VetoColumn("MMcEvt.fPassPhotAtm"); 600 write3af.VetoColumn("MMcEvt.fPassPhotRef"); 601 write3af.VetoColumn("MMcEvt.fPassPhotCone"); 602 write3af.VetoColumn("MMcEvt.fPhotElfromShower"); 603 write3af.VetoColumn("MMcEvt.fPhotElinCamera"); 604 write3af.VetoColumn("MMcEvt.fElecCphFraction"); 605 write3af.VetoColumn("MMcEvt.fMuonCphFraction"); 606 write3af.VetoColumn("MMcEvt.fOtherCphFraction"); 607 write3af.VetoColumn("MMcEvt.fFadcTimeJitter"); 608 write3af.VetoColumn("MMcEvt.fEventReuse"); 609 610 write3af.VetoColumn("MRawEvtData.fHiGainPixId"); 611 write3af.VetoColumn("MRawEvtData.fLoGainPixId"); 612 write3af.VetoColumn("MRawEvtData.fLoGainFadcSamples"); 613 write3af.VetoColumn("MRawEvtData.fABFlags"); 614 write3af.VetoColumn("MRawEvtData.fStartCells"); 615 write3af.VetoColumn("MRawEvtData.fNumBytesPerSample"); 616 write3af.VetoColumn("MRawEvtData.fIsSigned"); 617 write3af.VetoColumn("MRawEvtHeader.fDAQEvtNumber"); //EventNum ? 618 write3af.VetoColumn("MRawEvtHeader.fNumTrigLvl1"); 619 write3af.VetoColumn("MRawEvtHeader.fNumTrigLvl2"); 620 write3af.VetoColumn("MRawEvtHeader.fTrigPattern"); 621 write3af.VetoColumn("MRawEvtHeader.fNumLoGainOn"); 648 //SetupHeaderKeys(write3af,header); 649 SetupVetoColumns(write3af); 622 650 623 651 write3af.SetBytesPerSample("Data", 2); … … 649 677 write3af.AddContainer("IntendedPulsePos", "RunHeaders"); 650 678 write3af.AddContainer("MRawEvtData", "Events"); 679 write3af.AddContainer("MMcEvtBasic", "Events"); 680 write3af.AddContainer("MPhotonEvent","Events"); 651 681 652 682 write3ar.AddContainer("ElectronicNoise", "RunHeaders"); -
trunk/Mars/mjobs/MJSimulation.h
r14864 r17148 12 12 class MWriteRootFile; 13 13 class MWriteFitsFile; 14 class MRawRunHeader; 14 15 15 16 class MJSimulation : public MJob … … 34 35 void SetupCommonFileStructure(MWriteRootFile &write) const; 35 36 void SetupCommonFileStructure(MWriteFitsFile& write) const; 37 void SetupHeaderKeys(MWriteFitsFile& write, MRawRunHeader &header) const; 38 void SetupVetoColumns(MWriteFitsFile& write) const; 36 39 37 40 public:
Note:
See TracChangeset
for help on using the changeset viewer.